Improved Arduino LED lighting code - Page 2
Planted Tank Forums
Your Tanks Image Hosting *Tank Tracker * Plant Profiles Fish Profiles Planted Tank Guide Photo Gallery Articles

Go Back   The Planted Tank Forum > Specific Aspects of a Planted Tank > DIY


Reply
 
Thread Tools Display Modes
Old 09-10-2011, 04:14 PM   #16
sink
Algae Grower
 
PTrader: (2/100%)
Join Date: Jun 2011
Location: Boston, MA
Posts: 148
Default

Quote:
Originally Posted by O2surplus View Post
Sink,

I uploaded the TimeSet code.....Worked perfectly. I also uploaded the TankControl code again after lowering the minimum PWM state to "5" and stting the fade duration to 1 hour. All I can say is "WOW!" The dimming is completely linear, seamless, and totally natural looking. That has got to be the best Dimming Simulation that I've ever seen! I now have 90 little "moon lights" over my tank. Too cool! Thanks so much for creating and posting the codes!
I'd like to thank the Academy... I'm glad it works for you.

Just kidding. You are welcome and thanks for testing. Cleaning this up and making it available to others is the least I can do in return for all of the knowledge I've shamelessly mined from this forum so far.
sink is offline   Reply With Quote Quick reply to this message
Sponsored Links
Advertisement
 
Old 09-10-2011, 05:46 PM   #17
mistergreen
No more Bow ties
 
mistergreen's Avatar
 
PTrader: (13/100%)
Join Date: Dec 2006
Location: Cincinnati
Posts: 14,358
Default

How are you guys setting your time? An lcd is pretty cheap.
mistergreen is online now   Reply With Quote Quick reply to this message
Old 09-10-2011, 05:57 PM   #18
O2surplus
Planted Tank Enthusiast
 
O2surplus's Avatar
 
PTrader: (4/100%)
Join Date: Jan 2010
Location: "The Land of Fruits & Nuts"
Posts: 681
Default

Quote:
Originally Posted by mistergreen View Post
How are you guys setting your time? An lcd is pretty cheap.
Sink made it so easy " a cave man could do it". He wrote a program that pulls the current time from your computer and transfers it directly to the arduino.

Look for the TimeSet sketch is his code bundle.
O2surplus is online now   Reply With Quote Quick reply to this message
Old 09-10-2011, 06:04 PM   #19
mistergreen
No more Bow ties
 
mistergreen's Avatar
 
PTrader: (13/100%)
Join Date: Dec 2006
Location: Cincinnati
Posts: 14,358
Default

Yeah, I did that too but I found an lcd is helpful where you can't connect to a PC.
mistergreen is online now   Reply With Quote Quick reply to this message
Old 09-10-2011, 06:50 PM   #20
sink
Algae Grower
 
PTrader: (2/100%)
Join Date: Jun 2011
Location: Boston, MA
Posts: 148
Default

Quote:
Originally Posted by mistergreen View Post
Yeah, I did that too but I found an lcd is helpful where you can't connect to a PC.
Strictly speaking an LCD would only display time, you can't actually set it using it . For that you need some buttons.

Anyway I thought about adding a display and/or buttons to my controller but ultimately I didn't see the relatively minor value being worth the added complexity. I'm very much a minimalist. You shouldn't have to set the clock very often at all--that's largely the point of the RTC--and tweaking something is a 2 minute job with a laptop.

In some way I intend this to be demo code and to be as easily adaptable as possible to different setups. To that end I don't make any assumptions about what hardware/driver/controller you have beyond there being an Arduino and a DS1307.
sink is offline   Reply With Quote Quick reply to this message
Old 09-10-2011, 07:21 PM   #21
O2surplus
Planted Tank Enthusiast
 
O2surplus's Avatar
 
PTrader: (4/100%)
Join Date: Jan 2010
Location: "The Land of Fruits & Nuts"
Posts: 681
Default

Quote:
Originally Posted by sink View Post
Anyway I thought about adding a display and/or buttons to my controller but ultimately I didn't see the relatively minor value being worth the added complexity. I'm very much a minimalist. You shouldn't have to set the clock very often at all--that's largely the point of the RTC--and tweaking something is a 2 minute job with a laptop.
I like the minimalist approach as well...... but it seems that I'm addicted to solder fumes! LOL I can hardly wait to build another batch of controllers that run your code.
O2surplus is online now   Reply With Quote Quick reply to this message
Old 09-10-2011, 07:39 PM   #22
jcgd
Wannabe Guru
 
jcgd's Avatar
 
PTrader: (6/100%)
Join Date: Feb 2004
Location: Calgary, Alberta, Canada
Posts: 1,985
Send a message via MSN to jcgd
Default

Would you guys be interested in some other ideas? There are a few more features I'm always hunting for.
jcgd is offline   Reply With Quote Quick reply to this message
Old 09-10-2011, 08:24 PM   #23
O2surplus
Planted Tank Enthusiast
 
O2surplus's Avatar
 
PTrader: (4/100%)
Join Date: Jan 2010
Location: "The Land of Fruits & Nuts"
Posts: 681
Default

Quote:
Originally Posted by jcgd View Post
Would you guys be interested in some other ideas? There are a few more features I'm always hunting for.
Okay - Justin AKA "XM-L Pioneer". What other ideas do you have? I've got my soldering iron warmed up. LOL
O2surplus is online now   Reply With Quote Quick reply to this message
Old 09-10-2011, 09:30 PM   #24
sink
Algae Grower
 
PTrader: (2/100%)
Join Date: Jun 2011
Location: Boston, MA
Posts: 148
Default

Quote:
Originally Posted by jcgd View Post
Would you guys be interested in some other ideas? There are a few more features I'm always hunting for.
Ideas are always good.
sink is offline   Reply With Quote Quick reply to this message
Old 09-10-2011, 09:51 PM   #25
reybie
Planted Tank Enthusiast
 
PTrader: (51/100%)
Join Date: Jun 2007
Location: Hotrizona
Posts: 977
Default

Question for you electronics gurus. Since you're already using an arduino board already, is it possible to integrate a temperature sensor in it that can switch a relay on/off to say power a fan or heater?

I was browsing the arduino forum briefly today and I don't think there's a waterproof temp sensor (yet).
reybie is offline   Reply With Quote Quick reply to this message
Old 09-10-2011, 10:02 PM   #26
sink
Algae Grower
 
PTrader: (2/100%)
Join Date: Jun 2011
Location: Boston, MA
Posts: 148
Default

Quote:
Originally Posted by reybie View Post
Question for you electronics gurus. Since you're already using an arduino board already, is it possible to integrate a temperature sensor in it that can switch a relay on/off to say power a fan or heater?

I was browsing the arduino forum briefly today and I don't think there's a waterproof temp sensor (yet).
You could probably just take a cheap temp sensor IC (LM35, etc) and then encase it in a tube.
sink is offline   Reply With Quote Quick reply to this message
Old 09-10-2011, 10:11 PM   #27
reybie
Planted Tank Enthusiast
 
PTrader: (51/100%)
Join Date: Jun 2007
Location: Hotrizona
Posts: 977
Default

Cool! Thanks, there was even an instructable on waterproofing the LM35.
reybie is offline   Reply With Quote Quick reply to this message
Old 09-19-2011, 04:40 PM   #28
Tbakes
Algae Grower
 
Tbakes's Avatar
 
PTrader: (4/100%)
Join Date: Mar 2011
Location: Schwenksville, PA
Posts: 77
Default

Aaron / Sink -

I'm getting closer to my control box build (seriously - I almost have my plumbing done, electronics in the near future finally!).

How would I go about re-programming my unit? Can I ship the Typhoon back to you Aaron, or is there a USB AVR programmer solution?

If you are taking requests for new projects - I'd be interested in some simple timer code to make an autodoser work a 4-relay module that they sell on no ebay links allowed I have a arduino duemilanove and RTC available to dedicate to the unit. If there isn't code out there already, I figured I'd give it a shot programming myself. Course the last time I programmed was in 1997!
Tbakes is offline   Reply With Quote Quick reply to this message
Old 09-19-2011, 05:24 PM   #29
O2surplus
Planted Tank Enthusiast
 
O2surplus's Avatar
 
PTrader: (4/100%)
Join Date: Jan 2010
Location: "The Land of Fruits & Nuts"
Posts: 681
Default

Hey Tony,

Sink is still working on the code. He's going to send me the new code for testing once he's finished. I'll test the code out and report back to him with any bugs, or changes that need to be addressed. When we're confident that the code will work, he or I will post it up so that you guys can get your hands on it. The only things that you'll need to reprogram the controller will be a USB/ FTDI adapter ($15) and the arduino software (free). Here's a photo of the FTDI adapter connected to the controller.
Attached Thumbnails
Click image for larger version

Name:	IMG_1349.jpg
Views:	87
Size:	91.2 KB
ID:	34990  

O2surplus is online now   Reply With Quote Quick reply to this message
Old 09-19-2011, 07:43 PM   #30
sink
Algae Grower
 
PTrader: (2/100%)
Join Date: Jun 2011
Location: Boston, MA
Posts: 148
Default

Hi. Haven't forgotten about you guys, honest. I'm traveling for work stuff. I did much of the code rewrite already (made some great progress while bored waiting for my connecting flight at JFK) but I need to debug it on some actual hardware before I let others test it. O2surplus, I'll shoot you an email next week. Hopefully we can get a controller sent over here so it arrives soon after I get home and I can get you guys some improved firmware to play with.

As an aside, I figured out before I left that while the DS1307 on my homemade controller is very accurate on battery (less than 2s/day drift) it's wildly inaccurate when the controller is powered up. I guess there is some interference happening from the driver circuit due to me not knowing how to design the board properly. This is unique to my board and has nothing to do with the code.

Anyway, the easiest fix is to pick up a tiny ChronoDot RTC board that can be plugged right into the Arduino. It a significantly more accurate RTC using a different chip (DS3231). The end result is that you have one of these (or were thinking about getting one) my code will support it very shortly.
sink is offline   Reply With Quote Quick reply to this message
Reply

Quick Reply
Message:
Options

Register Now

In order to be able to post messages on the The Planted Tank Forum forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.
User Name:
Password
Please enter a password for your user account. Note that passwords are case-sensitive.
Password:
Confirm Password:
Email Address
Please enter a valid email address for yourself.
Email Address:

Log-in

Human Verification

In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.



Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:42 AM.


Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright Planted Tank LLC 2012