Author Options:

circuit troubleshooting help Answered

Hi- First on an unrelated note, does anyone besides me see "A fatal, non-recoverable error has occurred" over on the Makezine forums when you try to sign in? I've been getting that for weeks! Anyway... I'm working on a variable power supply that uses a 317 to regulate the 18 volts coming from a laptop switching supply. There are two 5k 10-turn (for precision) pots with a switch so that you can have two "preset" voltages and switch between the two of them at will. There's a single output. There's also a little lamp (I used a micro mini 12v lamp instead of an LED because that's what I had) that goes on above the pot that's currently switched in. The circuit I built (schematic is below) seems to work more or less fine. 'cept there's two strange issues: First, although the pots are linear (not sure if that would make the difference or not), they seem to "flatten out" toward their upper range. The first six turns gets you from 1.2 to about 16.5 volts. Then the last four turns either don't change anything or they do so in _very_ fine increments so that you only get from 16.5 to just over 17 volts. That's in four whole turns of the knob. This happens for both pots. The second stange thing is that turning the non-activated pot will affect the current voltage. When you increase the resistance (turn the knob to the right), the voltage level actually drops! Conversely, turning it to the left will increase the voltage. Remember, this is the switched-off pot. The switched-on pot works as it should (barring the mentioned weirdnesses). It looks like how much the voltage changes depends on how many turns you've given the activated pot. I suspect this has to do with me using a SPDT switch instead of a DPDT and maybe some voltage / current bleeding through the lamps and into the adjust pin, or something. But I ca/n't figure out why the switched-off pot would do anything. Anyway, take a look at the schematic. Is there anything I've done wrong that I'm missing? Should I, um, switch (*cough*) to a DPDT switch (something like the second schematic)? I used the SPDT cuz that's what I had. Anyy help is appreciated, Thanks!


Thanks for the help. I see now that isolating the two parts (pots & lights) is the best way to go. I noticed the unwanted current path Patrick mentions shortly after posting this message. I ended up putting diodes between the pots and pin 1 of the 317, which fixed the problem to my satisfaction. The scale still behaves less than linearly, but I can live with it. Thanks again!

I was expecting the non-linearity to be caused by the excess current but I can see another problem:

Vout = 1.25(1 + R2 / R3)
(there is a more accurate formula but this will suffice here)

the best you can expect for Vout will be about 16.5V (as you have found) there is always a voltage drop across the regulator.

240 Ohm is the standard value for R3 but you can use other values

Transposing for R2:

R2 = R3 ((Vout/1.25) -1)

R2 = 240((16.5/1.25) -1)

R2 = 2.928k Ohm (you have a 5K pot which explains the non linearity at the top end)

Try re-calculating R3 using a 5K pot for R2

Transposing for R3:

R3 = R2/ ((Vout/1.25) -1)

R3 = 5000/((16.5/1.250) -1)

R3 = 410 Ohms

Try increasing R3 to either 390 or 470 Ohms to improve the linearity

The forward voltage drop of the diodes you have included will affect the potential divider (R2 and R3) slightly but I don't think it should matter much.

Hope this helps,

Pat. Pending

Thanks! I should have seen that myself. I think the forward voltage drop of the diodes is what's responsible for the output topping out at 16.5V. Does that seem right? A normal silicon diode has a forward voltage drop of 0.7V doesn't it? So with two of them, 1.4V on top of the 16.5 I'm getting is just about 18V. hurray for math. Anyway, 16.5 is more than enough, so I'm happy with it. Thanks again for the replies.

The diodes will only affect the bottom end of the scale. They will lift the minimum voltage by about 0.7Volt. Although Vout can be as high as 37V the input voltage needs to be higher still in order to achieve this. There will always be some voltage dropped across the regulator between 1V and 2V depending on temperature and load current. So a Vout of 16.5Volt with a Vin of 18Volts is perfectly normal. I made a mistake in my earlier post when I referred to R2 and R3 as a potential divider. Although this looks like a potential divider it isn't. The voltage across R3 is a constant Vref (1.25V) maintained by the regulator. Cheers, Pat. Pending

There is an unwanted current path here:
Current will flow from the 18V rail, through lamp 2, R5, R2, R1, and S1 to ground.
The magnitude of the current will be increased as R5 is reduced. The larger this current is the greater the voltage drop across R1 will be. As Vout is a function of the R3 and R1(or R3 and R2) potential divider, so an increase in voltage across R1 Causes pin 1Voltage to rise and Vout to increase.

Removing this current path will also sort out the non-linearity towards the top of the scale.


Pat. Pending

. If that's the case, then you should be able to use the DPDT switch, driving the pots on one pole and the lamps on the other (as shown in your second dwg). . If that doesn't work, the only thing I can think to do is yank the lights out.

> they seem to "flatten out" toward their upper range . Not sure, but it sounds to me like you need audio (log) taper pots. Just about any 5K audio pot should work to verify whether that's right or not. But first I'd look at ... . > non-activated pot will affect the current voltage . I suspect that's "feedback" through the lamps. Switch to LEDs and I bet it disappears (or at least becomes much less of a problem). Your switch should work, but I think switching to LEDs would be easier. Might even fix your pot problem.

I could probably also put a diode in series with the lamp and that would be as good as using an LED, right?

. I think your first DPDT dwg will work, since the offending lamp is isolated. But the second dwg won't accomplish anything that I can tell. . If you don't want to use LEDs, I'd put a diode in series with R4/LMP1 and R5/LMP2. You may need to adjust R4 and R5 to bring the brightness back up. . I don't think a single diode, on the lamp common, will work. . It's been a long time since I worked with this kind of stuff and I may be way off base. You may want to wait until someone else chimes in before risking your components.

Yeah, I saw that right after I posted this. I'm gonna disconnect them and see what happens. And try to find some nice amber LEDs. Far as I know, this circuit is supposed to use linear pots. At least all the other regulated power suplies I've built have done so. I think it has to do with the setting of the other pot and whatever feedback it's putting through to the input pin on the 317. Thanks,