This is a forward converter and the way it works is very similar to a buck converter but it offers the advantage of isolation between input and output. So if we look at the schematic we can try to understand how it works. There's a MOSFET switching the primary of a transformer, then we have a secondary with the diode in series, then we have a diode D5 and L1 that look like a buck converter. We can also see that there's a third winding on the transformer with the diode in series and this is called a demagnetizing coil. Let's now pretend that the switch is on and current starts flowing through the primary of the transformer. This means that the same polarity voltage will be applied to the secondary and diode D3 will start conducting and pushing current through L1 and supplying voltage at the output. Once we turn off Q1 the current stops through the primary but the inductor L1 wants current to keep flowing through it and so we'll pull it through D5 and keep some flowing to the output. In the meantime the transformer is still magnetized and if we don't find a way to slowly demagnetize it we'll create a very strong voltage spike on the MOSFET, possibly burning it. So what we need is a demagnetizing coil to slowly lower the current and lower the field inside of the transformer core. This works by letting current flow from ground through the diode up to VCC. This means that if the primary and the demagnetizing coil have the same number of windings and the same voltage is applied to them when after the other the duty cycle can't be more than 50% on the primary for more time that it does a secondary and it would cause a permanent magnetization which would lead to saturation of the core. If we wanted to increase the duty cycle we could decrease the number of turns in the demagnetizing inductance and this would work. The only problem is that then the voltage seen on the drain of the MOSFET is going to be higher than twice the input voltage. Okay next step let's build the transformer. First thing you can see I got the coil former from one that I took off some circuit board and I really wound the primary on it. Next thing we do is start around the ends on two leads then we can proceed to wrap it in some tape. At this point we can wind the secondary. A good trick is to superglue the first part and the last part of the coil so that it's easier to work with and it doesn't start to come loose and unwind by itself. Last thing I did was wind the demagnetizing coil and I use them thinner wire than the other one because it's going to only conduct the magnetizing current and not the current going to the load. And the last trick is if you're pulling off coils and transformers like I am from other electronics always check that there isn't stuff like glue stuck to the ends because that's going to create a small gap and reduce the inductance of the coil. So in this case I used a little bit of fine grit sandpaper to sand off the stuff. Be sure to do it on a flat surface and as little as possible to prevent the ends from becoming a little bit rounded because this would cause a permanent gap. So at this point we can build the circuit. Here it is on a breadboard and we can test it and see how it works. I put a tenon load at the output and I'll add a light bulb to give a visual feedback on the voltage at the output. Here if I turn the potentiometer and change a duty cycle increasing it we can see that the light is brighter and looking at the oscilloscope we can see at the bottom the clock signal and at the top the output voltage with a pretty low noise and we can see that the voltage rises. Now if we observe the current at the input of the circuit we can see that it rises as we increase the duty cycle and at a certain point it kind of spikes and this is because the demagnetizing coil doesn't have enough time to fully demagnetize the core. This means that there's a residual field at the end of the period and the new period starts the the core is already partially magnetized. This makes the core saturate and pulls way too much current that it should. In my case I can go over 50% duty cycle because the demagnetizing coil has a lower number of turns in the primary coil. Now to understand this better we can probe the output of the demagnetizing coil before the diode and see what the waveform is and at the bottom we can see the clock as a reference to understand what's happening and we see that increasing the duty cycle makes the time that the demagnetizing coil has to discharge shorter and a certain point it doesn't make it in time and as I said before the current rises too much and saturates the coil. Just for curiosity we can probe this and at the bottom we'll put the drain voltage on the MOSFET and we can see that the waveforms are practically identical except for this little spike that happens when the MOSFET turns off and is primarily due to the leakage inductance in the transformer. Now one last question that I was asking myself before building this is why can't we build this so that the demagnetizing happens on the secondary side essentially and we push all the energy that was in the magnetization of the transformer to the output instead of putting it back into the input because every time that we transfer it it's going to create some losses so it doesn't make sense to push it back and forth instead if we already have the energy in the core why not send it to the output. So we can test this and try to understand if it's a good idea and if it works. So the first thing we notice is that without even getting to 50% duty cycle the current at the input is a lot higher and the light is also brighter at the output but let's try to understand why this is happening. The voltage applied to the demagnetizing coil is the output voltage which is only a fraction of the input because of the step down nature of the converter. This means that the time that it takes to demagnetize the core is a lot longer in fact it's inversely proportional to the voltage applied to it. So in general if we try to apply this with a step down topology it's always going to limit a lot the duty cycle that we can use and in fact if we probe again the drain source voltage and the voltage before the diode we can see that it never finishes demagnetizing the coil. So to answer our initial question of why isn't it done more often it's because it limits the duty cycle a lot. Not that it couldn't be done but one would have to pay close attention to the number of turns in all the coils and know what the output voltage would be. Keeping the demagnetization coil on the input is a lot easier because you don't have to think of all this stuff and you just put the same number of turns that you have on the primary. So in the next video I want to add a simple IC that controls the PWM based on the output voltage and maybe the current. So you can subscribe if you don't want to miss the video and I'll see you in the next one.