DIY LED Moonlight Choice

The friendliest place on the web for anyone with an interest in aquariums or fish keeping!
If you have answers, please help by responding to the unanswered posts.

Jimbo7

Aquarium Advice Addict
Joined
Feb 20, 2008
Messages
1,996
Location
Minneapolis, MN
Eventually, once I hurdle my current LED hood hang-ups, I want to add another series of moonlights with an arduino controlling everything. Being bored at work, I'm planning ahead. Most of the commercial fixtures have 460-470nm LEDs, so i was looking at these little guys:
5mm High Flux LED HF5-B5590 Specifications
What do you guys think? What would be the best way to wire them seeing as they only need 20mA? I still have to do a lot of research on Arduinos, maybe i can just add some resistors to regulate to 20mA, but i'm guessing.
 
That is a handy little tool you got there. Very nice. Any opinions on color then and such then?
 
I used blue for my moon lights. Make sure you go with a diffused led, you wont regret it.

I used 20ma resistors, just one actually. It goes right before the first led. I think the color code was gold, brown, purple then yellow. It all depends on your power supply.
 
Hey Jimbo, if you're going to be running them from an adurino, you're going to have a 5V regulated power source, so that'll probably be your source for the LEDs. Optimally, you don't want the adurino to be powering the LEDs, but rather powering a transistor that powers the LEDs, so that not much current actually passes through the microcontroller. (Then again, if it's only one or two LEDs, it doesn't make a big difference.) (I'm sure you know, but for those of you who don't, transistors are basically switches, like relays. They receive a low current "switch" signal, usually from the microcontroller, then they close the switch, so that a larger amount of current can flow through. Think about it, how would a tiny microcontroller control a huge electric motor...? It's by using transistors, and other things that act similarly)

I use this site to calculate my resistors. I could do it by hand, but why make it hard on yourself.

The Best Current Limiting Resistor Calculator for Led's

Since (I'm assuming) you're going to do something similar to me, you shouldn't have to worry about diffused LEDs, as the dimming would be done by the adurino, and you can get any level of "brightness" you want. For your LEDs, the "voltage drop" would be 3.5 V, and the desired current would be 20 milliamps.

Oh and LowRyder, those colors are for a 470 Ohm resistor. It's read the opposite way you wrote it, and the gold is the "tolerance". Yellow is 4, purple is 7, and brown is 1, meaning one power of ten, so 4...7...0 or 470 Ohms, with a +- 5% tolerance. Check the wiki. http://wiki.xtronics.com/index.php/Resistor_Codes
 
Yea, i'm doing something similar. Which microcontrollers do you use? I know you said you didn't use Arduino, its just the only one I am familiar with, and they seem to have a friendly interface. I'm just not sure which arduino/any other controller would be the best for my needs.
 
I used an Amtel AtMega8. For your choice, I'd definitely use one that uses 5V, as you need 5V anyway. Also, to dim the LEDs, you need something called PWM or pulse width modulation. The more PWM you have, the easier of a time you'll have. I would have loved to have had one or two more for my project. The AtMega8 has three, hence why I'm using 3 LEDs lol. I could have used more, but it gets a little more complicated, and I didn't need any more than three anyway. Basically every PWM channel is a separate "dimmer", so it's easier to have a bunch of different channels rather than trying to have a few LEDs share the same channel. However, I have a schematic that you can use to use as many LEDs as you want with only 3 PWM channels. (I didn't make it, an electrical engineer did, so I'm sure it works awesome :p, and it can be changed to work with any number of PWM channels)
 
I have two of these controlling two strings of 6 3w Cree LEDs.
3023-D-E-1000P Wired BuckPuck - LED Supply.com
Could I clip off the pot on there and wire it straight to the arduino, or are they two different ways of controlling the dimming?
I did tons of research into basic mechanics and wiring, but im still getting into stuff like this, so pardon my ignorance.
 
Yeah, that's how I'd control the dimming. Getting to the pot might not be that fun, but that's the way it's going to have to be. You're still going to use the PWM, but since you only have 2 of those things, you really only need 2 channels of it. I've never thought of controlling LEDs this way, but it's definitely a good idea.

EDIT: Or you could just get a little servo and manually hook it up to the POT, but that might involve even more work lol.
 
Not quite, Pucks require both the PWM and a reference voltage, so it is best to use a transistor and not conect directly to the PWM

Collector to CTRL
Emitter to REF
Base to Arduino

small switching PNP transistor is fine
 
Schematic (not my original but it does the jobe better than I can in paint lol)
 

Attachments

  • puck.jpg
    puck.jpg
    5 KB · Views: 192
Schematic (not my original but it does the jobe better than I can in paint lol)

Sounds like what I want, but I don't fully understand this schematic. I gotta continue my research. Will this still let you have full dim control?
 
Back
Top Bottom