LM317 and PWM grounds

lm317pwmrgb

I have a question regarding the LM317 and PWM. My circuit receives +12v and has three grounds (R,G,B) that are PWM. I need to drop the voltage down to 3.2 volts from the 12 volt source.

NOTE: I know this could be done with resistors, but that is not what I want to do. Also, I cannot change the 12 volt source or the grounds.

Here is my circuit:

enter image description here

I am using a LM317 to take the 12 volt source and dropping it down to 3.2 volts. The issue I am having is when I run the LM317 to ground after the R1 resistor. Since R, G, and B are PWM grounds, will that impede the LM317 and not result in a nice 3.2 volts?

Best Answer

Your circuit as listed will not work. The red LED may come on, and may be damaged, the others won't. If the circuit works as you think it ought to, either the blue or the green (almost certainly the green) LED will burn out. Your overall circuit apparently looks like

schematic

simulate this circuit – Schematic created using CircuitLab

where the 3 transistors are your PWM drivers.

First, your LM317 resistors are set up to provide 2 volts, not 3.7.

Second, the regulator will only work when at least one of the LEDs is driven ON, and the LM317 turn-on behavior is not specified for high-speed operation. But let's assume, with no justification, that the regulator does, in fact, turn on cleanly.

Third, with one or more LEDs on, the bottom of the 330 ohm resistor will not be at ground. Instead, it will be held at (roughly) .7 volts. This is based on the Vishay 1N4148 data sheet http://www.vishay.com/docs/81857/1n4148.pdf which indicates a forward voltage of ~0.5 volts for an Iadj of 50 uA, plus an estimated 0.2 volt drop on the selected PWM transistor. This will produce a regulator voltage of about 2.7 volts. Assuming that the red LED needs 2 volts, this will produce a voltage drop across your 15 ohm resistor of about 0.7 volts, and an LED current of 50 mA. You have not specified your LED, but this may be too much.

Fourth, with a nominal regulator voltage of 2.7, and a 0.7 volt drop in the diode/PWM switch, the blue and green LEDs will effectively have about 2 volts applied to them, and this is not enough to turn them on.

Fifth, if you change your resistors to give you a nominal 3.7 across the blue and green LEDs, you risk one or both of them burning out. Note that green LEDs usually have Vf slightly lower than blue, so if the voltage for the blue is just right, the green will draw much more current, dissipate much more power, and self-destruct. Driving an LED from a fixed voltage with no limiting resistor is a classic way to destroy an LED. Go read up on it. In fairness, the diodes will (to some degree) act as current limiters, as will the PWM switches, but you cannot count on this as being sufficient.

As you have noted, using one resistor per LED can result in an awful lot of resistors if you have a large number of LEDs. True enough. And you can try to play tricks with your circuits to use fewer resistors. But you need to ask yourself if a simpler circuit is worth dead LEDs. And keep in mind that LEDs do not have perfectly consistent Vf/brightness curves, so even if you can keep from killing LEDs, you can count on uneven brightness across your display.

You MUST control LED current for each LED.