Instructables

Power Supply Question?

I want to build a switching Power Supply, without the use of IC's with everything already inside. I only want to use op amps and passive components. Below are my goals on what to achieve. I would like to make this PSU current limited, or at least shut off when the current goes too high. I basically took the concept of the linear voltage regulator and expanded on it, turning it into a 'proof of concept' switchmode supply.

Input Voltage range: . . . .7-24 Volts
Voltage: . . . . . . . . . . . . . . 5-24 Volts
Max Current: . . . . . . . . . .10 Amps
Price: . . . . . . . . . . . . . . . . $5 -- $10


        Instead of feeding a voltage reference into an op amp, I modulated it with a few components. (A triangle wave generator, and a array of resistors to lower the amplitude and introduce a DC bias.) The DC bias is controlled by the current protection module, which is simply an op-amp that reads the voltage on a small resistor and multiplies it by 5. This finalized current controlled, DC reference biased triangle wave is fed into a comparator, which will then switch a rather large MOSFET on and off at about 200 Hz, with varying PWM, depending on how much 'droop' there is on the output. Here is a rundown of what the components will do:
OK, I refined my plan to this general specs:

Input Voltage range: . . . .7-24 Volts
Voltage: . . . . . . . . . . . . . . 5-12 Volts
Max Current: . . . . . . . . . .10 Amps
Price: . . . . . . . . . . . . . . . . $5 -- $10

       I basically took the concept of the linear voltage regulator and expanded on it, turning it into a 'proof of concept' switchmode supply. I don't want to use any prebuilt chips where you have a magic black box with inductors, capacitors and resistors connected to it. I want this to be entirely raw, basic, cheap parts. Maybe later, I will replace many of the op amps with a single programmable chip (like an Atmega328P)

        Instead of feeding a voltage reference into an op amp, I modulated it with a few components. (A triangle wave generator, and a array of resistors to lower the amplitude and introduce a DC bias.) The DC bias is controlled by the current protection module, which is simply an op-amp that reads the voltage on a small resistor and multiplies it by 5. This finalized current controlled, DC reference biased triangle wave is fed into a comparator, which will then switch a rather large MOSFET on and off at about 200 Hz, with varying PWM, depending on how much 'droop' there is on the output. Here is a rundown of what the components will do:


Green field: This contains a voltage regulator which acts as both a 5V power source and a voltage reference. Not only will this module produce a 5V output, but also produce a triangle wave.

Blue field: This module will be fed the triangle wave, decrease it's amplitude, and inject it with a bias voltage, controled by the current limiter (red field).

Red field: This basic module simply measures current flowing through a 0.1 Ω resistor, and multiply that reading by a factor of 10, and inert it (the circuitry is probably wrong, and I am not sure how this will work, if it even will do what I want it to Will this work?)

Yellow field: The final modulated triangle wave is then fed into the last comparator, which will switch a MOSFET on and off at a fixed frequency of 200Hz. The output of this last comparator is now PWM. As the output voltage sags, the pulse width will increase, and cause the final voltage to stabilize at either the peak value of the triangle wave (with little to no load), or near the bottom end of the wave (with a heavy load)

------------------------------------------------------------------------------------------------------------------------------------

My questions:  I try to run this in LTspice simulator but some reason the output of the last comparator is a distorted triangle wave. I think this has to do with my filtering capacitor and MOSFET gate capacitance. Can anyone give suggestions about this design? 

I'm sure the current limiting function is not going to work as intended until I finalize it's design (I hope I don't need more than 4 op amps altogether, It would be nice to use a single chip I already have) Any suggestions? I might just omit this part entirely, as it is not necessary.

Picture of Power Supply Question?
Simple Switching Power Supply.png
What value is the inductor ? Its the core of the design. 200Hz is way too low for a sensibly sized switcher. 20kHz is also low. Aim for 40kHz +. Real ones switch in Mhz,

The final stage cap needs to be a low ESR type, or it will overheat and possibly burn up.

Peak inductor currents exceed the mean inductor current by some margin. Make sure its rated to handle it.

Turn the output stage around completely. You really don't want a non ground referenced PSU.

You'd do well to look at the internals of the "black boxes" you decry, because you will learn how to do it properly.
-max- (author)  steveastrouk1 year ago
I have a few flashlights that use PWM and the switching frequency in them sounds like 200 Hz, and if recall, the specs for the LED driver stated that they are 200 Hz. I also read somewhere that lower switching speeds are more efficient.

The idea behind this PSU is to see if this idea will work or not. I do not have any oscilloscope or even a multimeter yet. I have since been using a old galvanometer and an led array or my tongue to measure voltage less than 5V. I don't want to simply copy the design of the insides of black boxes, but learn it for myself.
No, HIGHER switching speeds, done right, are much more efficient, components are smaller, emissions lower.

If I were you, I'd make an oscilloscope. There is no way you will copy the design inside an IC, IC designs are wildly alien to anything you can make in discrete components, but the TOPOLOGY is what you should study. Discrete switchers are interesting, but even professional electronic engineers will shy away from rolling their own, unless absolutely necessary.
-max- (author)  steveastrouk1 year ago
Do you have any instructions on making scopes? I have looked far and wide, only to find a youtube video demonstrating a homemade scope. I'm sure real-world engineers do avoid making stuff from scratch, after all, why reinvent the wheel? I have 2 reasons: first, I already have some junk parts like an LM324 quad op-amp, and would like to test my thoughts. I did build the first part on a breadboard, and with the second op-amp wired as a comparator, I found my output signal not as triangular as I was hoping for. at best, I figure it looks something like the image. These measurements assume a 100% linear pot, and (close enough) to ideal op-amps.
20130321_211606.png
The reason for that could well be my old friend core saturation. Check the inductor model you've used.

Where are you in the world, to advise further on scopes ?
-max- (author)  steveastrouk1 year ago
This was just the wiring for the green part.Only the triangle wave generator. is evem hed to be wired differently, using a simgle pot. That gave me best results.
...and when you change the design frequency, you'll discover you need to change the op-amps to proper comparators.
-max- (author)  steveastrouk1 year ago
What difference is there between op amps and comparators? Can comparators witch full on and off farster?
Yes, comparators are optimised for fast and unequivocal switching.
-max- (author)  steveastrouk1 year ago
Thank You, I'll keep this in mind.
-max- (author)  steveastrouk1 year ago
Why is it in every circuit I look at with transistors, the emitter is connected to ground? like flyback drivers and any circuit with NPN BJT's?

Also, I beleive I need to drive the gate of the MOSFET with a pre-stage BJT, buy this does not help in my circuit simulator. It only makes the MOSFET operate ever more so in it's linear region.
Because you haven't actually looked at that many circuits yet ?
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!