Yet another Arduino based LED controller
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 08-21-2013, 09:07 PM   #1
estill
Algae Grower
 
PTrader: (3/100%)
Join Date: Jan 2007
Location: Tacoma, Washington
Posts: 25
Default

Yet another Arduino based LED controller


It's about time for my yearly post to this site. This time around I'm looking to DIY some LED's for a small tank. My little girls want her own aquarium and she wants glofish. This isn't my first go-round with LED's or Arduino (Here is a short video of what I've been working on for a slot car drag strip http://youtu.be/KPKZ3NmU4WM)

My end goal is
  1. two sets of LED's: white and Violet
  2. Fade on\off at various times
  3. the ability to override the programmed levels

Let me preface the rest of this with: I'm not sure how much I should like out to other websites. So, I'm not going to link to anything. I can provide real links if necessary.

This project is going to spin off into probably three more controllers in the near future, so I'm trying to get the first one right. My thought is to go as far as to design and have PCB's printed making the next ones easier. With that out of the way here are my thoughts and questions:

I can only envision needing 3 channels of LED's, on any of these, so I found the Pro Micro based on the ATmega32U4 chip. This is nearly identical to the Arduino Pro Mini, but it has on-board USB. The way I see it I need 3 PWM outputs, and through the infamous auction site I can get them for less than $10 a piece. Naturally I need some sort of a clock so again a RTC from China.

For LED drivers I'm thinking the Mean Well LDD. They all have the same foot print, so I can use different model to control input voltages and amperage's without changing the underlying PCB. This leads me to my first question. How strict do I need to be in matching the input voltage to the aggregate Vf of the LED's? Are these going to generate heat if I give them too much power?

The final piece of the puzzle is avoiding multiple power supplies. If my research is correct I can use a DC-DC Switching converter, to step down from 24V/36V/48V to 5V for the Arduino and RTC. I have found the Traco Power TEL 3-xx11. Replace the xx with 20, 24, or 48 for the corresponding nominal voltage. These will give me 600 mA at 5v from a range of voltages. Does anyone have experience with these? Will they generate much heat?
estill is offline   Reply With Quote Quick reply to this message
Sponsored Links
Advertisement
 
Old 08-22-2013, 02:15 AM   #2
O2surplus
Planted Tank Enthusiast
 
O2surplus's Avatar
 
PTrader: (4/100%)
Join Date: Jan 2010
Location: yorba linda, ca.
Posts: 538
Default

Quote:
Originally Posted by estill View Post
It's about time for my yearly post to this site. This time around I'm looking to DIY some LED's for a small tank. My little girls want her own aquarium and she wants glofish. This isn't my first go-round with LED's or Arduino (Here is a short video of what I've been working on for a slot car drag strip http://youtu.be/KPKZ3NmU4WM)

My end goal is
  1. two sets of LED's: white and Violet
  2. Fade on\off at various times
  3. the ability to override the programmed levels

Let me preface the rest of this with: I'm not sure how much I should like out to other websites. So, I'm not going to link to anything. I can provide real links if necessary.

This project is going to spin off into probably three more controllers in the near future, so I'm trying to get the first one right. My thought is to go as far as to design and have PCB's printed making the next ones easier. With that out of the way here are my thoughts and questions:

I can only envision needing 3 channels of LED's, on any of these, so I found the Pro Micro based on the ATmega32U4 chip. This is nearly identical to the Arduino Pro Mini, but it has on-board USB. The way I see it I need 3 PWM outputs, and through the infamous auction site I can get them for less than $10 a piece. Naturally I need some sort of a clock so again a RTC from China.

For LED drivers I'm thinking the Mean Well LDD. They all have the same foot print, so I can use different model to control input voltages and amperage's without changing the underlying PCB. This leads me to my first question. How strict do I need to be in matching the input voltage to the aggregate Vf of the LED's? Are these going to generate heat if I give them too much power?

The final piece of the puzzle is avoiding multiple power supplies. If my research is correct I can use a DC-DC Switching converter, to step down from 24V/36V/48V to 5V for the Arduino and RTC. I have found the Traco Power TEL 3-xx11. Replace the xx with 20, 24, or 48 for the corresponding nominal voltage. These will give me 600 mA at 5v from a range of voltages. Does anyone have experience with these? Will they generate much heat?
How many leds in each string do you plan to drive? I ask because your answer will determine the voltage needed from your power supply. If you're only planning 6-7 leds per string, then a 24V supply will suffice. An added benefit to that set up would be that you don't need a dedicated dc/dc convertor to step down to 5V. A typical 5V regulator can do the job for less than $1. Most regulators can't handle more than 30V, so if your required voltage is higher than that, you'll need the dc/dc convertor.
The Meanwell LDD's are interesting little drivers. I've got a bunch of them mounted to custom PcB's of my own design. I have not had any overheating issues from mine, and I'm using 48V on the input side with a 32V load on the output. Your experience shouldn't be any different.
If you're planning to build your Arduino based controller from scratch and have a custom PcB made, let me know if you need any help. I've built quite a few, so I'm knowledgeable in this subject.
__________________
225 Gal, Glass "Reef Ready" w/ twin Iwaki Pumps & 2 Ocean Clear inline filters. Custom 320 watt LED Lighting system utilizing a 6' Maker's Heat Sink, 12 BridgeLux Vero 18's,3 purpose built 5 channel A6211 Led driver/Controllers, and a 20lb CO2 system w/ Milwaukee Ph Controller.
O2surplus is offline   Reply With Quote Quick reply to this message
Old 08-22-2013, 04:00 AM   #3
estill
Algae Grower
 
PTrader: (3/100%)
Join Date: Jan 2007
Location: Tacoma, Washington
Posts: 25
Default

Thank you for the reply. I've only looked at voltage regulators for 12V applications. That makes that piece simple. My daughters tank will have 2 strands of 6 LED's. Of the others, one might be a problem. I need to build another terrestrial plant light. That one will be either 18 or 24 LED's.

The only real unknown for me right now is getting the PCB's printed. I have been looking at ITead and Seeed Studios. The price looks good.

I'd like to say thank you for your detailed posts here. I have already read through them.
estill is offline   Reply With Quote Quick reply to this message
Old 08-22-2013, 04:22 AM   #4
O2surplus
Planted Tank Enthusiast
 
O2surplus's Avatar
 
PTrader: (4/100%)
Join Date: Jan 2010
Location: yorba linda, ca.
Posts: 538
Default

Quote:
Originally Posted by estill View Post
Thank you for the reply. I've only looked at voltage regulators for 12V applications. That makes that piece simple. My daughters tank will have 2 strands of 6 LED's. Of the others, one might be a problem. I need to build another terrestrial plant light. That one will be either 18 or 24 LED's.

The only real unknown for me right now is getting the PCB's printed. I have been looking at ITead and Seeed Studios. The price looks good.

I'd like to say thank you for your detailed posts here. I have already read through them.
You're welcome. Have you already designed a PcB, but don't know the remaining steps to get them produced? If so, let me know,and I can direct you how to do it. It's really very easy to do, once you're shown how.
__________________
225 Gal, Glass "Reef Ready" w/ twin Iwaki Pumps & 2 Ocean Clear inline filters. Custom 320 watt LED Lighting system utilizing a 6' Maker's Heat Sink, 12 BridgeLux Vero 18's,3 purpose built 5 channel A6211 Led driver/Controllers, and a 20lb CO2 system w/ Milwaukee Ph Controller.
O2surplus is offline   Reply With Quote Quick reply to this message
Old 08-22-2013, 02:18 PM   #5
jeffkrol
Planted Tank Enthusiast
 
PTrader: (0/0%)
Join Date: Jun 2013
Location: WI
Posts: 854
Default

Quote:
Originally Posted by estill View Post
It's about time for my yearly post to this site. This time around I'm looking to DIY some LED's for a small tank. My little girls want her own aquarium and she wants glofish. This isn't my first go-round with LED's or Arduino (Here is a short video of what I've been working on for a slot car drag strip http://youtu.be/KPKZ3NmU4WM)

My end goal is
  1. two sets of LED's: white and Violet
  2. Fade on\off at various times
  3. the ability to override the programmed levels

Let me preface the rest of this with: I'm not sure how much I should like out to other websites. So, I'm not going to link to anything. I can provide real links if necessary.

This project is going to spin off into probably three more controllers in the near future, so I'm trying to get the first one right. My thought is to go as far as to design and have PCB's printed making the next ones easier. With that out of the way here are my thoughts and questions:

I can only envision needing 3 channels of LED's, on any of these, so I found the Pro Micro based on the ATmega32U4 chip. This is nearly identical to the Arduino Pro Mini, but it has on-board USB. The way I see it I need 3 PWM outputs, and through the infamous auction site I can get them for less than $10 a piece. Naturally I need some sort of a clock so again a RTC from China.

For LED drivers I'm thinking the Mean Well LDD. They all have the same foot print, so I can use different model to control input voltages and amperage's without changing the underlying PCB. This leads me to my first question. How strict do I need to be in matching the input voltage to the aggregate Vf of the LED's? Are these going to generate heat if I give them too much power?

The final piece of the puzzle is avoiding multiple power supplies. If my research is correct I can use a DC-DC Switching converter, to step down from 24V/36V/48V to 5V for the Arduino and RTC. I have found the Traco Power TEL 3-xx11. Replace the xx with 20, 24, or 48 for the corresponding nominal voltage. These will give me 600 mA at 5v from a range of voltages. Does anyone have experience with these? Will they generate much heat?
hmm just get a typhon from Steves LED's (4 channel fade-in fade out 5V PWM out) for $50// Already has a RTC
add 5vPWM Meanwell drivers and a PS..
as to 18-24 LED's depending on wattage serial/parrallel strings are no problem

I run 15 @1W w/ 3 parallel strings for a whole 1A @ 5x3.3V=16.5v

only problem is one fade cycle per channel.. but I believe they can be "ganged" to achieve multiple durations
jeffkrol is offline   Reply With Quote Quick reply to this message
Old 08-22-2013, 05:52 PM   #6
estill
Algae Grower
 
PTrader: (3/100%)
Join Date: Jan 2007
Location: Tacoma, Washington
Posts: 25
Default

I haven't finalized the PCB. I have been using the bread board and Schematic functions of Fritzing for my Slot Car track, so I figured I would let it do the work for the PCB this time.

After sleeping on it, I can put both the 5V regulator and the DC-DC converter on the PCB. The footprint of the converter is big enough to contain the holes for the regulator. To try and put this back into english: The PCB is simply copper and mounting holes. I can have the copper printed to use both the DC-DC converter and voltage regulator. The mounting holes would be placed so only one component will fit on the PCB.

I have looked at the typhoon. For 1 it is a good price. I'm looking at probably 4. So far I have purchased 5 arduinos, 5 RTC, and 5 voltage regulators, and I'm only into this project $60.

I also don't want the LCD screen.I want to keep this as hidden as possible.

Last edited by estill; 08-22-2013 at 06:00 PM.. Reason: consolidating posts
estill is offline   Reply With Quote Quick reply to this message
Old 08-22-2013, 08:36 PM   #7
jeffkrol
Planted Tank Enthusiast
 
PTrader: (0/0%)
Join Date: Jun 2013
Location: WI
Posts: 854
Default

Quote:
Originally Posted by estill View Post
I have looked at the typhoon. For 1 it is a good price. I'm looking at probably 4. So far I have purchased 5 arduinos, 5 RTC, and 5 voltage regulators, and I'm only into this project $60.

I also don't want the LCD screen.I want to keep this as hidden as possible.
Yes not needing the LCD is an issue.. As to the rest.. That price seems err a bit low but I suppose it is possible..The batteries and RTC modules take a chunk of that 60..

Carry on...
jeffkrol is offline   Reply With Quote Quick reply to this message
Old 08-22-2013, 09:06 PM   #8
estill
Algae Grower
 
PTrader: (3/100%)
Join Date: Jan 2007
Location: Tacoma, Washington
Posts: 25
Default

Quote:
So far I have purchased 5 arduinos, 5 RTC, and 5 voltage regulators, and I'm only into this project $60.
Just so I am clear I have spent $41.88 and $16.99 on the above list of items, through the infamous auction site. If you are willing to wait for the shipping from China, the price comes down substantially.
estill is offline   Reply With Quote Quick reply to this message
Old 08-22-2013, 10:25 PM   #9
estill
Algae Grower
 
PTrader: (3/100%)
Join Date: Jan 2007
Location: Tacoma, Washington
Posts: 25
Default

A quick in-progress picture. Still working on labels. All that is needed is a header to attach the wires to my buttons. I'm thinking I may try to include a space for a relay. One of my CO2 solenoids is 24v DC.

estill is offline   Reply With Quote Quick reply to this message
Old 08-23-2013, 04:30 AM   #10
O2surplus
Planted Tank Enthusiast
 
O2surplus's Avatar
 
PTrader: (4/100%)
Join Date: Jan 2010
Location: yorba linda, ca.
Posts: 538
Default

So, are you planning to etch a two sided PcB at home? or do you want to get them made offshore?
__________________
225 Gal, Glass "Reef Ready" w/ twin Iwaki Pumps & 2 Ocean Clear inline filters. Custom 320 watt LED Lighting system utilizing a 6' Maker's Heat Sink, 12 BridgeLux Vero 18's,3 purpose built 5 channel A6211 Led driver/Controllers, and a 20lb CO2 system w/ Milwaukee Ph Controller.
O2surplus is offline   Reply With Quote Quick reply to this message
Old 08-23-2013, 02:17 PM   #11
estill
Algae Grower
 
PTrader: (3/100%)
Join Date: Jan 2007
Location: Tacoma, Washington
Posts: 25
Default

Offshore. I'm not going to drill all those little tiny hols.
estill is offline   Reply With Quote Quick reply to this message
Old 08-23-2013, 09:46 PM   #12
estill
Algae Grower
 
PTrader: (3/100%)
Join Date: Jan 2007
Location: Tacoma, Washington
Posts: 25
Default

Sleeping on this project did wonders for clarifying things.

I can fit 4 LED drivers easily on a 10x10cm PCB. That's 24 LED's at 24V. A simple (cheap) voltage regulator will run the rest. I removed all the garbage around trying to run at 48V.

By freeing up space on the PCB I decided to add in controls for my Co2 solenoid. It didn't take much research to find out that a MOSFET is the preferred method to control it. So I added a section for the MOSFET, and a diode, resister, and fuse to protect things.

The big mess of copper traces in the lower right corner is getting the remaining pins exposed. I haven't decided how I want to add external controls. I have a hunch that it is going to be different each time I want to use this board. So I put wired in a place to a header that I can plug into for buttons or even a sub board.

estill is offline   Reply With Quote Quick reply to this message
Old 10-15-2013, 08:40 PM   #13
estill
Algae Grower
 
PTrader: (3/100%)
Join Date: Jan 2007
Location: Tacoma, Washington
Posts: 25
Default

I have been slowly connecting parts and working on my code. I'm at a point where I can report back and share what I have learned. The first thing I learned is how quirky the Arduino code can be. My code is broken down into little pieces but fairly straightforward. I'm using the TimeAlarms header to trigger my events, and it uses numbers to represent hours, minutes, etc. So I have to convert all of the time stamps into discrete variables. This makes the readability nice in some areas and bad in others.

The overview of my code is as follows:

during the setup figure out where in the day you currently are

The loop simply watches for is an LED is supposed to be changing, a button is pressed, or what time is it. (TimeAlarm uses a different delay() function).

If an LED is fading; calculate where is sequence the LED is suppoed to be and set it.

If a button is pressed, one of 4 things happens: make it brighter, make it dimmer, flash the bank of LED's being changed, or reset all the LED's to their programmed value.

If an event need to be setup. I build out a couple of arrays indicating an LED needs to be changed, the start and end times, as well as the starting and ending values.

If you'd like any more details, please ask and I will try to answer them.
Attached Files
File Type: txt LED_Driver.txt (11.0 KB, 16 views)
estill 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:
If you do not want to register, fill this field only and the name will be used as user name for your post.
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 12:06 PM.


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