I want to drive some larger LEDs for a bar display. To give my Arduino-on-a-breadboard some decent drive power I purchased two of these "RGB amplifiers" to help me drive the following 10 watt LED chip:
These devices are extenders for a 12V PWM based controller like this one:
http://www.amazon.com/SUPERNIGHT-TM-Wireless-controller-Controller/dp/B00CM4Y58K/
But I figured they could be driven by the PWM signal of an Arduino at 5V as well, and I was right. I have a basic proof of concept project that is working fine (see attached image), and it increases brightness of the LED as the software lowers the PWM rate (255 is off, the LEDs cathodes are grounded when the signal goes low). The LEDs are at 12V. The Arduino-on-a-breadboard is running at 5V.
What I am trying to figure out is how this thing works. The "amplifier" is simply an isolated N-channel MOSFET. My understanding here is when the PWM signal goes low, it connects the cathode of the LED directly to ground. So it may only be connected directly to ground for a small percentage of time, but during that time it is shorted to ground, right? How does this limit current? It seems like current should go through the roof if only for a short period of time. But I have my power supply limited to 2 amps and it does not trip. Is this safe? I don't have a schematic of the board, but I do have a good image of it and the circuit looks simple to me. The inputs go through optoisolation, there is a protection diode on the optoisolators, then it goes right to a N channel MOSFET that connects the outputs to the power supply. See attached image for the board itself. The two main parts on this board:
http://www.daysemi.com/Upload/Product%20Doc/Datasheet/DTU09N03.pdf
http://www.everlight.com/datasheets/EL817.pdf
Code (simple):
enum PinAssignments {
pinRed = 9,
pinGreen = 10,
pinBlue = 11,
};
void setup() {
pinMode(pinRed, INPUT);
pinMode(pinGreen, INPUT);
pinMode(pinBlue, INPUT);
}
void loop()
{
for (int i=255;i>180;i--)
{
analogWrite(pinRed, i);
delay(30);
}
for (int i=180;i<255;i++)
{
analogWrite(pinRed, i);
delay(30);
}
analogWrite(pinRed, 255);
for (int i=255;i>140;i--)
{
analogWrite(pinGreen, i);
delay((20));
}
for (int i=140;i<255;i++)
{
analogWrite(pinGreen, i);
delay((20));
}
analogWrite(pinGreen, 255);
for (int i=255;i>140;i--)
{
analogWrite(pinBlue, i);
delay((20));
}
for (int i=140;i<255;i++)
{
analogWrite(pinBlue, i);
delay(20);
}
analogWrite(pinBlue, 255);
}
I simply ramp up and then ramp down red, then green, then blue. Simple test. The power supply shows current ramping for each color from 10mA up to about 550mA and dropping back down afterwards (I go less deep into PWM for the red LEDs, current for the red LEDs ramp up faster because of the lower voltage drop). So it behaves exactly like I hoped it would. I just don't understand why. It ran for 8 hours without wrecking any of the LEDs.
Side question: why does an LED controller like this need isolation and protection diodes? Is this because of the possibility someone might try to drive an inductive load with it?
Thank you.