Jump to content

DIY LED Drivers with Microcontroller


Brian Ward

Recommended Posts

Chad et al,

 

So I'm planning to have 4 fixtures. Ideally all 4 would function independently of each other so, in the event that I had to sell them off, I could sell 4 separate items rather than something that is pieced together and needs a lot of work to get running in another environment. Alternatively, I'd like to set it up as 2 logical fixtures with 2 pendants in each one.

 

Chad, what's your timeline for getting a microcontroller running? Ideally I'd like to have my LED fixtures installed in July but that may be aggressive.

 

How would the microcontroller interoperate with my neptune controller?

 

Are there any threads or articles on this?

Link to comment
Share on other sites

  • Replies 62
  • Created
  • Last Reply

Top Posters In This Topic

I didn't read everything from the other thread so please forgive me for my ignorance. I didn't get what the micro controller will do other than dim the lights.

 

The APEX can do that fairly easily with it's variable voltage output ports. Using a LED power supply that accepts linear voltage seems much simpler than one which requires a PWM signal. If resale later is a factor, this would be even more useful as the new owner can just use a simple $1 pot and $3 wall wart (probably even have one laying around from old electronic gadget) instead of having to understand and own a PWM signal generator.

Link to comment
Share on other sites

As far as a timeline goes, I started ordering microcontroller parts (arduino mega, a bunch of random components, GLCD, breadboard, small LED, etc.) last week, I think the only hardware thing left for the microcontroller is an RCT.

 

I honestly didn't have a goal date to have it all working by (just my current project), but I imagine that I will have it "running" without the GLCD within a few days of working on it. It is some of the more complicated functions and programs that I think will take me a little longer, although I am outlining some of those functions now. I will take the SWAG of having it completely operational by the end of the summer.

 

You could link the two to do really anything that you wanted, depending on the level of interaction. From a simple level you could just have your neptune tell a DC8 to turn the unit on, or you could get more complicated by sending signals between the two or other things. How much interaction do you want?

 

Here is a relatively simple thread I found on RC http://www.reefcentral.com/forums/showthread.php?t=1987110

 

And TheFishMan65's summary post in the DIY driver thread on RC (it is about half way down) http://www.reefcentral.com/forums/showthread.php?t=1759758&page=47

 

 

Link to comment
Share on other sites

I didn't read everything from the other thread so please forgive me for my ignorance. I didn't get what the micro controller will do other than dim the lights.

 

The APEX can do that fairly easily with it's variable voltage output ports. Using a LED power supply that accepts linear voltage seems much simpler than one which requires a PWM signal. If resale later is a factor, this would be even more useful as the new owner can just use a simple $1 pot and $3 wall wart (probably even have one laying around from old electronic gadget) instead of having to understand and own a PWM signal generator.

 

Dave,

 

This is the feature set Chad is shooting for:

 

1) 11 PWM LED channels to simulate a Gaussian shaped brightness from a translating point in the fixture throughout the day - basically a fancy sunset, sunrise, and varied "sun position" -> readout of time and status on GLCD

2) Cloud simulation -> on/off control and readout of status on GLCD

3) 1 PWM channel for a lunar cycle -> on/off control and readout of status on GLCD

4) Adjustable color temperature -> control and readout of status on GLCD

5) Adjustable maximum brightness -> control and readout of status on GLCD

6) Manual control of the "sun position" -> control and readout of status on GLCD

7) DT temperature -> display on GLCD (mostly because it will be easy to do and visible)

Link to comment
Share on other sites

haha ok so the micro controller is going to just dim the LEDs but pretty much individually! :eek:

 

Ok I get it now. Maybe I'll hold off on soldering mine together into a string and see how this build goes. :clap:

Link to comment
Share on other sites

Guest thefishman65

That is a good RC thread for what you want. Will the APEX do everything you want? That will help re resale.

 

Otherwise your first design issue. One controller in each of 4 modules, 2 in the 2 pendants, 1 with lots of wires?

Link to comment
Share on other sites

That is a good RC thread for what you want. Will the APEX do everything you want? That will help re resale.

 

Otherwise your first design issue. One controller in each of 4 modules, 2 in the 2 pendants, 1 with lots of wires?

 

If I had an Apex I would go with that. Unfortunately, I don't. I have the Aquacontroller III. I'm not looking to invest another $300-ish in a new controller, so I think building my own controller will be the way to go.

 

I'm thinking about the wiring... looking for connectors to build into the pendants to make things neater.

Link to comment
Share on other sites

Guest thefishman65

If you are doing your own then a PWM will be easier IMO.

 

So IMO the ELN have an advantage at resale in the people can understand then and get replacements easily.

 

The DIY driver's advantage is price, but maybe harder to resell. Also at resale you may have an issue if you split them with the 24 volt supply

Link to comment
Share on other sites

If you are doing your own then a PWM will be easier IMO.

 

So IMO the ELN have an advantage at resale in the people can understand then and get replacements easily.

 

The DIY driver's advantage is price, but maybe harder to resell. Also at resale you may have an issue if you split them with the 24 volt supply

 

But if I design in a current-limiting pot as the ELNs do, then I'd just need to grab an extra couple of power supplies to be able to break up the sets.

 

I think DIY is going to be the way to go, just need to figure out how to go about it. When I get some time, I'll dig into those threads linked above.

Link to comment
Share on other sites

haha ok so the micro controller is going to just dim the LEDs but pretty much individually! eek.gif

 

Ok I get it now. Maybe I'll hold off on soldering mine together into a string and see how this build goes. clap.gif

 

Nah... I had planned on 5 LEDs in each string blush.gif I briefly considered dimming LEDs individually, but logistically, it gets complicated on many levels very very fast.

 

If I had an Apex I would go with that. Unfortunately, I don't. I have the Aquacontroller III. I'm not looking to invest another $300-ish in a new controller, so I think building my own controller will be the way to go.

 

I'm thinking about the wiring... looking for connectors to build into the pendants to make things neater.

 

How many wires and what capacity? Amphenol makes some good parts for this application.

 

If you are doing your own then a PWM will be easier IMO.

 

So IMO the ELN have an advantage at resale in the people can understand then and get replacements easily.

 

The DIY driver's advantage is price, but maybe harder to resell. Also at resale you may have an issue if you split them with the 24 volt supply

 

Something to consider would be to mount and solder the LED strings in place and put V(+) and V(-) plugs in place such that the LED hardware is completely separable from the driver and controller hardware by unplugging it. That way reselling could just be spending 60 dollars on Meanwell drivers per fixture and calling it a day.

Link to comment
Share on other sites

Something to consider would be to mount and solder the LED strings in place and put V(+) and V(-) plugs in place such that the LED hardware is completely separable from the driver and controller hardware by unplugging it. That way reselling could just be spending 60 dollars on Meanwell drivers per fixture and calling it a day.

 

This is basically what I'm thinking. I was looking at this (4-conductor, so 1 plug for both strings) since it's fairly inexpensive:

 

http://www.mcmaster.com/#multipole-connectors/=c4sggq - Weatherproof Low Voltage DC Pin-and-Socket Connectors

I can use that to daisy-chain 2 fixtures (maybe) so I just supply power to one end of the fixtures.

Link to comment
Share on other sites

Guest thefishman65

Each string needs it own connection back to the dimmable driver. So it goes back to where are the drivers mounted and where/how many the controller is.

Link to comment
Share on other sites

Each string needs it own connection back to the dimmable driver. So it goes back to where are the drivers mounted and where/how many the controller is.

 

Right. So it would basically go back to how many LEDs end up in the string and how much granularity do I want to control them all.

Link to comment
Share on other sites

Guest thefishman65

I actually see it as how many wires cross between pendants. I was going to go with 2 pendant and changed to one so that I did not have lots of wires going back and fourth.

Link to comment
Share on other sites

So do these microcontrollers come with simulation software, or are you dropping this setup in pspice to make sure everything works correctly? Or are you just going to breadboard it up and check it out?

Link to comment
Share on other sites

I don't know of simulation software (if you find some, I would love to see it).

 

On this site you can download the software to use on your computer, you can upload your "sketch" to the device and it run the program loop. There is pretty good documentation on the code, it is C based (oddly the one programming language I can claim to sort of know!). A bunch of guys posted their sketches on RC here.

 

I had planned to breadboard it up using standard small LEDs mounted on the breadboard and driven by a PWM channel to represent a single string. That should be enough to let me know that I have it working correctly.

Link to comment
Share on other sites

http://www.virtualbreadboard.net/

 

Potential simulation software. I haven't had a chance to check it out well, but it looks promising.

Link to comment
Share on other sites

All of my hardware is ordered now. Not sure when I will actually get most of it, though, shipping is via the slow boat from China (I think literally in this case).

 

I also started creating the main loops in my code. Not sure if it will end up working out or not, but it compiles without errors currently :) That is a start!

Link to comment
Share on other sites

A question on energy savings.

 

I just did a quick calculation and it looks like I'm going to go from 500W to 150W over my main tank and from 500W to 120W over my frag tank (based on 3W/LED and replacing 2 250W MH bulbs on each tank). My calculations show this being a 2.8kW-h per day and 3.04kW-h per day savings (based on running the fixtures for 8 hours/day). Which translates into a savings of about $26/mo or $312/yr on the electric bill. This translates into about 4 years to recover the investment (ignoring time value of money).

 

How much additional savings are people seeing from reducing the amount the chiller runs and the amount of air conditioning needed in the house?

Link to comment
Share on other sites

Guest thefishman65

How much are you paying yearly for light bulbs?

Link to comment
Share on other sites

Guest thefishman65

Payback down to 3.2 years :).

 

I can't answer on the other cost since I never used MH.

Link to comment
Share on other sites

I have a 1/3hp chiller. Assuming that runs for 40 minutes out of every hour (probably close) for 8 hours a day, that's another 144kW-h/mo which is $21.41 per month in electricity.

 

So that gets me to almost $50/mo off my bill. Since I vent the chiller into the house, I should also save a bit on my house air conditioning.

Link to comment
Share on other sites

I know how you can figure this out! Turn off all your MH lights for a month and then see what the electric bill is! :laugh:

Link to comment
Share on other sites

And TheFishMan65's summary post in the DIY driver thread on RC (it is about half way down) http://www.reefcentr...1759758&page=47

 

So I read this summary (but didn't go through all 100+ pages of the thread) and it didn't really help. I investigated the CAT4101 chip and using that at $3/ea seems like a no-brainer.

 

So do you just connect the CAT4101 to a power source and the LED string? I see that you need to use a resistor to set the current output and then you can hook the PWM pin to a PWM output on the audrino.

 

Mostly, I was looking for a diagram of fishman's 8-driver board. I'm sorta thinking I'd do a 6-driver board w/ an audrino nano (which has 6 PWM outputs) for each fixture. I can also provide a control line between fixtures to synchronize across them or allow them to function independently.

 

Are there schematics posted somewhere?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...