@@greatscottlab Hi sir. Sir please hack an AR glasses to work on a HDMI input even if the whole setup becomes bulkey. Bigg fan. Love from India ❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️
Great video as always!!! Ignore the YT analytics, if they still show poor results. It's not you, it's them and please don't change your style to try and appease the algorithm. . We're all here for the quality of videos you have always done and this is a perfect example.
I would love it if content creators banded together and created a wash of "Shorts" that were titled "do not watch this - nobody asked for it, nobody wants it, this is a waste of time." 30 seconds of vertical video paint drying, grass growing, and similar pointlessness. When the viewing stats are complete garbage, maybe YT can butt out of trying to dictate content.
.." this is not a promotional pitch..but in all fairness I can say this ( though we were really small customers ) Wurth Elektronik do have " high quality & reliable components and are real serious business partners... despite we using a limited range and quantity of their products...they went " all out " to respond to our doubts/queries/ end use applications..and sent their team over with substantial dev. kits/ catalogues etc. besides follow ups..
I am ALL FOR THIS. I have a pet project I'm trying to learn up to... I've got a shelf full of game consoles from the Famicom to PS4 Pro. I want to install a high-power 24VDC supply and use isolated switchmode supplies to step down to what each machine needs... 3.3V, 5V, 7-9V, 12V, and so on. (Isolated to prevent ground loops and issues with systems that raise "ground" to a diode drop above one leg of the input jack, like the NES.) In my research, I've seen planar transformers that use stacked PCB layers to provide galvanic isolation. Since the design is kind of tricky, they're also available as drop-in modules from trafo manufacturers. But, magnetics selection is non-trivial, and I still feel completely lost on this topic. It's really the last domino to fall before I can start building some POC designs. So, please! MOAR TRAFOS!
Can you make a video about active power factor correction, because it's an important topic with switch mode power supplies. Due to it's big capacitors.
Active PFC is fascinating. I think it's just using PWM to draw a sinusoidal current so the current is in phase with the voltage but there might be some more clever stuff going on. What would be interesting would be to use a microcontroller to do sinusoidal PWN synchronized to a zero crossing detector and see if that performs as well as a commercial APFC chip. I suspect the commercial chip is doing something a bit cleverer than this but it's not well documented. Basically a 'Buy of Build' for active power factor correction.
About 10 years ago I had to simulate an oil refinery electrical power grid. Was a struggle trying to understand how a generator's AVR goes from changing the generator's voltage when it's the only generator on the grid to changing the reactive power supplied when there is more than one generator.
hi, great video as always. just keep in mind that in case of flyback topology, we aren't really talking about a transformer: since there is a high reluctance gap, a flyback trasformer is more like two mutual inducitors with a very high coupling coefficient.
I'm coming to electronics later on in life. Your tutorial have to be the clearest and most well explained. Really enjoy and get so much from your videos. Thanks for your time.
Fascinating, I'm very happy to have this video from you. I have wondered about Switching mode power supplies for ages, and to have such detail is great - to be fair, I'm 1:03 in, but I know it'll be good. Edit: I was not disappointed! Thanks.
I have been fixing these for years by changing some of the caps..I had a good idea how they worked and you defiantly boosted my understanding of them even further... lots went into the design technically.. thanks
well despite the fact I know how a SMPS works in theory, I didn't know about the specifics about the transformer windings being opposite and the fact it's basically using the charge / discharge of such transformer... I always thought it was due to high frequency switching that it worked like a regular transformer but was just smaller because of the higher frequencies and the square wave... :)
@@analoghardwaretops3976 The flyback can go to as high of a duty cycle as you like within the practical limits of maintaining control, as long as the switching transistor can handle the reflected voltage. I think you're thinking of the forward converter, which is one where you can't exceed 50% with the standard design
@@ShinyMajor exceeding 50% , the volt/ sec. balance in off- to -on may not be achieved..and can lead to core saturation even in boost/ flyback modes.. leading to gradual residual flux buildup... so when it's @ the extreme limit of the hysterisis curve..the next turn on pulse ..in its first few hundreds of nanosecs.can destroy the sw. with uncontrollable current.. Chips for flybk./ boost have an internal divide by 2 f/f to limit max. duty to 50 % .. example..compare data sheet for internal blk.dia. of 3842/43 or other..
Just can't wait for the video on the TL431. I'd love to see, how I could use it, to regulate the output of a dc-dc converter (which aren't so different from smps). For example to battery power a microcontroller based temperature logger.
Excellant explanation to a topic I have been wanting to understand for years. Yes, please cover the topic of voltage references. You are my inspiration to build electronics.
6:23 Well, actually the mosfet can get overvoltaged even if the leakage inductance is zero. Here's an example: we built a flyback SMPS, that converts 325V DC into 12V DC. The transformer's ratio is 20:1, and Vd-s(max) of our mosfet is 500V. Whet the mosfet opens, the energy from the core gets transfered to the secondary side, where we have 12V, so the voltage on the secondary winding is about 12.6V (due to fast diode's voltage drop). Knowing the transformer's ratio, which is 20:1, we can calculate, that the voltage on the primary winding is 12.6V * 20 = 252V. This voltage adds to 325V, that we already have on the mosfet's drain, so at the end we have 577V there! As you can see, the 500V was exeeded. Even the 600V mosfet wouldn't be enough, because of the leakage inductance, which also adds some voltage to our 577V. To solve the problem, we could use a transformer with lower ratio, for example 2:1. But here another problem begins: when the mosfet turns on, the voltage on the secondary diode will be 12V + 162.5V = 174,5V. Our diode have to maintain this quite a high voltage. That is why we have to be careful when it comes to choosing a transformer, a mosfet and a secondary diode for our flyback power supply. In a described example, optimal transformer's ratio would be 5:1
@@greatscottlab Yes! I watch DiodeGoneWild, and my intention is to make the most absudly safe power supply ever built. If you know who he is, he always critiques PSUs for missing safety features and such. Not going to miss any of those. I will be using overkill air gaps and components, and cables too thick. Thanks for the reminder though!
Awesome video GreatScott!. To help newbies who may not be always fully aware of how oscilloscope measurements should be approached especially with mains connected circuits, can you please do a follow-up video showing exactly how you had connected all devices, especially the isolation transformer & scope ground leads. If you can also demonstrate scope differential probes in such situations, this would be super
As always well presented. Someone below asked about PF correction. Along with that, maybe do a video that turns this into a true power supply with PF correction, filtering, in rush limiting and isolation. That would be an interesting follow up !
From all of your video, this is the first video which i felt has less content and knowledge. I think it can get more informative... Apart from this, i love your video, always get something to learn.... Thank you sir.... ☺
Thank you. I have a big box of these I bought eBay as a mixed bag for £1 ages ago and having tested the coils resistances was puzzled. The box remains! I will try testing them with low voltage at 60kHz Might be more informative. Very good explanation. I vaguely knew how they worked. Now I know more :)
Flyback converters are fine for low power phone chargers and such, What about forward converters? (single ended, two switch forward, half bridge, full bridge, with asynchronous and synchronous rectification pros/cons) or even better, what about LC, LLC and LCC converters?
We always listen to your advice about mains voltage, but, is there a safe wafe to work with mains voltage? How do you work with mains voltage? Greetings from Chile!!
It's nice to understand how these things work. Sounds complicated but really isn't. Also preparing my moped project for 1.6kw charger integration. So exciting stuff. Great Scott!!
Why does the output voltage rise when increasing the duty cycle? Shouldnt it be the other way around? With the NMOS used in this case, the switch on-time is longer so the capacitor has to transfer more of its saved energy due to a longer off time on the secondary site?
In the video, you mentioned about the air gap but didn't explain why it's used, I still have this doubt on how energy is stored in the air, and why does it fly when the transformer get turned off. Will there be a next video about it?
The ferrite of the transformer is a magnetic circuit in which the magnetic flux introduced by the magnetizing current of the primary side is carried between the primary and secondary windings. For a conventional transformer, these are carried with a low "reluctance" path to ensure that that the energy is transferred to the secondary winding simultaneously with it being introduced into the primary winding. This can only happen because there is a current set up in the secondary by the magnetic flux at the same time that the primary is generating the magnetic flux. In a flyback, there is a diode blocking a current flowing in the secondary while the primary is magnetizing the ferrite. The primary magnetizes the ferrite, and it would hit a limit called saturation at which point the ferrite can no longer be magnetized any further. To prevent this, an air gap is introduced into the magnetic circuit in which the flux lines flow. This increases the reluctance of the magnetic circuit and reduces the amount of flux induced into the circuit given a magnetizing current. Energy is stored in the magnetic field, most of it in the air gap. When the switch shuts off and the primary current stops, the magnetic flux stored in the ferrite is no longer sustained. The magnetic field collapses, and by Faraday's law a voltage and therefore current is induced into the secondary permitted by the diode. The capacitor is charged in the secondary and the power can be transferred to the circuit. So one of the biggest differences is that a flyback stores energy in the gap and transfers it in separate steps, whereas a conventional transformer transfers the power during the same cycle from primary to secondary. The air gap stores the energy in the flyback that is transferred from primary to secondary.
@@profdc9501 thanks a lot, it clarifies very much of my understanding, however for me it's still a black magic on how air can hold so much energy (technically, all the energy that passes over the power supply was once passed thru the air gap).
@@WagTsX The magnetomotive force applied to the ferrite magnetic circuit is equal to the number of turns multiplied by the current in each turn. This is equal to the magnetic flux times the reluctance in the circuit. The energy density stored in a magnetic field is 1/2u B^2 where u is the magnetic permeability. The permeability of air is one, while the permeability of a ferrite is around 1000 to 5000 or so. So if one adds an air gap to the magnetic circuit, one increases the reluctance of the circuit, which decreases the flux. However, the energy density is inversely proportional to the permeability, so the ferrite stores only 1/1000 to 1/5000 of the energy per unit volume that the air gap does. The air gap prevents saturation by reducing the flux, and the energy that is stored by the flux is largely in the gap. Even vacuum can store energy from the electric and magnetic fields it contains; it's the fields that contain the energy in that case, and not the rearrangement of charges or currents in a medium.
Looking forward to more videos about this. I've been trying to fix a switch mode power supply for a KORG keyboard and my knowledge in the feedback loop is very limited. This video has been a huge help and i think I'll take another look at repairing it after your next video.
Actually the voltage dropping at the output is due to the flyback topology. It’s just like a forward of halfbridgd, the output is averaged out, but no need for an output inductor, the transformer does that itself when used in a flyback configuration. But obviously it isn’t a stable voltage, so a flyback loop is needed, and usually it’s made with a voltage reference and an optocoupler for galvanical isolation!
Flyback/ boost.. as the name implies..is mostly for " boosted" output voltages...I e. volts higher than input level..so current is usually lower ... The boost inductor is in series with the transistor switch...on Input power side .....and "THIS" current is measured...in the control circuitry..,here it's not the " load " current that's being measured..even though that's what we need... However in some critical apps. the freewheeling diode current... ( partly it's some of the of real load current ) is measured and used for control... it involves more mathematical derivation and additional equalising circuitry...
Great video, there aren't many video's about propper modern powersupplies out there on TH-cam and reading about the subject tends to get complicated fast 😁
It might be a good experiment to build the same circuit on copper-clad board with a good ground plane. That should cut down a lot of the ringing at the switching transitions. This sort of ringing is what causes a lot of the EMI in switching regulators.
a good ground plane needs to be on a separate copper layer? or just having more area (on the same side) is enough? (with those other design considerations, but I want to know how important are ground planes on independent copper layers)
Looking forward to follow-up videos on TL431 & the switcher IC also. A trick I had picked up from Haseeb Electronics to troubleshoot faulty optocouplers in SMPS is to use a diode on the output of the opto, which helps isolate any feedback circuit issues
Hi, could you explain a bit more about adding a diode to the opto output? How does that help to diagnose an issue? I work with SMPS sometimes so it'd be great to learn a new way to find problems :)
As soon as I saw that fuse popping in the intro I thought "Yup: I'm staying till the end" :)) I was hoping to see what happened. High inrush current most likely, since the main cap is big and there's no NTC to limit it....
Haha.. I remember building my first AC mains supply. I brought it up on a Variac, and all worked perfectly. After thorough testing, I plugged it into the wall directly, and predictably... I popped it.
Could you explain what might happen if one replaces the diode D1 at 5:42 with a bridge rectifier? I've seen such a circuit and I could not explain how the circuit outputs the samething with that it would have worked with a single diode instead of a full- bridge rectifier.
The power supply won't be a flyback anymore. The output capacitor would charge also, when the mosfet turns on, it would be more like forward topology, and the output voltage would depend on duty cycle and transformer's ratio. I've seen something like this, but it was halfbridge with an air gap and no output inductor, an LLC resonant converter, that regulates the frequency instead of the duty cycle.
3 questions 1) the winding direction (dots) of primary and secondary windings is determined depending on the way this transformer was constructed? 2) at the very beggining, how C1 is discharged on the R1 when the switch(MOSFET) is closed (current flows through it) ? I mean how that energy came into C1? ( in that phase the D1 is reversed biased) 3) the isolated GND point of the secondary side, has in some periods of time, voltage which is different than 0?
At least half of that went over my head. That being said, i was really interested to see whats inside, and how all my 12V DC adaptor power supplies that i use for various projects actually work. Out of curiosity, i would love to see in your opinion what a basic VS a well engineered design would look like for one of these circuits. Would be a nice reference if i ever get curious enough to open some and see if they are high quality units or cheap and nasty. Thanks for the video :P
How did you decide on the clamp RC values? Simulating the values of 6:15 I get excessive voltage on the clamp components, close to 1000V because of the large resistance.
Could someone explain how the VCC pin of the NCP1010 gets it's power? In the schematic at 9:20 you can see it's connected to ground via a 10uF capacitor which seems more like a decoupling capacitor? Is that pin connected somewhere else? Any information would be helpful.
Here's how does it work: when the power supply gets plugged in, the 10uF capacitor gets charged through the primary winding and the drain pin of the IC. Then, after charging to a decent voltage, IC starts switching the mosfet, and every time it turns it off, the capacitor gets charged once again. Such a cycle continues.
I didn't quite understand how R2 and C4 work. How do they absorb the energy at 6:38? Does that energy get discharged when the MOSFET closes again? Is there a chance that it disturbs the supply voltage? Also can someone explain what the capacitor and inductance at the output do? I know they are there for filtering purposes but I want to know how they work.
an old question, but since apparently no one answered: The energy from the leakage inductance causes a very narrow spike that occurs right after the FET turns off. R2 immediately begins dissipating the energy stored in the capacitor and that continues until the next time the FET turns off. It requires some care to get R2 and C4 right. If R2 is too high in value it won'd adequately discharge C4 during the time available. If you use more capacitance than you really need for C4 it will absorb more energy than it needs to, charging not just from the spike but from the voltage which follows. (While the energy stored in the inductor is being delivered via the output diode to the capacitor and load when the FET is off, the inducttor does behave like a transformer and the voltage on its output winding is "reflected back" to the input winding by the turns ratio and "stacked on top" of the input supply voltage. The total voltage might be several hundred volts higher than the rectified AC voltage on the input filter capacitor.) There are other techniques for dealing with some or all of the leakage inductance energy.. A high voltage zener can be used. Sometimes you can use an ordinary diode instead of an ultrafast recovery diode for D2. If you do that then the slow reverse recovery of the diode results in some energy being removed from the capacitor when the FET switches on. In some cases (I've used this in a couple of designs) you can simply let the body diode of the MOSFET avalanche like a zener. The instantaneous voltage on the FET may exceed the steady-state maximum voltage rating, but that's OK if the body diode has adequate repetitive avalanche energy rating. This should be done only with discrete FET, not with integrated control/power ICs where the switch is on-chip. They are likely to be destroyed by even a single over-voltage transient. All of these methods require careful analysis to be sure they will do the job reliably. In general, switcher design requires a lot of attention to detail to be sure everything works nicely together. I often say that in switchers everything is in conflict with everything else, so it can be quite a challenge at times.
Small question: why do all transformers of this type always have so many pins? In the circuit you mentioned that it has three identical coils. Why three?
Many are designed to have multiple output voltages or have their windings combined in series to form center-tapped windings. A winding can be used to sense the output voltage rather than an optocoupler (for example a TL431 and PC817 combination) and keep the input and output isolated. The transformer can be used for more types of power conversion. There are several topologies that are often used besides flyback: forward converter, half-bridge, etc. that would use the transformer differently and may or may not need an air gap.
1) multiple secondaries will need them... besides that that's the only reliable way to " anchor" the tx. onto the p.c. board.. 2) many designs include the " self powered " winding on pri. side that takes over once the stable o/p is established...
I just got really curious about the optocoupler, I thought they were digital devices but in this video it's seem like it can work like a variable resistor. I guess that makes sense since they are a transistor in which the gate is controlled by an LED, but, can the LED be turned on partially with linear correlation with voltage? I guess I need to do more research!
Wurth Elektronik: Do your best
Great Scott: *Cuts transformer in half*
DIY == Destroy It Yourself 💥
Flextape can't fix that XD
th-cam.com/video/YtI294cjKMc/w-d-xo.html
"Do not build this circuit! With that being said, here's the schematic" -Great Scott XDD
Everyone should have the access to knowledge ;-) But a warning was still necessary ;-)
It is not a bad circuit to build. It just missing parts that make it a compete power supply unit, and it should not be used as a power supply.
Dodgy! 😉
@@oraszuletikDIODE GONE WILD!!
@@greatscottlab Hi sir. Sir please hack an AR glasses to work on a HDMI input even if the whole setup becomes bulkey. Bigg fan. Love from India ❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️❤️
Great video as always!!! Ignore the YT analytics, if they still show poor results. It's not you, it's them and please don't change your style to try and appease the algorithm. . We're all here for the quality of videos you have always done and this is a perfect example.
Well said! Do not worry. I will keep making such videos as long as I can ;-)
Those waste fake yt videos with crazy thumbnails are making it to yt algorithm.
I would love it if content creators banded together and created a wash of "Shorts" that were titled "do not watch this - nobody asked for it, nobody wants it, this is a waste of time." 30 seconds of vertical video paint drying, grass growing, and similar pointlessness.
When the viewing stats are complete garbage, maybe YT can butt out of trying to dictate content.
Already suggested your channel to all my nerd friends :) great videos. Keep up the great work!
That's like marketing to the next level! Love that!
Well, I wanted to do a video about SMPS and they wanted to show off their transformers.....I would say that is a good match ;-)
.." this is not a promotional pitch..but in all fairness I can say this ( though we were really small customers )
Wurth Elektronik do have " high quality & reliable components and are real serious business partners...
despite we using a limited range and quantity of their products...they went " all out " to respond to our doubts/queries/ end use applications..and sent their team over with substantial dev. kits/ catalogues etc. besides follow ups..
I am ALL FOR THIS. I have a pet project I'm trying to learn up to... I've got a shelf full of game consoles from the Famicom to PS4 Pro. I want to install a high-power 24VDC supply and use isolated switchmode supplies to step down to what each machine needs... 3.3V, 5V, 7-9V, 12V, and so on. (Isolated to prevent ground loops and issues with systems that raise "ground" to a diode drop above one leg of the input jack, like the NES.)
In my research, I've seen planar transformers that use stacked PCB layers to provide galvanic isolation. Since the design is kind of tricky, they're also available as drop-in modules from trafo manufacturers. But, magnetics selection is non-trivial, and I still feel completely lost on this topic. It's really the last domino to fall before I can start building some POC designs.
So, please! MOAR TRAFOS!
Can you make a video about active power factor correction, because it's an important topic with switch mode power supplies. Due to it's big capacitors.
It is on my to do list :-)
Active PFC is fascinating. I think it's just using PWM to draw a sinusoidal current so the current is in phase with the voltage but there might be some more clever stuff going on.
What would be interesting would be to use a microcontroller to do sinusoidal PWN synchronized to a zero crossing detector and see if that performs as well as a commercial APFC chip. I suspect the commercial chip is doing something a bit cleverer than this but it's not well documented. Basically a 'Buy of Build' for active power factor correction.
About 10 years ago I had to simulate an oil refinery electrical power grid. Was a struggle trying to understand how a generator's AVR goes from changing the generator's voltage when it's the only generator on the grid to changing the reactive power supplied when there is more than one generator.
@@greatscottlab sir please make vedio on "how to use lab bench power supply basic to professionally"🙏🙏🙏 (I request you)
@@greatscottlab Awesome! Looking forward to it.I don't suppose you know any good discussions of Actice Power Factor Control algorithms?
Wow, I have watched dozens of videos about SMPS before, but this one really made the subject to click.
Brilliant :-)
So true, this was the best explanation
hi, great video as always. just keep in mind that in case of flyback topology, we aren't really talking about a transformer: since there is a high reluctance gap, a flyback trasformer is more like two mutual inducitors with a very high coupling coefficient.
Me: "hmm yes, I see"
My mate: "you have no idea what's he is talking about do you?!"
Me: "nope he lost me at 'reluctance gap'!"
Hehe 😇 💚
Meh most would still consider that a transformer. RF transformers can be completely air core and we still call them transformers.
@Joseph Bunn great explanation, thanks!
sometimes I have to rewatch these videos because I get so caught up in him writing and labeling so perfectly with no mistakes
Great work! One of the best channels on TH-cam!
Thanks :-)
Finnally somebody goodly explained a flyback converter
You're welcome :-)
I'm coming to electronics later on in life. Your tutorial have to be the clearest and most well explained. Really enjoy and get so much from your videos.
Thanks for your time.
Glad it was helpful!
Fascinating, I'm very happy to have this video from you. I have wondered about Switching mode power supplies for ages, and to have such detail is great - to be fair, I'm 1:03 in, but I know it'll be good.
Edit: I was not disappointed! Thanks.
Glad it was helpful!
When Scott says "RIGHT?" The answer is "NO".
Great content as always! Thanks for sharing your knowledge.
Thanks Würth elektronik for us to learn more about Switch mode power supplies!
U really deserve more sponsors.
8:56 what an absolute madlad lmao. Props man
I am helping with TH-cam algorithm, I am watching again and again. LOVE YOUR CONTENT
Thanks for the help :-)
@@greatscottlab my pleasure
I really love Würth Elektronik's products, and I love them even more for sponsoring you!
9:24 Full Bridge rectifaiaa
Good job GreatScott!!
Thanks :-)
The best description of flyback transformers ever :)
I have been fixing these for years by changing some of the caps..I had a good idea how they worked and you defiantly boosted my understanding of them even further... lots went into the design technically.. thanks
well despite the fact I know how a SMPS works in theory, I didn't know about the specifics about the transformer windings being opposite and the fact it's basically using the charge / discharge of such transformer... I always thought it was due to high frequency switching that it worked like a regular transformer but was just smaller because of the higher frequencies and the square wave... :)
The more you know ;-)
....windings being opposite...
is for " flyback " mode only...also duty cycle cannot/ should not exceed 50%...
@@analoghardwaretops3976 The flyback can go to as high of a duty cycle as you like within the practical limits of maintaining control, as long as the switching transistor can handle the reflected voltage. I think you're thinking of the forward converter, which is one where you can't exceed 50% with the standard design
@@ShinyMajor exceeding 50% , the volt/ sec. balance in
off- to -on may not be achieved..and can lead to core saturation even in boost/ flyback modes.. leading to gradual residual flux buildup...
so when it's @ the extreme limit of the hysterisis curve..the next turn on pulse ..in its first few hundreds of nanosecs.can destroy the sw. with uncontrollable current..
Chips for flybk./ boost have an internal divide by 2 f/f to limit max. duty to 50 % ..
example..compare data sheet for internal blk.dia. of 3842/43 or other..
Nice, something interesting to watch while waiting for the F1 GP to start, haha
Exactly...
I already lost hope lmao I honestly want to see a good race without rain
Same here hshshshshsh
Yes in this demo it was built without any " soft start ".. unlike the G.P. races that can Never begin with a soft start 😂😂😂
I usually use bare wire to do these prototyping circuits. Saves some solder and less headache of solder bridges.
Stay creative , and I will see you next time. Always brings a smile to me, great video as always, only getting better and better
Thank you! Cheers!
TH-cam: DIY power supply without explanation
Great Scott: *explains everything thoroughly*
Best channel in this topic is DiodeGoneWild.
Just can't wait for the video on the TL431. I'd love to see, how I could use it, to regulate the output of a dc-dc converter (which aren't so different from smps). For example to battery power a microcontroller based temperature logger.
This makes understanding those circuits I copied down from circuits I worked with before alot easier..
Man you are my virtual teacher.... ❤️
Happy to help!
Excellant explanation to a topic I have been wanting to understand for years. Yes, please cover the topic of voltage references. You are my inspiration to build electronics.
Glad I could help :-) I hope I will get to this video soon.
Great, I was looking for this topic from may days.thanks to German friend from India. 😀😀😀
Very well explained ❤
Thanks a lot 😊
6:23 Well, actually the mosfet can get overvoltaged even if the leakage inductance is zero. Here's an example: we built a flyback SMPS, that converts 325V DC into 12V DC. The transformer's ratio is 20:1, and Vd-s(max) of our mosfet is 500V. Whet the mosfet opens, the energy from the core gets transfered to the secondary side, where we have 12V, so the voltage on the secondary winding is about 12.6V (due to fast diode's voltage drop). Knowing the transformer's ratio, which is 20:1, we can calculate, that the voltage on the primary winding is 12.6V * 20 = 252V. This voltage adds to 325V, that we already have on the mosfet's drain, so at the end we have 577V there! As you can see, the 500V was exeeded. Even the 600V mosfet wouldn't be enough, because of the leakage inductance, which also adds some voltage to our 577V. To solve the problem, we could use a transformer with lower ratio, for example 2:1. But here another problem begins: when the mosfet turns on, the voltage on the secondary diode will be 12V + 162.5V = 174,5V. Our diode have to maintain this quite a high voltage. That is why we have to be careful when it comes to choosing a transformer, a mosfet and a secondary diode for our flyback power supply. In a described example, optimal transformer's ratio would be 5:1
Voltage wise factor of safety..2.5 x.. (+20%consider input o.v. condition) so( 325+65 )× 2.5...but now new device rDS " on" will be higher...
Very good points, thanks for sharing
I love this! I have always wanted to make a switching power supply. My next big project is going to be one of these thanks to you. Wish me luck!
Be careful though
@@greatscottlab Yes! I watch DiodeGoneWild, and my intention is to make the most absudly safe power supply ever built.
If you know who he is, he always critiques PSUs for missing safety features and such. Not going to miss any of those. I will be using overkill air gaps and components, and cables too thick.
Thanks for the reminder though!
Very helpful video. I liked it 👏
Video includes FULL BRIDGE RECTIFIER 10/10
Clearly understood.... It was too hard to understand about smps.... Thank you it was helpful... 😊😊😊
"..........with that being said here's the schematic."- the reason I love your videos
That's if you want to build a professional one users descretion is required
Awesome video GreatScott!.
To help newbies who may not be always fully aware of how oscilloscope measurements should be approached especially with mains connected circuits, can you please do a follow-up video showing exactly how you had connected all devices, especially the isolation transformer & scope ground leads.
If you can also demonstrate scope differential probes in such situations, this would be super
I did a video about how to use an oscilloscope properly. There all those things are explained.
Feel like a traitor for missing out on your content lately, you still do an amazing job but I have a long way to become an engineer(like 2 years)
1:02 ElectroBoom is proud
😂✅
As always well presented. Someone below asked about PF correction. Along with that, maybe do a video that turns this into a true power supply with PF correction, filtering, in rush limiting and isolation. That would be an interesting follow up !
Thanks for the feedback :-) Let's see what I can do
I m following last 2-3 years... and learn a lot from every video... also tried many circuits... please make next video on TL431...
Thanks for watching :-) I hope I will get to the TL431 video soon.
From all of your video, this is the first video which i felt has less content and knowledge. I think it can get more informative... Apart from this, i love your video, always get something to learn.... Thank you sir.... ☺
Thank you. I have a big box of these I bought eBay as a mixed bag for £1 ages ago and having tested the coils resistances was puzzled. The box remains! I will try testing them with low voltage at 60kHz Might be more informative. Very good explanation. I vaguely knew how they worked. Now I know more :)
Pretty interesting! Thanks a lot, dude! 😃
Stay safe and creative there! 🖖😊
Maybe you could try to build a differential probe in a DIY or Buy episode. They are very expensive yet not too complicated.
Flyback converters are fine for low power phone chargers and such, What about forward converters? (single ended, two switch forward, half bridge, full bridge, with asynchronous and synchronous rectification pros/cons) or even better, what about LC, LLC and LCC converters?
We always listen to your advice about mains voltage, but, is there a safe wafe to work with mains voltage? How do you work with mains voltage? Greetings from Chile!!
It's nice to understand how these things work. Sounds complicated but really isn't. Also preparing my moped project for 1.6kw charger integration. So exciting stuff. Great Scott!!
You can do it!
What power supply can you recommend for home projects, what do you use for power amps and where do you find them?
"diode gone wild" is best in this subject
Love DiodeGoneWild !
Thank you. Your videos are amazing.
So nice of you
Why does the output voltage rise when increasing the duty cycle? Shouldnt it be the other way around? With the NMOS used in this case, the switch on-time is longer so the capacitor has to transfer more of its saved energy due to a longer off time on the secondary site?
I'm still learning and haven't used AC yet. I got a 220v - 9v AC to try the AD-DC circuit when confident enough.
In the video, you mentioned about the air gap but didn't explain why it's used, I still have this doubt on how energy is stored in the air, and why does it fly when the transformer get turned off. Will there be a next video about it?
The ferrite of the transformer is a magnetic circuit in which the magnetic flux introduced by the magnetizing current of the primary side is carried between the primary and secondary windings. For a conventional transformer, these are carried with a low "reluctance" path to ensure that that the energy is transferred to the secondary winding simultaneously with it being introduced into the primary winding. This can only happen because there is a current set up in the secondary by the magnetic flux at the same time that the primary is generating the magnetic flux.
In a flyback, there is a diode blocking a current flowing in the secondary while the primary is magnetizing the ferrite. The primary magnetizes the ferrite, and it would hit a limit called saturation at which point the ferrite can no longer be magnetized any further. To prevent this, an air gap is introduced into the magnetic circuit in which the flux lines flow. This increases the reluctance of the magnetic circuit and reduces the amount of flux induced into the circuit given a magnetizing current. Energy is stored in the magnetic field, most of it in the air gap. When the switch shuts off and the primary current stops, the magnetic flux stored in the ferrite is no longer sustained. The magnetic field collapses, and by Faraday's law a voltage and therefore current is induced into the secondary permitted by the diode. The capacitor is charged in the secondary and the power can be transferred to the circuit.
So one of the biggest differences is that a flyback stores energy in the gap and transfers it in separate steps, whereas a conventional transformer transfers the power during the same cycle from primary to secondary. The air gap stores the energy in the flyback that is transferred from primary to secondary.
Thanks for the nice explanation :-)
Really great explanation @profdc9
@@profdc9501 thanks a lot, it clarifies very much of my understanding, however for me it's still a black magic on how air can hold so much energy (technically, all the energy that passes over the power supply was once passed thru the air gap).
@@WagTsX The magnetomotive force applied to the ferrite magnetic circuit is equal to the number of turns multiplied by the current in each turn. This is equal to the magnetic flux times the reluctance in the circuit. The energy density stored in a magnetic field is 1/2u B^2 where u is the magnetic permeability. The permeability of air is one, while the permeability of a ferrite is around 1000 to 5000 or so. So if one adds an air gap to the magnetic circuit, one increases the reluctance of the circuit, which decreases the flux. However, the energy density is inversely proportional to the permeability, so the ferrite stores only 1/1000 to 1/5000 of the energy per unit volume that the air gap does. The air gap prevents saturation by reducing the flux, and the energy that is stored by the flux is largely in the gap. Even vacuum can store energy from the electric and magnetic fields it contains; it's the fields that contain the energy in that case, and not the rearrangement of charges or currents in a medium.
"This is super dangerous, don't rebuild it, now here's the schematic " I couldn't stop laughing
I love your videos but I wish you had longer versions with more in depth explanations so that idiots like me could keep up.
Looking forward to more videos about this. I've been trying to fix a switch mode power supply for a KORG keyboard and my knowledge in the feedback loop is very limited. This video has been a huge help and i think I'll take another look at repairing it after your next video.
Another quality video from the best quality creator on this platform(BTW pls can you make another video using a raspberry pi ?)
Thanks mate :-)
Actually the voltage dropping at the output is due to the flyback topology. It’s just like a forward of halfbridgd, the output is averaged out, but no need for an output inductor, the transformer does that itself when used in a flyback configuration. But obviously it isn’t a stable voltage, so a flyback loop is needed, and usually it’s made with a voltage reference and an optocoupler for galvanical isolation!
Flyback/ boost.. as the name implies..is mostly for " boosted" output voltages...I e. volts higher than input level..so current is usually lower ...
The boost inductor is in series with the transistor switch...on Input power side .....and "THIS" current is measured...in the control circuitry..,here it's not the " load " current that's being measured..even though that's what we need...
However in some critical apps.
the freewheeling diode current...
( partly it's some of the of real load current ) is measured and used for control...
it involves more mathematical derivation and additional equalising circuitry...
@4:40 Why not use full bridge rectifier at secondary side?
Great video, there aren't many video's about propper modern powersupplies out there on TH-cam and reading about the subject tends to get complicated fast 😁
Glad it was helpful!
Press F for the poor transformers.
Great video by the way!
Thanks!
When the MOSFET switch is open, is the negative side of the primary floating (i.e. being undefined) ?
WONDERFUL EXPLANATION❤🎊🎊🎊
It might be a good experiment to build the same circuit on copper-clad board with a good ground plane. That should cut down a lot of the ringing at the switching transitions. This sort of ringing is what causes a lot of the EMI in switching regulators.
a good ground plane needs to be on a separate copper layer? or just having more area (on the same side) is enough? (with those other design considerations, but I want to know how important are ground planes on independent copper layers)
@@johndododoe1411 I don't think so. I've spent years troubleshooting EMC problems, and ringing in switchers is a classic issue.
Amazing video. I always wondered how usbc PD is able to achieve different voltages, and this video is the answer - PWM with different duty cycles.
Looking forward to follow-up videos on TL431 & the switcher IC also.
A trick I had picked up from Haseeb Electronics to troubleshoot faulty optocouplers in SMPS is to use a diode on the output of the opto, which helps isolate any feedback circuit issues
Hi, could you explain a bit more about adding a diode to the opto output? How does that help to diagnose an issue?
I work with SMPS sometimes so it'd be great to learn a new way to find problems :)
As soon as I saw that fuse popping in the intro I thought "Yup: I'm staying till the end" :)) I was hoping to see what happened. High inrush current most likely, since the main cap is big and there's no NTC to limit it....
Haha.. I remember building my first AC mains supply. I brought it up on a Variac, and all worked perfectly. After thorough testing, I plugged it into the wall directly, and predictably... I popped it.
Could you explain what might happen if one replaces the diode D1 at 5:42 with a bridge rectifier?
I've seen such a circuit and I could not explain how the circuit outputs the samething with that it would have worked with a single diode instead of a full- bridge rectifier.
The power supply won't be a flyback anymore. The output capacitor would charge also, when the mosfet turns on, it would be more like forward topology, and the output voltage would depend on duty cycle and transformer's ratio. I've seen something like this, but it was halfbridge with an air gap and no output inductor, an LLC resonant converter, that regulates the frequency instead of the duty cycle.
3 questions
1) the winding direction (dots) of primary and secondary windings is determined depending on the way this transformer was constructed?
2) at the very beggining, how C1 is discharged on the R1 when the switch(MOSFET) is closed (current flows through it) ? I mean how that energy came into C1? ( in that phase the D1 is reversed biased)
3) the isolated GND point of the secondary side, has in some periods of time, voltage which is different than 0?
At least half of that went over my head. That being said, i was really interested to see whats inside, and how all my 12V DC adaptor power supplies that i use for various projects actually work. Out of curiosity, i would love to see in your opinion what a basic VS a well engineered design would look like for one of these circuits. Would be a nice reference if i ever get curious enough to open some and see if they are high quality units or cheap and nasty. Thanks for the video :P
Thanks for the feedback :-) I will see what I can do ;-)
Most of that went over my head, too...
Just at the right time😍🔥... Eagerly waiting for the next video🔥
That's a type of video I like a lot. Lots of stuff to learn. Thank you.
How did you decide on the clamp RC values? Simulating the values of 6:15 I get excessive voltage on the clamp components, close to 1000V because of the large resistance.
Could someone explain how the VCC pin of the NCP1010 gets it's power? In the schematic at 9:20 you can see it's connected to ground via a 10uF capacitor which seems more like a decoupling capacitor? Is that pin connected somewhere else? Any information would be helpful.
Here's how does it work: when the power supply gets plugged in, the 10uF capacitor gets charged through the primary winding and the drain pin of the IC. Then, after charging to a decent voltage, IC starts switching the mosfet, and every time it turns it off, the capacitor gets charged once again. Such a cycle continues.
@@__MINT_ Oh so the capacitor on the VCC pin is not actually power coming in but is used to store energy to keep the IC running?
@@justcallme00oogy Yes
@@__MINT_ ah alright that makes sense! Thanks! That had really bugged me
@@justcallme00oogy You're welcome
Nice video !!! Really loved it!!!
Will you make a detailed video how these power electronics produce harmonics in systems and their remedies??
Watch my video about power forms.
I kept looking at my phone because your background music sounds like one of my ringers. LOL
Wish you did more videos on switch mode power supply.
Anyways great video, keep it up
Maybe there will be more..... ;-)
I definitely agree
I didn't quite understand how R2 and C4 work. How do they absorb the energy at 6:38? Does that energy get discharged when the MOSFET closes again? Is there a chance that it disturbs the supply voltage? Also can someone explain what the capacitor and inductance at the output do? I know they are there for filtering purposes but I want to know how they work.
an old question, but since apparently no one answered:
The energy from the leakage inductance causes a very narrow spike that occurs right after the FET turns off. R2 immediately begins dissipating the energy stored in the capacitor and that continues until the next time the FET turns off.
It requires some care to get R2 and C4 right. If R2 is too high in value it won'd adequately discharge C4 during the time available. If you use more capacitance than you really need for C4 it will absorb more energy than it needs to, charging not just from the spike but from the voltage which follows. (While the energy stored in the inductor is being delivered via the output diode to the capacitor and load when the FET is off, the inducttor does behave like a transformer and the voltage on its output winding is "reflected back" to the input winding by the turns ratio and "stacked on top" of the input supply voltage. The total voltage might be several hundred volts higher than the rectified AC voltage on the input filter capacitor.)
There are other techniques for dealing with some or all of the leakage inductance energy.. A high voltage zener can be used. Sometimes you can use an ordinary diode instead of an ultrafast recovery diode for D2. If you do that then the slow reverse recovery of the diode results in some energy being removed from the capacitor when the FET switches on. In some cases (I've used this in a couple of designs) you can simply let the body diode of the MOSFET avalanche like a zener. The instantaneous voltage on the FET may exceed the steady-state maximum voltage rating, but that's OK if the body diode has adequate repetitive avalanche energy rating. This should be done only with discrete FET, not with integrated control/power ICs where the switch is on-chip. They are likely to be destroyed by even a single over-voltage transient. All of these methods require careful analysis to be sure they will do the job reliably.
In general, switcher design requires a lot of attention to detail to be sure everything works nicely together. I often say that in switchers everything is in conflict with everything else, so it can be quite a challenge at times.
Great video. I love learning about electronics and your explanations are very good.
Small question: why do all transformers of this type always have so many pins?
In the circuit you mentioned that it has three identical coils. Why three?
Many are designed to have multiple output voltages or have their windings combined in series to form center-tapped windings. A winding can be used to sense the output voltage rather than an optocoupler (for example a TL431 and PC817 combination) and keep the input and output isolated. The transformer can be used for more types of power conversion. There are several topologies that are often used besides flyback: forward converter, half-bridge, etc. that would use the transformer differently and may or may not need an air gap.
1) multiple secondaries will need them...
besides that that's the only reliable way to " anchor" the tx. onto the p.c. board..
2) many designs include the
" self powered " winding on pri. side that takes over once the stable o/p is established...
Im watching Scott from Philippines
👍👍👍 good video
Thanks 👍
Please build a switch mode power supply with all those features you spoke about, the inrush current protection and such. Would be awesome!
Very informative 👏 thanks
Thanks a lot scot that subject is much clear to me now
Really a great video as always 👍👍
That TL431 sure gets around a lot.
Valeu!
I just got really curious about the optocoupler, I thought they were digital devices but in this video it's seem like it can work like a variable resistor. I guess that makes sense since they are a transistor in which the gate is controlled by an LED, but, can the LED be turned on partially with linear correlation with voltage? I guess I need to do more research!
Thanks for the support. I will talk about the optocoupler working behaviour in the video with the TL431.
I want to make automatic day night light sensor ,which power supply should i use cappacitive dropper or smps:-)
Thank you. More videos like this are welcome.
Very Nice.... ❤️❤️from Bangladesh!
Thank you so much 😀
🤩🤩 Good work
🔥🔥
Little, question, can you advice me a beginner oscilloscope?
Eagerly waiting for it and the outcome is lot more informative good one dude keep it up
Thanks, will do!
Awesome as always ❤️🔥
finally a video on smps🤩🤩😘. thanks :)