Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Adjustable DC voltage supply help?

Status
Not open for further replies.

qa9b

New Member
I would like to construct a simple adjustable dc voltage supply--just general use sort of thing: prototyping, experimenting, etc.

I was considering using the LM317 voltage regulator--two of them, actually, so I could have two outputs--and potentiometers to adjust the output voltage. As far as the range, I was thinking 1.25v to 20v, and 1.5A max for each output.

I got the idea from this project, but obviously I want the output of mine to be adjustable AND, if possible, I don't want to mess with transforming dangerous AC voltages.

I don't necessarily need help with determining resistor ratios or anything (unless there's a better option than a potentiometer), but I could use some advice on where to obtain a suitable "wall wart" type AC/DC transformer that I could use to power this project.

Is it OK for my two LM317's to draw power from the same source? If so, I assume it would need to be rated for 3A, but what voltage?

Thanks in advance for the help!! :)
 
Your specification will reguire more than 20V drop at 1.5 amp. That is 30W for a linear regulator. Check the datasheet for the LM317 to find out how hot it will get.

I suggest you go to the National Semiconductor site and click on power management. The site has a lot of information and design tools to help you with this project.

John
 
yes, while I'm reading your post I have same comment as with jpanhalt,

the regulator will drop the excess voltage (vin - vout) and the power loss is P = Vrop * Iout. One suggestion I can give is to use a multitap transformer to lower the voltage drop(will select lower input voltage for lower output). This might be a little complicated because it will require relays for selecting transformer windings plus extra circuitry for detecting output levels.

Is it OK for my two LM317's to draw power from the same source?
yes it's ok as long as the output of the transformer wont drop too much when loaded
 
Regarding the suitable wall wart - you might simply ask around to see if anyone has wall warts they are discarding. I've got quite the collection and use them as you intend - to avoid having to work on the higher voltage end. Some of these "wall warts" are DC, some AC - and some of the larger/fatter ones may be good for a few amps. If the best you can do is one that has 18 vac at 2 amps you might start with that but construct your circuitry to handle one that actually meets your requirements (3 amps I presume) then keep looking for one - or purchase it.

Keep this in mind - unless you have a specific use you might find that whatever you have around is good enough. There's nothing wrong with aiming for a specification - just that you might fill 95% of your needs with what you have on hand.

Regarding the LM317. I had a similar problem and installed a 2N3055 as a pass transistor in what was called a wrap around configuration. One of the regular members was kind enough to give "wrap around" a more recognizable description or name. This arrangement was slightly looser in terms of regulation. I measured the ripple rejection at 43 db - so not quite as good as a bare 317 but good enough for me.

As I recall, on the National datasheets there are some good ideas on adding a few components that add some protection. Read thru that datasheet. I recall things like a diode here and there to protect the IC and it seemed like cheap insurance - especially since you'll be experimenting and can't predict what your power supply will see at all times.

I have seen people put regulators in series - so that they both share the voltage drop and heat dissapation. Your choice to do this might depend on what materials or parts you have on hand.
 
The normal way is to use a mains transformer to reduce the voltage down to a suitable level to regulate down to the required voltage. This means you'll need to solder the mains connections to the primary side of the transformer.

If you don't want to solder the nasty mains connections to the primary of the transformer then you'll need a fully enclosed transformer.

Do the two outputs need to be isolated from on another?

If so you'll need a transformer with a twin secondary.

Do you plan to be able to draw 1.5A from each supply simultaneously?

As a general rule the RMS AC input current to the rectifier is the output multiplied by √2.

1.5×√2 =2.2A

Each secondary needs to be rated to 2.2×20 = 44VA, the nearest standard rating is 50VA.

This means if you want to be able to draw 1.5A from each output, the transformer will need to be rated for 100VA.

The trouble is I doubt you'll be able to find a fully enclosed transformer with twin 20V secondariness.

**broken link removed**
LM317 / LM338 / LM350 Voltage and Current Regulator Calculators

For 20V use any of the following combinations for R1 and R2:
R1 = 62R, R2 = 1k
R1 = 130R, R2 = 2k2
R1 = 160R, R2 = 2k5

The filter capacitor needs to be at least 4700µF and be rated for 35V.

The regulators will also need to go on a good heatsink.
 
Thanks for all the responses! I really appreciate the help so far.

If I were to scale back a little on the max current, say change it to 1A max, then my maximum power dissipation would be somewhere around 20W. Unless I run this thing at extremes (i.e. 1.25v drawing 1A), I think the power dissipation will be somewhat tolerable. (Right? :))

Question is... what resistor value would I place between the ADJ and OUT of the LM317 to limit the current to 1A?

Obviously, the LM317s will be heat-sunk, and it was actually my intention to include a small cooling fan in the final enclosed device.

Hero, I just saw your post as I'm typing this. If I could, I'd like to power both LM317s off one transformer. Are there any possible negative consequences to having two non-isolated outputs?
 
In addition, for the resistor values I was thinking about this:

R1= 200 ohms

R2= two potentiometers in parallel. It would be nice to have a coarse/fine adjustment to the output. In this case I was thinking a 5k and a 10k, which would give a max resistance of 3333 ohms. I would then put a very small trimmer pot in series with R1 to adjust the max output to exactly 20v.
 
Hero, I was also curious to as to how you came up with the filter capacitor value?

For me, this was the diagram that stood out in the **broken link removed**:

**broken link removed**
 
The LM317 uses a 120 ohms or less resistor from the output to the adjust pin. The more expensive LM117 can use a resistor as high as 240 ohms. If the resistor value is too high then the output voltage of the regulator might rise without a load.

The LM317 limits the current to about 2.2A. If you want a lower limited current then add a second LM317 as a current regulator. It needs an additional 3V to 4V from the unregulated supply voltage.
 
I used the following complex formula, I have programmed into a spreadsheet, added 20% to the value and rounded up to the nearest standard capacitor value.

[latex]C = \frac{I}{V_R} \times \left(\frac{1}{4f} + \frac{arcsin{\left(\frac{V_{IN}-V_R}{V_{IN}} \right)}}{2\pi f} \right)\\
C=\text{Minimum capacitance required}\\
V_R= \text{Maximum ripple}\\
V_{IN}= \text{Input voltage, excluding diode losses}\\
I=\text{Current drawn by regulator}\\
f= \text{Frequency}\\
[/latex]

There's simpler formula which isn't as accurate but it oversizes capacitors so it's normally good enough.
[latex]C = \frac{I}{2F \times V_R}[/latex]

Here's an even easier formula to remember formula which outputs values in µF but it only works for 50Hz or 60Hz.

[latex]C = \frac{I\times 10000}{V_R}[/latex]

[latex]V_R = V_{AC} sqrt{2} - Dropout - V_F - V_{OUT}[/latex]

Dropout is the dropout voltage of the regulator, it's normall good practise to assume 3V worst case but it depends on the current draw (see datasheet).

Vf is the voltage drop of the rectifer, assume that each diode will drop 1V under load and in a bridge there two diodes in series are conducting so that's 2V.

It's better to put the pots in series rather than parallel.

For 20V use:
R1 = 91R
R2 = 1k + 500R

If you reduce the current to 1A, you can use a 3300µF capacitor.

A PTC resistor (also known as a poly-fuse/switch) is a more economical option than using another LM317 for overcurrent protection.
 
Last edited:
Thanks again for the info!

Hero - I'm still curious about one or two things. Which capacitor in the diagram you provided is the "filter" capacitor? And why do you recommend increasing its value? I found no mention of increasing its value in the data sheet.

For the testing stages (at least) of this project I figure I can just use a couple of 9v batteries to provide the power source. That's a little bit easier at this point than hunting down the right transformer or building a transformer myself.
 
I mean the large reservoir capacitor across the bridge rectifier, C1 in the schematic below.

LM317 Linear power supply Regulator selector 1.5V,3V,4.5V,5V,6V,9V 1.5A | Circuit Project Electronic
**broken link removed**
C1 provides power when the AC waveform goes though 0V, the higher the current the larger it needs to be. The capacitor needs to be large enough to ensure the input to the regulator remains above the minimum voltage required for it to regulate properly all the time. The capacitor will also have to be larger if the peak AC voltage relative to the minimum voltage required by the regulator is small. If the capacitor is too small there will be ripple on the DC side when the maximum current is drawn.

C1 is a little too small on the above schematic, for 12VAC, in and Vout at 1.5A, I would select a 4700µF capacitor.

The capacitor on the datasheet is only small because the datasheet is assuming the source of DC power is already smooth enough to power the regulator.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top