The Planted Tank Forum banner

Calling all DIY LED "Junkies" - Your opinions wanted!

41K views 155 replies 22 participants last post by  O2surplus 
#1 ·
I was bored to death at work today, so I designed this just to keep my brain busy and pass the time. It's a 4 channel LED driver- that's very similar to ones that I built in the past, but with a new twist. I integrated a micro-controller/ real time clock into the design that will allow full programmable control of each channel. The controller features an I2C connection that will enable multiple driver boards to be connected together to communicate with, and act as slaves to a "master controller," or simply wired up to leds and left to run a user defined LED dimming "sketch". The controller is programmed using the standard ARDUINO IDE. I see this design being a really great way to have high resolution control over large groups of leds, or as a "stand alone" driver contoller for Nano Tank led builds. I personally have 90 leds over my tank being driven and controlled in groups of 30. This set up leaves me with only 3 channels of control. If I built this design, I'd have 15 channels of control to play with and be able to create seriously high resolution dimming and other lighting effects. Does anyone else see a value to this design? Thoughts?

Here's a photo/schematic of the driver


 
See less See more
1
#3 ·
This would work really well with one of the "full spectrum" builds, particularly when dialing in good color rendering. Sounds like you could pretty much fine tune it like a stage light board to shift color intensities over time so you could have a nice crisp noon sun color, then fade in some deeper ambers and reds at sunset. It'd be a neat effect.

I wonder if you could program a few fast pulses for a brief thunderstorm sequence. Do you have that degree of time resolution?
 
#5 ·
Can You guys think of anything else I should add? I'm thinking that I'll add a transistor to switch the 12v output off/on. That way cooling fans can be controlled directly and can be programmed to follow the Off/on times of the LEDS. I"m also thinking that I should "breakout" more pins on the micro-controller chip so that all the analog inputs can be addressed and used. I can see a situation where someone may want to add a temp sensor to their LED rig, measure Ph, or add an LCD display. I guess the possibilities are only limited by ones imagination. I just want this gadget to be as feature packed as possible before I pull the trigger and order the PCB's
 
#7 ·
Don't you think the master should have a lcd screen? My ideal all in one would have:

Lcd
Buttons for menu nav.
Four drivers
Full Dimming, Sunrise/sunset on all strings
Movie mode (something like dimmed lights and back to normal after 2.5 hours)
Moonlight Control (Just an override for a daylight string to come on at night too)
Co2 control by timer, just low voltage, not 120V
Fan control by fixture temp

Not sure how practical all those requests would be, but ideally, the expansion would just have more driver strings. Have a Plug it in and go. I'd like to hear how the controller would work for expansion.

Is adding more strings in the code as simple as copying the code from the other strings and giving it a new designation or something along those lines? It would be nice if it was pre-programmed for a bunch of channels, like 12 or 20 separate strings.

Neat concept. I hope you make a few, whatever the final design.
 
#8 ·
I'm thinking that I'll probably keep this driver/ controller combo fairly simple or "modular" for some important reasons-Mainly, reliability and serviceability . The driver could simply be replaced in the event of a failure, rather than having to take down the entire "Tank Controller" and it's associated sub systems. I think It would be best thing to do as the more complicated tasks should be handled by a dedicated controller. This driver could just be configured as a "slave" to the dedicated controller. It would carry it's own programming and be made to function autonomously, and merely "report back" to the "master controller" via the "2 wire" I2C communication protocol. The "Master Controller" could then be made with all the "Bells and Whistles"and either be made from scratch or from a existing Arduino UNO and appropriate "shields".

I'm going to redesign the PCB to include what will amount to an ARDUINO PRO MINI + an DS1307 RTC on the board. All the pins on the Atmega 328 will be accessible, so that the end user will be able to go either "mild or wild" with additional connections and complexity. I'm not very good at writing code, so I'm not much help there, but I'll make sure the hardware connections are available for the coding "experts" to take advantage of.
 
#9 ·
So, I took my original design back to the drawing board, made a few changes, and came up with this- ( the board measures 80mm x 100mm)






I think this design has all the the elements needed to go from "mild to wild" with an LED build. Too many many features to list, but here's a partial rundown:

16 MHz ATMEGA 328P-AU micro-controller on board w/ ALL pins "Broken out for connections"

DS1307 "Real Time Clock" w/ back-up battery.

Standard "FTD1 Connection" on board (for programming purposes)

I2C connection ( for "2 wire communication" with other I2C enabled devices )

12 volt, 1.5 amp Voltage regulator ( for powering cooling fans ect..)

5 volt, 1.5 amp Voltage regulator ( provides power to Atmega 328 and CAT4101 led drivers.)

6 OnSemi CAT4101 led Constant current Regulators w/ up to 1000ma output.( will drive 6 - 8 leds per string, provided total led Vf does not exceed 25 volts.)

Analog current control for each CAT4101 ( 50ma - 1000ma adjustable )

Independent PWM dimming capability on a 6 CAT4101's.


I'm going to order a batch of these, build a few for myself, and retrofit them into my existing LED lighting system. I'll let you guys know how they perform.
 
#10 ·
Wow great design looks like this may be your masterpiece. You have really progressed past the early designs on RC. Independent led string control, relay control for stuff like Co2, Temp, and expandability. All the hardware is in place. I'm sure the sketches are already there that could be modified and cobbled together. Great job! I'm looking forward to the build. Subscribed.
 
#11 ·
Hey thanks for the compliments! This is the biggest PCB that the "Free-ware" version of EAGLE will allow. I had a lot of "fun" trying to cram all of the needed components into that space. I went with 6 CAT4101's since that is the maximum number of PWM outputs available on the ATMEGA 328. The CAT's may require additional heat sinking, but that's an easy fix, as I already have a few CPU coolers laying around. I'm sure there's plenty of Arduino "Sketches" already available that can make this driver to some really cool things, so I'll be searching for that while I wait for the PCB's to arrive.
 
#13 ·
That's excellent - this will allow for so much control! Much better than having a stand cluttered with jiggered-up gizmos. Also having the analog option is very convenient. That way you can use whichever dimmable driver you prefer with this. My issue with the Inventronics driver was that it was analog control. The only controller I could find was the DIM4 on LEDgroupbuy - a great unit but expensive. Great work!
 
#14 ·
I think there may be misunderstanding with regards to how the "Analog Dimming" works with this driver. The CAT4101 IC normally uses a "Sense resistor" ( labeled RSense in the chips spec) to set it's upper current limit. The Chip can output up to 1000ma maximum, and that is set by installing a 549ohm resistor between the "RSense" pin and ground. This is how the driver is normally set up. If one wished to run the chip at 700ma instead of 1000ma, they'd have to install a 768ohm resistor instead of the 549ohm unit. I found this method of setting the current very cumbersome, so I installed a 10k trimmer pot inline with a 549 ohm resistor. This makes the output current fully adjustable ( 50 - 1000ma ) and there's no further need to desolder/solder resistors to change the output current. With 6 CAT4101's on board, this driver will be able to handle up to 150 watts worth of leds, that's 6 - 8 3W leds per channel or 36 -48 3W leds per driver board. The beautiful part of this driver is, once the maximum current per channel is set, (using the Analog current Pots) Each of the six channels can be programmed to dim via PWM signals provided by the on board Arduino microcontroller.
I put in the order for the PCB's and they're already in production,so I should have them in my hands in a week or so. I'm going to build 3 of them for my own use and then maybe pass out a few to people with coding experience, that will hopefully be able to show us all - How to take full advantage of this design. I'm a total NOOB with coding so I could use the additional help. ( This is code speak- for getting "SINK" to chime in :))
 
#17 ·
I'll post the build files after I've built a few of these and see how they behave in the "real world" I don't want to release the design until it's proven. I tend to design, build, test and re-design a few times over until I'm comfortable enough to post the files for the "Final product".
 
#21 ·
Driving 10 watt leds shouldn't be a problem. All you'd have to consider the Vf of you particular 10 watt led. Most of them, that I've run across, have a Vf of around 12 volts, so you should be able to run 2 of them in series on each chip. Each CAT4101 is rated to handle up to 1000ma at 25 volts maximum ( 25 watts total), so driving (2) 10 watt emitters at 800ma would yield approximately 20 watts per string. That scenario would let you drive (12) 10 watt emitters from this driver design. I have personally used 2 CAT4101's wired in parallel to drive BridgeLux 50 watt emitters, so this driver design could be configured to drive 3 of those same 50 watt emitters.
 
#24 ·
Nope- the CAT4101 driver IC is only rated for 25 volts. That's why there's 6 of them on the board. The nice thing about shorter strings is more control or higher resolution when dimming.
 
#25 ·
Is there any cutoff for the CAT4101s? That is one thing about the Meanwells I don't like, they cut out at about 30% which is still pretty bright when driven at 800ma max.
Also I wonder about moonlight support. Something like 2-3 LEDs running off one channel fully dimmable would be nice.
 
#27 ·
There's no abrupt cut-off with the CAT 4101's. They can be made to dim to a fraction of 1%, provided the PWM signal frequency has been set low enough. 150Hz seems to be that magic number. It's too bad only 2 output pins on the arduino can be configured to PWM with a frequency that low.
 
#32 ·
Got an Email notification today telling me to expect a visit from "the Man in the Brown Van" sometime tomorrow. I guess I'll be doing some soldering tomorrow night and doing some tests, with pictures to follow.
 
#34 ·
The PCB's arrived from China today, so I took the time to solder one up tonight. First Impression- This is gonna be cool! I loaded the ATMEGA chip with the standard arduino "Blink" sketch just to make sure it works. All systems go! There's a red led tied in to digital pin 13, so verifying proper operation is as simple as watching for the "blink". I'll test out the actual driver section of the board sometime this weekend and post some pictures. Here's a photo of the finished driver, I paid a bit extra for "white" and I think it looks pretty clean. Let me know what you guys think.







Running the "BLINK SKETCH"


 
#37 ·
Looks good. I want one.
Thanks for the compliment- I'll send you one ( U.S. Customs doesn't scare me. It's only Canada for Pete's sake, not N. Korea.)


So what can this do? Six drivers, six channels? But you need to get the controller coded right?
I didn't want to design myself "into a corner", so- think of this as an Arduino UNO w/ a DS1307 RTC(with battery back-up) married to a 6 channel,150 watt led driver. All the pins, including an I2C connection are there. You can code this to operate however you like, and use jumper wires to make connections to additional components. I already have a 6 channel code written that includes independent start/stop times, fade duration, max intensity ect.. for all 6 channels. I'll use that code with mine for the time being. Other users may want to add increased functionality by adding an LCD, temp sensors, and control buttons ect... That's totally doable.

Are you putting an LED screen with buttons and the menus on it?

I didn't want to include those items in the actual PCB since they would raise the cost, add complexity, and make replacement difficult- in the event of a component failure on the PCB. "All in one" designs are great.....until some small part or sub-assembly "lets the smoke out" and your forced to scrap the entire PCB.

I noticed the green and red led labels are swapped.

Yeah- I swapped them since "green" normally indicates "good" or "go" and the opposite for "red". I already corrected the sikscreen layer to reflect the change.

:p
...
 
#38 ·
Hey- Thanks, You'll get one too!

I'm going to treat this design as a prototype, so I'll make changes to the design as we go. I'm open to whatever you guys want. I suppose, after we've had a chance to nail down some software, I could design a type of LCD and button "shield" that would plug in to the PCB to provide additional functionality. This will be a work in progress, but I'll have to stay as close to the original design, in order to retain "backward" compatibility.
 
#40 ·
Hey Thanks! LOL I nearly paid as much for shipping as the actual cost of the PCBs! But hey- I'm not patient, 10 days was pushing it for me! I got 10 boards for $25 + $10 for full E-Testing, + $10 for "white" + another $42 and change for express UPS shipping. That breaks down to about $8.70 per board, but who cares- It's just a cost of the hobby, right?

Assuming I can build all 10 to perfection, keep 3 for myself and send out 2 to the guys inline ahead of you, that leaves 5. So one will have your name on it.

Is that a 20x4 LCD with a serial connection? We could put those to use with this project, if they are. I'm sure that I've seen some good dimming code out there that would work great with an I2C enabled LCD. I'll have to hunt it down, as that's the direction I think we should be moving.
 
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top