Reverse inductor current in flyback - Page 1
Forum section: electronics / beginners

author: Khat
author_rank: Newbie
timestamp: July 18, 2025, 08:23:40 pm
content: I've been designing a DCM Flyback to boost 5v to ~400v, I've done the math and simulating with an ideal model I was able to get the results I was looking for, with a clean current waveform.(Screenshot of the circuit with ideal switches)(Screenshot of the output voltage and current across the primary inductor's waveform)However as soon as I switched my ideal switches for component models I saw that the current running through the inductor was a mess, lots of switching noise.(Screenshot of the circuit with selected components)(Screenshot of the current across the primary inductor and the MOSFET's Gate's voltage and current waveform)After adding some snubbers I got the above waveform which shows significant reverse current across the inductor, which I haven't been able to find any answers to.I do get a voltage of ~280v which is not quite ideal but I guess I could just tinker with it until I get 400v.I'm trying to figure out why this is happening but all I can guess is that it might have to do with the impedance on the secondary / load, or perhaps the load is just really small and leads to unstable behaviour? Something else I considered is ringing on the MOSFET's Gate causing current to flow, but looking at the waveform it seems that the voltage is too low for that and SPICE might just be sensitive?I'm tempted to simply assemble the circuit and try it out, but I'm hesitant since I'm not sure if this is an actual issue or if it's fine.Any help / suggestions would be appreciated.P.S. I've left the .asc of the second circuit attached.

author: Analog Kid
author_rank: Super Contributor
timestamp: July 18, 2025, 09:21:18 pm
content: Yes, those waveforms do look a bit messy. But I'm curious: why exactly is this a problem?Are you concerned about RFI here? or inefficiency?Or just dissatisfied with less-than-ideal circuit operation (which I completely understand)?Yes, maybe just build it and 'scope it.

author: Andy Watson
author_rank: Super Contributor
timestamp: July 18, 2025, 09:37:54 pm
content: 1N4007 are not the fastest. Try a faster diode, perhaps a UF4007.

author: MariuszD
author_rank: Regular Contributor
timestamp: July 19, 2025, 08:36:26 am
content: The parasitic capacitance of the MOSFET and/or diode causes this. In the actual circuit, it will be worse due to the parasitic capacitance of the winding.At the end of the diode's conduction time, the current through the diode flows in the opposite direction due to both slow turn-off and capacitance.

author: MrAl
author_rank: Super Contributor
timestamp: July 19, 2025, 01:16:47 pm
content: Quote from: Khat on July 18, 2025, 08:23:40 pmFirst off, you can't use a rectifier diode. They are made for 50 to 400Hz. You need at least a Schottky diode or other high speed diode. Rectifier diodes can cause various problems.Also, Mosfets can oscillate if they are not wired right. Keep the source circuit wires short and direct.

author: Khat
author_rank: Newbie
timestamp: July 19, 2025, 01:52:55 pm
content: Quote from: Analog Kid on July 18, 2025, 09:21:18 pmI was just worried because all the textbooks and other resources show a nice and clean waveform, with no reverse current, so I didn't know if it was an issue.Yeah I'll build it.Quote from: MariuszD on July 19, 2025, 08:36:26 amYeah it was this, switching the diode for a faster one mitigated the issue.Thanks to everyone who took time to reply!

author: MariuszD
author_rank: Regular Contributor
timestamp: July 19, 2025, 05:26:19 pm
content: Quote from: Khat on July 19, 2025, 01:52:55 pmWaveforms in real circuits are much worse. Voltage doesn't look like square wave, current doesn't look like sawtooth Sometimes the flyback cannot achieve the nominal voltage and power due to parasitic capacitance.

author: Analog Kid
author_rank: Super Contributor
timestamp: July 19, 2025, 05:28:29 pm
content: Quote from: MariuszD on July 19, 2025, 05:26:19 pmSo the moral of the story is to keep your wiring neat and as short as possible, yes?

author: MariuszD
author_rank: Regular Contributor
timestamp: July 19, 2025, 05:38:12 pm
content: Quote from: Analog Kid on July 19, 2025, 05:28:29 pmThe main cause of waveform distortion and voltage limitation is the parasitic capacitance of the secondary winding. It's difficult to make a multi-turn winding with short wireWires outside the winding do not have significant parasitic capacitances. Wires inside winding are very close to each other that’s make capacitance significant.

author: Analog Kid
author_rank: Super Contributor
timestamp: July 19, 2025, 10:30:42 pm
content: Quote from: MariuszD on July 19, 2025, 05:38:12 pmWell, as your reply implies, there's not much you can do about that, is there?Any decent transformer is going to have closely-wound coils, and therefore some amount of parasitic capacitance. Just a fact of life that every circuit designer has to deal with.