Simple PWM Flyback driver tutorial

 by Electorials
Featured
IMG662.jpg
Hi there,

This is an instructable for making your own PWM (Pulse Width Modulated) flyback driver!
The design is relatively simple and easy to make if you have basic electronic skills.
In fact, you don't even have to know how a transistor or a MOSFET works to make this. You only have to follow the instructions.

What the PWM driver does:
The driver is fed by a 12V power supply (a regular DC adapter). This DC voltage is chopped into pieces by our MOSFET because it rapidly switches the 12V on and off. This switching is controllable by two potentiometers. One for the ON-time and one for the OFF-time.
If the ON-time and the OFF-time are equal, the output voltage will be 6V.
If the ON-time is larger then the OFF-time, the output voltage will be between 6V and 12V
If the ON-time is smaller then the OFF-time, the output voltage will be between 0V and 6V.
So with this feature, we can control the average voltage that our primary Flyback coil gets. This will change the output voltage.

When we make sure both potentiometers have the same resistance value, we'll create a block-wave signal that has the same ON- as OFF-time. Decreasing the resistance (of both potentiometers, at the same time) will increase the frequency of the output signal. Increasing the resistance will decrease the frequency.

We now have controllable ON- and OFF-time, and controllable frequency, so this driver is perfect for Any flyback transformer! (Each flyback transformer works better on another frequency).

The operating frequency of the flyback transformer goes somewhere from 15kHz to 50kHz. My flybacks operate best at 20kHz.

(oh, and the power supply doesn't need to be exactly 12V. You can also use a 30V supply or something a little lower then 12V).

Preview video of the PWM driver:

 
Remove these adsRemove these ads by Signing Up

Step 1: Requirements

IMG661.jpg
- soldering iron with solder
- a PCB
- a power supply (DC adapter 12V to 20V)
- a heatsink (the size of the heatsink depends on the flyback and on the type of MOSFET, you'll have to experiment)
- a MOSFET (I used an IRFB17N50L because they're awesome)
- wire for making connections at the bottom of the PCB
- 2x potentiometer 100kohm
- 2x resistor 260ohm 250mW
- 2x resistor 1kohm 250mW
- 1x resistor 4k7ohm 250mW for the LED (high resistance so that we can also use greater power supplies)
- 2x capacitor 3.3nF polyester film or something close to that
- 2x NPN transistor (regular transistor)
- a small pushbutton (not required)
- a flyback transformer (not required)
- a FAN connector for inserting the MOSFET (not required, you may solder it directly on your PCB)

The picture above here shows how the components look like.
1-40 of 87Next »
leviterande says: May 18, 2013. 5:22 PM
Hi, First of all your driver and tutorial is the a clear and fulfilling one! you seem to be the guy I have been looking for to answer my question killing me for ages now. I don't know where to contact you, but anyway I want to charge/discharge around say- a 1nF capacitor with this flyback, is it possible? will the cap be fully charged and discharged each cycle of the frequency that we choose? Your help is extremely appreciated.
Regards
Karl
Electorials (author) in reply to leviterandeMay 19, 2013. 1:43 PM
Hello,

I'm not really sure if I understand the question.
So you want to charge a capacitor with high voltage?

For the frequency, I don't know how to calculate how fast the capacitor will charge because the output current is unknown.

It will just be trial and error :P

Greetings,
Fallout
Nicola Tesla says: Mar 29, 2013. 7:22 AM
Ugh. Like on any electronics project i do, it isn't working for me. I triple checked it. I made sure all the connections were good. Still nothing. When i attach a 12v battery, the light turns on, but past that nothing. When i attach a voltmeter to the output, i get ~50mv (megavolt) out of it, which is probably the caps. I bought all the parts from digikey, all to your specifications. I still cant figure it out. help me maybe?
Electorials (author) in reply to Nicola TeslaMar 30, 2013. 10:19 AM
Hmm that'e weird,
Can you measure Vgs and Vds (gate-source and drain-source voltage) of the mosfet while it's running?
Nicola Tesla in reply to ElectorialsMar 30, 2013. 10:53 AM
And only .7 volts go into the source...
Nicola Tesla in reply to ElectorialsMar 30, 2013. 10:52 AM
The gat source is only .013 volt O.o And the Drain is 0 volt... Thats not good is it...
Electorials (author) in reply to Nicola TeslaMar 30, 2013. 8:04 PM
ok, and did you measure this while a load was connected on the output? or was the output just an open connection?
Nicola Tesla in reply to ElectorialsMar 30, 2013. 8:07 PM
Open. what type of load would you recommend to put on it to measure the voltage? Anything i usually put on it, whether it be a motor or a flyback, noting works.
Electorials (author) in reply to Nicola TeslaMar 31, 2013. 7:10 PM
hmm can you also do a measurement with a closed output? Preferably a resistive load. (so not motor/flyback, but a resistor, light bulb, ...)
Nicola Tesla in reply to ElectorialsApr 1, 2013. 8:28 AM
I attached a neon bulb to it... Source gate i got .007 volt, and drain i got .004 volt. I will be borrowing a scope soon, and will measure it with that to be more accurate.
Electorials (author) in reply to Nicola TeslaApr 1, 2013. 3:38 PM
hmm the two transistors are just not working :/
Can you measure the base-emittor and collector-emittor voltage on both transistors?
You don't really need a scope, the readings don't need to be more accurate, but from the moment the circuit works, a scope would be really nice to visualize what is going on.
Nicola Tesla in reply to ElectorialsApr 1, 2013. 3:51 PM
Ok, so, attach a load, and do the same thing with both transistors? Everything is new except two resistors and the LED. I don't think i burned out the transistors... When i soldiered it, i used 400F and didn't keep it on for more than a few seconds...
Electorials (author) in reply to Nicola TeslaApr 2, 2013. 2:48 AM
ok, good,
but for measuring at the transistors, no load needs to be attached now :)
Nicola Tesla in reply to ElectorialsApr 2, 2013. 7:01 AM
For the one of them, between Base and Emitter, 9.48v, and between base and collector 10.22v For the other one between Base and Emitter 10.83v, and Base and collector 12.28v. Maybe i wired them in wrong? I checked on the datasheet, and wired them in according to that.
Electorials (author) in reply to Nicola TeslaApr 2, 2013. 3:07 PM
And did you test by pushing a button like on the schematic? Or shortly jumping that connection with a wire? That might start the oscillator
btw, I'd also need the collector-emittor voltage, not the base-emittor voltage ^^
Nicola Tesla in reply to ElectorialsApr 2, 2013. 3:19 PM
I have pushed the switch, One of them is .76v the other 1.46v
Nicola Tesla in reply to Nicola TeslaApr 16, 2013. 8:21 PM
Any ideas? you seemed to stop replying.
donmatos says: Jan 6, 2013. 12:47 PM
se admite questões estúpidas, as ignorantes não serão problema, creio. apesar de leigo em eletrônica, sou fascinado pelo tema. tenho tentado executar alguns dos seus vários instructables, obtendo exito em boa parte dessas tentativas. sou hobbysta interessado  na aplicação de diversos materiais, e não num ofício específico. minhas pcbs de sucata não poderiam ser transportadas num carro pequeno... eu olho pra elas, e elas pra mim... e me perguntam: e aí? ... flybacks despencam das prateleiras... então, por favor me diz (caso tenha algum tempo pra responder a estas abobrinhas): em que projetos eu poderia utilizar esses monstrinhos. já te agradeço, apenas por ter lido até aqui,obrigado.
Electorials (author) in reply to donmatosJan 6, 2013. 1:09 PM
É muito difícil entender o que você está dizendo. Usando Traduz Google, parece que você está perguntando como você pode usar as curgetes; abobrinha, em um projeto. Mas eu acho que você está falando Zucchini Legrand dispositivos de alta potência?

Poderia explicar-me mais? Eu não entendo muito bem :/
Electorials (author) in reply to donmatosJan 6, 2013. 1:08 PM
It is quite difficult to understand what you are saying. Using google translate, it looks like you are asking how you can use courgettes; zucchini, in a project. But I think you're talking about Legrand Zucchini High Power devices?

Could you explain me more? I don't quite understand :/
donmatos in reply to ElectorialsMay 9, 2013. 5:43 PM
Primeiro, muito obrigado por responder meu comentário; e, segundo, acho que exagerei com vocábulos do dialeto local, e mesmo assim vc ainda conseguiu entender. Parabéns pela perspicácia. A dúvida: eu preciso saber sobre as aplicações das fontes de alta tensão: ou seja, em quais dispositivos (aparelhos) eletro-eletrônicos elas podem ser utilizadas? Em resumo, qual a utilidade delas (fontes HV) nas tarefas do nosso dia-a-dia? Só alguns exemplos. Obrigado, mesmo.
mgingerich says: Jan 1, 2013. 7:36 PM
I have an explanation for the need for a pushbutton, if you haven't already figured it out. This circuit is based on an astable multivibrator, which means it oscillates between two states, neither of which is supposed to be stable. However, when the power is interrupted, it sometimes gets "stuck" in one state. The pushbutton forces a capacitor to discharge, starting the oscillation again. I had this problem with a similar noisemaker circuit.
Electorials (author) in reply to mgingerichJan 2, 2013. 3:23 AM
Indeed ;)
miar56 says: Nov 29, 2011. 11:15 AM
Will this work using a MTW32N20E mosfet. It's a N channel but seems to have an internal Zener across the source and the gate?
Electorials (author) in reply to miar56Nov 29, 2011. 1:42 PM
This mosfet is good.
The diode protects the mosfet, most mosfets have one there.
nbeched in reply to ElectorialsDec 6, 2012. 9:55 PM
Hello, my friend, how have you been?
Very nice instructable.

Just to add to what you said, diode inside a MOSFET is part of the construction of the transistor, it is pretty much a "good" side effect (although, in some cases undesirable).
However, it is always safer to use an external diode for additional protection. Inductive kickback can still destroy a MOSFET.
An average diode costs on the order of $0.10 to $5.00 (depending on speed and current rating), while a power MOSFET can easily go up to $10-$100 (or even more, again, depending on the parameters)...

Good luck in your flyback transformer "testing" and remember to always exercise safety.
Electorials (author) in reply to nbechedDec 7, 2012. 10:08 AM
Hey, it's nice to hear from you again!
I'm doing good ;) and you?
And thanks! :P
geckomage says: Nov 28, 2011. 9:46 AM
i was referring to my plasma speaker ;D it has filter caps ^__^
Electorials (author) in reply to geckomageNov 28, 2011. 1:57 PM
ok ;)
UATradition says: Nov 22, 2011. 1:41 PM
Got it working on led's and DC motors but not for my flyback ..... however - Once I turn up the on time pot all the way the led on board gets dim and the flyback makes a click - ? Ant idea of what this could be ? And it doesn't matter where the other pot is unless it's all the way up too - that's the only time the led on board stays bright.
Electorials (author) in reply to UATraditionNov 22, 2011. 2:00 PM
I think your supply can't deliver enough current.
geckomage says: Nov 21, 2011. 6:32 AM
hello my friend, how have you been? :P will this one work decently compared to the ultimate one? because i have the parts for this but not for the ultimate one :P nice bug zapper btw! also i noticed you have a fairly big coil on your flyback. for my flyback i used 14 awg wire and 6 turns xD
Electorials (author) in reply to geckomageNov 21, 2011. 10:32 AM
Hi there, I'm fine ^^ thanks

I have more turns on the flyback's primary because my power supply can only deliver 3A.

thanks for the bug zapper haha :D

And yes, this one also works fine ;) I still use it.
geckomage in reply to ElectorialsNov 22, 2011. 6:08 AM
ohh.. this is right o.o i might have to adjust that for when i have to run this thing without two robot batteries xD poodles. i might try to find a good wall power supply that can deliver like 10 amps or w/e is needed. :3 my lil circuit is working properly all bread boarded up. only thing missing on the circuit is the filter caps, and the flyback/mosfets. (the signal goin to the mosfets thats spose to be flipped in reverse with a GDT is workin aight though throwin out 24 v like its spose to :D) soo when i actually make this thing, im hoping it will work! :D what you workin on next?
Electorials (author) in reply to geckomageNov 22, 2011. 9:54 AM
filter caps? there are no filter caps on this circuit.
I'm not really working at something right now, I'm quite busy :(
UATradition says: Nov 21, 2011. 6:54 PM
Will different capacitors work with this ? And also what about a capacitor bank ?
UATradition in reply to UATraditionNov 21, 2011. 9:27 PM
Also the materials say 2 x 260ohm resistors but the schematic says 560 ??? I'm going to go with the 260 right now ! Maybe you'll catch me before it's too late !! HA !
Electorials (author) in reply to UATraditionNov 22, 2011. 9:50 AM
Oh no, it's 560ohm, sorry.

and you'll have to use two the same capacitors.
UATradition says: Nov 21, 2011. 6:41 PM
(removed by author or community request)
budhaztm says: Nov 8, 2011. 3:52 PM
I need some assistence on the mosfet. im pretty confident i wired the two smaller transistors in correctly but im not sure how to wire the big one
1-40 of 87Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!