# DIY power supply [duplicate]

I am trying to build a variable power supply to replace my batteries.

1. The power supply should have a constant DC voltage just like batteries
2. maximum current will be 10mili Amps
3. Max voltage should be 100V
4. Should be able to change voltage between 0-100v

Input is 240v AC

Please suggest some ways of doing that

• Please clarify #3 and #4. Are you saying you want an output that is 100 Vdc +/-10 Vdc? What are you powering that needs 100 Vdc at 10 mA? Commented Mar 20, 2021 at 12:29
• What is your power source? Commented Mar 20, 2021 at 12:30
• @AnalogKid Plasma related experiment Commented Mar 20, 2021 at 12:30
• @Andyaka 240v AC from wall outlet Commented Mar 20, 2021 at 12:31
• What are the batteries that you are using at the moment? Commented Mar 20, 2021 at 12:32

You can use a TL783

By adjusting R2 (say with a 3W rheostat), you can alter the voltage from 1.27V to > 100V. The pre-regulator is useful if you have higher than 125V.

To get the input DC voltage, a mains:48V transformer feeding a voltage doubler (2 diodes and 2 capacitors) will give you about 130VDC, a bit close to use directly into the TL783.

The regulator needs 15mA current to work, so it will dissipate worst-case about 0.025A * 130 = 3.3W, so a heatsink is required.

It would be optimistic to say that it has as low noise characteristics as some types of batteries, so suitability may depend on your detailed requirements.

• Not a complaint. But the OP probably doesn't care that much but I don't think that circuit gets down to 0 V, exactly. Would need a negative rail somewhere, I think. Or else I need to go look at the TL783!
– jonk
Commented Mar 20, 2021 at 17:07
• @jonk I did note that 1.27V would be the minimum.. as you say a negative rail is the usual way of dealing with that, but I doubt it is necessary. Commented Mar 20, 2021 at 20:19
• Thanks, but tl783 is not available in my county. I was looking for some alternative methods Commented Mar 20, 2021 at 22:15

The power supply must have a design spec beyond voltage and current. It must include;

• line regulation error e.g. <=1%
• Load regulation error e.g. <=1%
• Ripple voltage e.g. <1% or 50mVpp
• Max power heat rise Tj or Tc and max ambient
• Power efficiency, safety insulation voltage @100uA leakage, unintended radiation etc.

Load regulation can be seen as a voltage divider from load to source impedance and for 1% is approximately Rs/Rl

• thus for 1W , 100V/10mAv = 10k load the source only needs to be <1% of this.

• But for 3.3V/10mA = 330 ohms the source must be < 3.3 Ohms

• Now that you have some primitive specs (there are more ) can you think of what will work AND more to the point what effort have you made to research solutions offered by Web design tools from TI, AD (Analog) Rohm, Microchip?

Your ability to learn is only limited by your imagination and ability to search.

You must learn to stop looking for solutions until you have listed all your specs. (Think 1st , leap after)

All designers consider “Make or Buy” decisions daily and the cost-benefits. You should consider this too. (with all your specs to compare)

• Thanks, But actually i was looking for a way to start. Right now i am almost clueless, i was trying to use tl783 but it is unavailable in my county. Commented Mar 20, 2021 at 22:15
• That’s a bad way to start as I said to choose a part, even if it a good part for hobbyists Commented Mar 20, 2021 at 22:32

Internet search for LM317 power supply schematic, and you will get hundreds of schematics. The basic plan is a transformer that steps 240 Vac down to 85 Vac to 95 Vac, followed by a bridge rectifier, filter capacitor, and LM317 linear regulator circuit. It's all in the LM317 datasheet. Also, there are many regulator modules on ebay, Amazon, and Alibaba.

Update: To be more clear, the standard LM317 can withstand 43 V from its input to its output. With a regulated output of 100 V, the input can be anything up to 143 Vpeak. Assuming a voltage drop through two diodes in the bridge, this limits the transformer secondary's RMS voltage to a maximum of 102 Vrms.

HEY - ! When I wrote this, the adjustment range was 10 V, not 100 V.

• The requirements from the OP state 0 to 100 volts output hence, the LM317 is unsuitable. Commented Mar 20, 2021 at 12:51
• Bad choice unless you piggy back onto a variable emitter follower to reduce the drop with a feedback gain high enough to null error. Then one might consider regulating a 1kV to 10kV source with a limited drop within 10mV I have done that for Lexmark laser printer bias. But not over a wide range. Commented Mar 20, 2021 at 22:37