I need to build a step-up DC to DC converter so I started looking at building my own switched-mode power supplies (SMPS).
The basic idea behind an SMPS is to send an alternating waveform into an inductor to step the voltage up or down. A feedback loop monitors the output voltage and adjusts the waveform to maintain the desired voltage.
Here is a sample boost circuit from wikipedia:
You just need to turn the switch on/off at the right rate and you get the desired voltage. Sounds fairly simple, but I spent plenty of time researching how to do this and quickly realized there wasn’t a whole lot of material out there for hobbyists.
So I decided to build a test platform that would allow me to easily experiment with changing settings so I could get a better feel for what is happening.
First, here are some of the better references I found during my research.
- Wikipedia – always a good place to start
- Learning Electronics made Easy – How SMPS Buck-Boost Circuits Work – This is the easiest to understand reference I list though it is still quite involved.
- Understanding Boost Power Stages in Switchmode Power Supplies – This is a Texas Instruments Application Report. Good explanation, but definitely not easy to understand.
- Basic Concept of Linear Regulator and Switching Mode Power Supplies – Application note by Linear Technology. Another document aimed at electrical engineers.
- Switch-Mode Power supply Ref Manual – This is written by ON Semiconductor and also targets EEs.
- SMPS Technology – Website “dedicated to switching-mode power supply circuit designers”. Fair number of resources for EEs.
The primary resource I used for my experimentation from from Daycounter Inc. Because I want to build a step up converter, I focused on their page, “Boost Switching Converter Design Equations“.
My goal is, through experimentation, to step 5V up to 48V.
This is the basic circuit I will be working with, from Daycounter’s page:
Essentially, I need an input voltage, an N channel MOSFET, an inductor, a diode, and a capacitor, and a pulse train in which I can change the frequency and duty cycle.
While researching this circuit, I suddenly realized I might be able to use my function generator if it has a duty cycle control and indeed it does so that is what I will use to generate the pulse train.
If you look at the Daycounter website, you will find they tell you how to calculate the values of the passive components and the necessary frequency and duty cycle to obtain the desired voltage.
Further they include a calculator to help you (click on the pic to go to the actual calculator):
Honestly, I have repeatedly used that calculator and another like it at Adafruit and have not had a lot of luck with them. But they at least give me a reasonable idea of the size inductor I should start with for a given frequency.
My intent, though, is not to use a calculator, but experiment with different inductors, frequencies, and duty cycles to watch how they effect the output voltage.
I built the above circuit exactly like this:
using the following components:
- L1 – Started with 100uL but this will be one of the variables. I had on hand 50uL, 100uL, 250uL, and 500uL.
- Q1 – I am using an FQP30N06 N channel MOSFET here. This supports up to 60V and 30A. Since I don’t know exactly what I’m doing, I definitely want high values.
- D1 – I used an FR207 1000V@2A diode here. You are supposed to use a schottky diode, but I didn’t have one for high voltage/current and this actually worked OK for my experiments. Again, it needs to support decent amount of voltage / amperage since I intend to step up voltage.
- For C1 I used a 47uF 100V capacitor. Make sure you use a high voltage capacitor here. They WILL blow up as I’ve seen in the past.
- For C2 I used a 100uF capacitor. Only 5V (in my case) is going thru it, but I had a 50V, so that is what I used.
- R1 – 5.6K. This is used to drain the capacitor so it doesn’t surprise me with a nasty shock.
- To generate the pulse train, I used a BK 3011B frequency generator. If you don’t have a frequency generator, you can use a 555 timer. The downside to a 555 timer, as I understand it, is going below a 50% duty cycle is difficult. If you want to use a 555, search google for making a 555 function generator so you can easily adjust frequency and duty cycle.
- I am also using an oscilloscope to monitor the frequency and duty cycle of the input signal (the frequency generator only tells me the frequency). Many multimeters have the ability to monitor frequency and duty cycle as well.
- Finally, I am using a BK 1670A power supply which allows me to easily control input voltage AND limit current. I found out quickly that you want to control the current going into the circuit so you don’t burn the inductor or transisstor up (I destroyed all of my 100uL inductors which were low wattage in a few hours by not being careful enough). If you look at the schematic, you will see there is negligible resistance between the inductor and ground. It isn’t hard to destroy them.
Setting Up the Equipment For Testing
As I said earlier, it is pretty easy to destroy the inductor and the transistor if you aren’t careful. If the frequency drops too low and you aren’t paying attention, a lot of current will start flowing.
So, first setup your power supply to provide 5V with a current limit of 100mA. Don’t be tempted to increase the current. When everything is running properly you will only consume about 10mA, so 100mA is more than plenty. The worst case scenario in my experiments resulted in 210mA.
Now TURN THE POWER OFF. Until I’m sure things are working reasonably well, I only turn the power on for short intervals, just long enough to see what the output voltage is.
Next, setup the function generator. Select a square wave, use the normal output jack (not TTL/CMOS) and set the amplitude to the maximum (12V). If I recall, the MOSFET needs 7V to switch on.
Set the duty cycle to 50%. On my function generator this means pulling the knob out and turning it fully to the left. To decrease turn right. To increase beyond 50%, push back in and turn right.
Frequency is, for my generator, dependent on duty cycle. So after the duty cycle is set THEN set the frequency to about 80KHz.
With the frequency at 80 KHz and duty cycle at 50%, turn on the power to the circuit. The current SHOULD NOT be limited. If it is, something is wrong.
If configured as in the schematic, I get 72V and 40mA current (on the power supply).
For every test, I leave the power supply off while I am adjusting the frequency/duty cycle. Then I turn it on and quickly check that current/voltage are reasonable before leaving it on very long.
Inductance Value Effect on Voltage
First question, what happens if I simply change inductors with different values. I’ve got several to try. The Frequency is still 80KHz and the duty cycle 50%. Here is a table of the results
Based on this, it appears that as the inductance is increased, the voltage is decreased. I am deducing this from a few points of data, don’t quote me that this is a fact!
Frequency Effect on Voltage
My next experiment is to see what effect frequency has on output voltage. I will hold the inductance steady at 100uL and duty cycle at 50% and try different frequencies:
In general, as the frequency increased, the voltage decreased. But there was a little jump up at 120-130KHz. I have no explanation, but I was able to repeat the jump.
Duty Cycle Effect On Voltage
In this experiment, I used a 100uL inductor, maintained a frequency of 100KHz and increased the duty cycle from 10% to 90% to see the effect:
The duty cycle seems to have a linear effect up until about 50% and then it drops off.
My goal is to step 5V up to 48V. Just looking at the data, I see that I need a 200KHz clock and a 50% duty cycle to get what I want.
Here are pictures of the test equipment when everything is set up to produce 48V:
Here is a picture of the breadboarded circuit:
Disregard the dangling 1.2K resistor. I’m about to address it.
Using an NPN Transistor
I burned out more than a couple of transistors when I was originally messing with this circuit. Once I finally realized the functioning circuit really shouldn’t take that much current I started limiting current. Now that current is limited, a normal NPN BJT transistor should work.
So I removed the MOSFET transistor and stuck in an MPSA06 NPN transistor. This is an 80V 300mA transistor so it should work.
Here is the circuit:
This worked OK, BUT the results were different. For example, while 200MHz @ 50% gave me 48 volts on the MOSFET, it gave me 60V with the transistor. I had to increase the frequency to 293MHz before I got the 48V I wanted.
This set of experiments gives me a reasonable idea of how the SMPS boost circuit works. I am now ready to play with a real SMPS IC and build the power supply I need. I’ll cover that next.