SMPS Design

SMPS Design

Today we are going to create a SMPS. A SMPS is a switching mode power supply. It is very common and can be found it in almost all electronics. An example would be your phone charger. This project would not be concerned with the theoretical aspects of a SMPS, because explaining the working and principle is quite a long task. If you want to learn more about the working of a SMPS you can read about it here or watch this very well made YouTube video.

What I am going to do in this project is to design my own SMPS and explain each component I place. I have been given the following specifications to design:

INPUT: 230 V AC at 50HZ

OUTPUT:
1) 24 V DC – 7A
2) 5V DC – 5A

So, without getting into too much let’s start designing the schematic. I am going to be using easyEda for this.

Terminals

The first thing I like to do, is to place the terminals on. So, I place the input and output terminals.

image.png

Protection

The protection circuit consists of two things, a fuse and a MOV. The fuse will protect the circuit from over current draw and the Metal oxide varistor will protect from over voltage protection. For the fuse its quite simple we are going to use a slow blow fuse, the rating of the fuse is supposed to be 150% the maximum current value so we can use a 2 A fuse. So, if a current more than 2A is drawn for a considerable amount of time, the fuse will burn and protect the circuit. I got this value from the following calculations. We first calculated our output power (24x7 +5x5) and set our target efficiency at 80%. From this we can find out input power which is just the product of the input voltage (230V) and input current. This will give us our input current. The input current is maximum when the input voltage is minimum. We determined that the minimum input voltage would be 195V therefore we get out maximum input current. We just take 150% of this value and round it off to a standard fuse value.

image.png

The Metal oxide Varistor (MOV) this is used to protect from over voltage. The principle behind this is that, as the voltage across its terminals increase, the resistance decreases exponentially. Therefore, if the input voltage increases say for example a voltage transient spike, the resistance of the varistor will decrease and it will short the circuit and blow the fuse, therefore protecting the components from over voltage. We can use a rating of 275V AC.

image.png

Rectification

Now the first thing we have to do to our AC voltage is to rectify it. We can do this with a full bridge rectifier. A full bridge rectifier is something very basic, its just 4 diodes connected in a bridge configuration. We have 2 options here, either we can go for a bridge rectifier IC or just 4 regular diodes, I will just go with the IC the (DB107) as it will make the routing easier in the future.

We also need to smooth this rectified output. we can do this with a smoothing capacitor. This is also referred to as the bulk capacitor. We should use an electrolytic capacitor which is rated for 400V. we use a 470uF capacitor. The calculations for this I found with help of a book on page 1.69 There is also a YouTube video explaining this calculation which you can find here. timestamp - 22:43

image.png

image.png

Another rule of thumb to calculate the value of this capacitance is take the output power which is 193W in our case and to multiply it with 2uF. Which will give us 386uF which is very close to the actual value we got. I found this information here

As this is a fairly large capacitor, it would have a large inrush current to charge it up initially, this inrush current could exceed the rating of the fuse, so we can add a NTC thermistor to prevent this. A Thermistor is a resistor whose resistance varies with temperature, NTC stands for negative temperature coefficient, which means that as temperature increases, the resistance decreases. You might be wondering what temperature has to do with the inrush current. When there is large current flowing, the temperature increases. Since voltage is constant, therefore when the current increases, the resistance decreases which is the property of the NTC, this reduction in resistance causes the current to decrease. Therefore, this is part of the protection circuit and is in place to prevent the capacitor from charging too fast and drawing large currents.

image.png There are many ways to do this. You can read about it from this screenshot of a book which you can find here at page 1.73

image.png

image.png

EMI Filter

SMPS often produce a lot of noise. This noise can interfere with radio equipment of other components of the system. We must minimize this noise at all stages of our design. One important way we can do this is by adding an EMI filter at the input side. EMI stands for electro magnetic interference. There is a complicated way to calculate the resonant frequency of our circuit which is very well explained in the video by Robert Bolanos. What we essentially need to design this filter is the resonant frequency of the circuit. After we find the resonant frequency, we can use the following formula to find the inductance and capacitance. What we find is the product of the capacitance and inductance. So, we can give a value to the inductance and we can find the capacitance. I am going to give the inductor a value of 10mh which gives me the value of capacitance.

image.png

image.png

image.png

Snubber Circuit

Snubber circuits are a resistive, capacitive, diode network that are used in high voltage switching devices to reduce switching stress during the turn on and turn off. Our transformer input side can be thought of as a large inductor. This inductor gets charged and discharged. the snubber circuit is connected across the input side of the primary winding of the transformer to dissipate this power. We are going to use an RCD snubber circuit for our flyback transformer. There are many types of different snubber circuits we can implement, most of the ones online are designed across the emitter, collector terminals of the switch. You can see the different type of snubber circuits use and its advantages in this book by Ridley engineering This circuit is also called as the clamping circuit as it removes stress from the transistor. I made my calculations with the help of this YouTube video from Haseeb electronics

In my calculations I have taken the frequency as 132KHz as this is my switching frequency. You might be wondering how I got this value, I actually got it from the datasheet of the controller I am using. You will read about that latter. From my calculations I find that the value of capacitance is 293pF. However there does not such a value of capacitor. To figure this out I looked at a table of standard capacitance and resistance values which you can find here. We require the capacitor to withstand 630V as there might be voltage spikes due to this switching.

image.png

image.png

image.png

Another source for these calculations can be found here

image.png

Output Filter

To remove the noise from the output side we can add a simple LC filter at the output. By a rule of thumb, we take an inductance value of 10uH and a capacitance value between 10uF and 100uF. The exact calculations aren’t very important. The more precise our values are the less noise there will be, this can be found through trial and error. I will set my values as 10uH and 47uF. You can read about this here

image.png

There is some more measure we can take to reduce the EMI noise. one is to connect a ceramic disc capacitor across the transformer. The value of this capacitor is either 2.2nF or 1nF. I would be using a 2.2nF capacitor for the best results.

Another step is to add a snubber circuit to the output side of the transformer. This requires a diode connected in parallel with a RC series circuit. We can use a RC series circuit of 10ohm and 1000pF for this purpose as well as a SR260 Shockey diode

image.png

Switching circuit

Now it is time to choose a controller which will turn on and off the transformer. There are many controller IC to choose from. One way to choose a IC would be to go Texas instruments and have a look at their available IC, which you can find here

For my application I require a high output power. (193W) therefore I went to PI expert online which is a software which semi automatically designs a power supply depending on your requirements. It is a software by power integrations. I choose the TOP261-EN as my controller as it handles up to 333W in an open adaptor configuration. The first thing I did after was download the data sheet for the controller where we can see a typical flyback application.

The IC has 6 pin and now we shall connect the 6 pins.

The first is the source pin (S) which is connected to the source of the internal MOSFET. This should be tied to ground. The drain pin (D) which is connected to the drain of the internal MOSFET should be connected to transformer primary windings. The next pins are the voltage monitor (V) and the external current limit (X) pins which can be set according to the data sheet. By setting the V pin to the positive DC rain through a 4Mohm resistor we can set the under-voltage protection to 102.8 Vdc and over voltage protection at 451 Vdc. By connecting the X pin to ground through a 12K ohm resistor we set the current limit to 61%.

image.png

After going through the data sheet, we can understand that the F pin controls the switching frequency. We can set the frequency to the maximum 132KHz by connecting the pin to ground.
As for the control pin, we need to design the feedback circuit first and then come back to it.

image.png

Feedback circuit

I shall first explain why we need a feedback circuit. So, our circuit first converts AC 230v to high voltage DC. This is then pulsed with a MOSFET in our controller, to produce a pulsed high voltage which is fed to the transformer. The output of the transformer gives us low voltage DC according to the number of turns. To make sure the output of our transformer is producing voltage that is exactly what we require we need a feedback circuit. That gives the controller some information. What we can do it tell the controller every time the 5V line reaches the required voltage. However, this cannot be simply connected, it has to be done through an optocoupler.

So, first thing we can do is place an optocoupler, it is always advised to place a 1kohm resistor in parallel to the LED in the optocoupler, the next thing we need is the sensing circuit. What this circuit has to do is turn on only once the voltage reaches 5V. For this we can use the lm431 IC which acts like a Zener diode. This is a shunt regulator which has 3 pins. One pin is in input and one is the output. The third pin is the sense pin which acts as a voltage reference. Once the voltage at this pin is greater than 2.5V it connects the input and output terminals, for any voltage less than 2.5V it acts like an open circuit. So, what we need to do is create 2.5V from our 5V line. We can do this with a simple voltage divider circuit. Since 2.5V is exactly half of 5V all we need is to dived it in half, we can do this with 2 resistors of the same value. I will use two 5Kohm resisters for this purpose.

To the receiver side of the optocoupler we connect the source to the auxiliary winding of the transformer. (I’ll explain that in the transformer sizing section) the drain of the optocoupler can be connected to the control pin of the IC. In the datasheet of the controller, it is said to add a RC circuit of specific value which I have added. And with that we have finished the feedback circuit.

image.png

Transformer sizing

Now for the most important part of the design process the sizing of the transformer. SMPS use high frequency transformers. We require 4 windings. The primary winding, the 2 secondary windings to produce, 5V and 24V. We also require an auxiliary winding, this is just to power the controller and the optocoupler, it isn’t very critical.

Note that this component is not available in the easyEDA library so I just used a regular transformer and inductor to represent it.

The first step in this process is choosing a transformer core. We can go with a Ferrite core as that is the most commonly used for high frequency transformers. The next thing we need to decide is the type of transformer. I choose the EER type transformer. EER refers to the shape, it looks like two EE connected together. I found one with the part number PC47EER42-Z which is made by TDK and available on mouser. The datasheet can be found on page 32

The next step is to determine the wire type. For this there is a few calculations which is based on the frequency, taking skin effect into consideration. The calculations are as follows:

image.png

We get the wire diameter as 0.36mm

We can go to the AWG (American wire gauge) conductor size table and see that such diameter corresponds to wire #27. We can also see that the frequency is 130Khz. Which is approximately our switching frequency.

The calculations for this is available on page17

The next thing we need to figure out is the maximum flux density. If you look at the following graph, we can see that for our switching frequency of 132Khz we have a flux density of 1000 gauss which corresponds to 0.1 tesla

image.png

hence we can now get the follwoing charecteristics:

image.png