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?

  • \$\begingroup\$ What are D1, D2 and D3 for? Your schematic is also very confusing, having ground at the top and +12V at the bottom. \$\endgroup\$ Jun 8, 2015 at 9:05
  • 1
    \$\begingroup\$ Your LM317 schematic does not match normal conventions like: input voltage on the left, output on the right and very important: ground at the bottom ! I am talking about the way you DRAW it, not how the components are connected. \$\endgroup\$ Jun 8, 2015 at 9:41
  • 2
    \$\begingroup\$ Wow, give me a break, I didn't read the book on normal conventions. I'm a hobbyist. I thought it was time to move away from prototyping on a breadboard and using a schematic software to better understand what I was doing. Go back to when you first started drawing circuits, guaranteed you were no diamond. \$\endgroup\$ Jun 8, 2015 at 9:48
  • 2
    \$\begingroup\$ @user2067005 Please try to take it as constructive criticism. Your question is easier to answer when people can understand your schematic; that means following the same conventions as everyone else. You may well find it eaasier to comprehend yourself, too. \$\endgroup\$ Jun 8, 2015 at 10:05
  • 3
    \$\begingroup\$ @Nick Johnson That is exactly what it was. I am willing to answer any question on a circuit I can answer as long as the circuit is drawn in an understandable way because then I can see what's going on quickly. If the drawing is incomprehensible, I move along, not answering your question. So user2067005, it is in your own interest as well. I have ALWAYS tried to draw my circuits in a comprehensible way, I looked at MANY professionally drawn schematics how it's done and just copied that. It's not difficult. Being a hobbyist is no excuse, I am a hobbyist as well as a professional. \$\endgroup\$ Jun 8, 2015 at 12:03

2 Answers 2


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


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.

  • \$\begingroup\$ Thanks for this information filled answer you have given me. I was attempting the idea that if you use a coin cell battery, you don't need a resistor. So I brought the voltage down with the LM317. I can't thank you enough for actually helping me and not criticizing what I have provided/done. I think ill recreate the circuit just using resistors for stability and reliability. Thanks! \$\endgroup\$ Jun 8, 2015 at 14:03
  • \$\begingroup\$ Please note that in the coin-cell circuit there IS a resistor ! It is the coin-cell itself as that has a (relatively high) series resistance. Thanks WhatRoughBeast for taking the trouble to re-draw the circuit so that we can discuss it ! All the critisizm was meant in a supportive way, we're only trying to help :-) Tip: Search Google images on: "led driver circuit" you will see loads of examples how to drive many LEDs safely. \$\endgroup\$ Jun 8, 2015 at 14:29

You don't have three grounds - you have one ground, and three LEDs that are PWM switched.

As such, your LDO should be hooked up to ground, not to the cathodes of the LEDs. That's the first and most significant problem with your schematic as it stands.

You cannot use an LDO to drop the voltage to exactly the LED's forward voltage, because the forward voltage varies slightly with current, and also varies between LEDs. As a result, what works well with one LED might burn out another, or barely light it, and small variations in supply voltage will lead to huge variations in brightness.

The easiest way to limit current through an LED is to use a resistor, and some headroom on the voltage regulator. You say you don't want to do that, but don't specify why.

The other way to control the LED current is to limit it directly using some form of current limiter circuit. The easiest way to do this is to hook up your LDO as a current regulator instead of a voltage regulator, something like this:

enter image description here

This solution will require one regulator per LED, rather than one regulator total.

  • \$\begingroup\$ Thanks for you response. The issue I have is, I don't have a direct path to ground other than R-,G-,B- which as you know is PWM switched. Also, would it help if the 12v supply was already a regulated supply? The reason I don't want to use resistors is because that would involve a lot when RGB leds are in parallel. \$\endgroup\$ Jun 8, 2015 at 9:37
  • \$\begingroup\$ It would involve a lot of what when RGB LEDs are in parallel? \$\endgroup\$ Jun 8, 2015 at 9:42
  • \$\begingroup\$ Resistors. When dealing with SMD, ill run into a wattage issue. Which means resistors in series. I'm just trying to develop a solution with the least amount of components to deal with. \$\endgroup\$ Jun 8, 2015 at 9:52
  • \$\begingroup\$ I went on mouser and found the resistor values and wattage I needed for my circuit. I can take the resistor route if I have to now. It would be cool to know if the circuit I made works though. \$\endgroup\$ Jun 8, 2015 at 10:01
  • \$\begingroup\$ You're not going to beat three resistors for component count. And no other linear solution is going to dissipate any less (or more) power than the resistor solution. Your current solution won't work because the regulator has no reliable path to ground; a regulator per channel would work, however. \$\endgroup\$ Jun 8, 2015 at 10:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.