Efficient PWM driver (flyback or other applications)

This PWM driver has lots of features, is easy to control and doesn't require many components to build!

• adjustable frequency (from 0 to 50kHz, or even higher)
• adjustable duty-cycle, pulse width (from 0% to 100%)
• MOSFET controlled
• relatively low heat production due to fast PWM switching times
• relatively small heat-sink for the MOSFET
• high current output (depending on power supply and MOSFET but it's possible to get 20A+ out of it)
• high voltage range for the load (depending on the maximum voltage of the MOSFET (Vds), 200V is possible)
• voltage range for the driver from 3 to 30V (depending on the maximum voltage of the OpAmps and Vgs of the MOSFET)
• possibility to use separate power supplies (one for the driver circuit (9V battery would be good) and one for the load)

Possible applications:
• DC motor speed controller
• light dimmer
• flyback driver (optimised for this application, no feedback coil required)
• stroboscope (also perfect for this application)
• CCFL driver
• tone generator (with speaker attached)
• FAN speed controller
• high efficiency voltage regulator for any application
• wormhole creator (or maybe just not that)

All with just two potentiometers!
One for frequency and one for pulse width.

Testing the driver with 12V input, and a small flyback transformer:
Remove these adsRemove these ads by Signing Up
I understand all electrical parts/components have a mathematical equation to them.
What I am Currently in need of, is the math relating to pulse frequency and high voltage.
IE; as High frequency as possible and as high voltage as possible.
Resistors, Capacitors, Transistors, and whatever else is required to Increase DC voltage and frequency of number of pulses per second.
What I desire it to have a circuit, on the Cheap, that I can Easily adjust the frequency and voltage output.
Type of signal is currently not important, although, I'll eventually be using Scalar waves frequency which is more Potent than Radio waves.
Cold Current Generation.
Can you Help me out?
steveharr5 months ago
Hi, did you have good success with this? Does the frequency pot need to be so large or can I use a pcb mounted trim pot?
Electorials (author)  steveharr5 months ago
Hello, Yes I had, and still have great success with this driver.
The pot doesn't need to be that large. A PCB mounted trimmer is ok, as long as the power ratings are good:
• 10k potentiometer - at least 30mW
• 4k7 potentiometer - at least 250mW
leviterande8 months ago
HI, I am very confused after I tried one thing. I have a 555 connected to a transistor to a small HF transformer. I have frequency and duty cycle adjustments. everything works fine BUT! I am pulling my hair off soon at this little thing:

when I change duty cycle from 58% to 80% the secondary voltage drops to close to zero! shouldn't the opposite happen It is the same frequency all the time .. Would really be thankfull for any help ..
does anyone know an equation that would predict the "frequency" and duty cycle?
would an IRF510 MOSFET work?
Electorials (author)  quinnmiller19972 years ago
Yes, that looks like a good MOSFET.
MulBe0392 years ago
would a 44608P40 as IC and a FQPF8N60C MOSFET work ??
Electorials (author)  MulBe0392 years ago
the IC seems to be really good for this.

I'm not so sure about the MOSFET because it can only handle 2.6A at Tc=100°C
Electorials (author) 2 years ago
I updated the schematic :) There aren't many changes (only the LED and the schematic is drawn a little compacter so that it's clearer to read on this small picture)
Hey nice job! If you are driving a flyback then I find it also helps to use a ultrafast diode and a small capacitor across the MOSFET, as the diode built into the MOSFET is not good for HV back emf.

Also does your MOSFET get hot?
Electorials (author)  Alex1M62 years ago
It doesn't get hot, just warm.

If I add a diode across the MOSFET, the performance is worse but I havn't tried with a capacitor yet.
I also don't have fast recovery diodes, that's probably the problem.
baven2 years ago
Can i use a LM324 op-amp too?
Electorials (author)  baven2 years ago
Yes, no problem.
I don't think you need to do anything with the pins of the other two OpAmps. Just leave them not connected :)
Thank you
The LED on the output will also steal current that could more usefully be used to turn on the mosfet quicker too.
Electorials (author)  steveastrouk2 years ago
Ok, I'll move it to somewhere on the drain of the mosfet.
But it'll become a problem then because I don't know what supply voltage for the load they'll use.
Ditch? Haha
The 10K pot on the gate of the FET is a mistake - you will end up burning out your device if you are not very careful.

Make sure the FET has a VBRdss >> the supply voltage.

You don't need 1/4W resistors across the first op-amp - 1/8W will be fine. In fact, there is no really compelling reason to use more than 1/8W throughout.

Electorials (author)  steveastrouk2 years ago
maximum output voltage of the OpAmp is 30V
However, I did all my power calculations based on 50V
50v²/10k = 250mW (I added that note to the schematic, so why would it burn out?)
5mA output current also won't destroy the OpAmp, it's also current limited.

If you meant 'killing the MOSFET' indeed, these have a maximum Vgs (mine is maximum 20V)

The 1/4W resistors are also calculated for 50V. That's why they are so high.
(the capacitor will limit the current, but worst case scenario, someone will add a 1000µF capacitor, and if it just starts charging, it's resistance will be near 0ohms)
Because in some pot positions, the mosfet won't turn on fully.

Electorials (author)  steveastrouk2 years ago
That was supposed to happen.

I know it will create more heat in the mosfet because the voltage across the mosfet increases drastically, but I tested this and it's not a problem, with the heatsink shown in the pictures.

I did really test this all, it's not that I'm just putting a schematic here that doesn't work :)

At the maximum input voltage, the mosfet works fine (the Vgs is not too high)
and at the lowest input voltage, the mosfet is always off
in between, I can regulate the Top to Top output voltage of the block wave.
That's what was supposed to happen.
uhclem2 years ago
I like it - especially because you did not use a 555/556. Parts reuse is great also. One question, though - does the snubber diode need to be the high-speed (Schottky) type?
pfred2 uhclem2 years ago
But if you look at their schematic and a schematic of what is inside a 555 the circuits are similar. A voltage divider, charging capacitor, and comparator can be found in both. So this works for the same reasons 555 timers do.

Nice for me because I have a lot more generic op amps than I have 555 timers on any given day. I keep on meaning to buy a big batch of 555s I just never seem to get around to it. I have built timing circuits myself that didn't use 555s because of their scarcity in my shop too.

As handy as 555s may be I don't get them stripping PCBs too often. Some parts I guess I just have to buy? If you like parts reuse projects check out some I put up. My voltage regulator and amplifier ones are all 100% junk box projects.

You could say I am a big proponent of parts reuse myself.
uhclem pfred22 years ago
My plan, ultimately, is make the ATTiny45 into the "new" 555. Same size, costs a little more (gotta shop around) but does worlds more.
pfred2 uhclem2 years ago
All I need are the pulses.
Electorials (author)  uhclem2 years ago
I've never seen that one before :O
Electorials (author)  pfred22 years ago
That's true but if you want to make a circuit that has controllable frequency AND controllably duty-cycle, you can't do that with one 555 timer. You'll need two of them.

The advantage of this circuit is that you only need one IC.
Electorials (author)  uhclem2 years ago

After I posted this instructable I was also thinking of the recover time of that diode, and I thought it would cause trouble.
I tested the driver with a flyback (so on high frequencies) and I didn't see any problems, however I did expect them.

I can't do any more tests now because I broke the OpAmp by connecting the power with the wrong polarity.
(I added another diode to protect the circuit against inverse polarization)

I'll look into it after I get a new OpAmp IC.
Electorials (author)  Electorials2 years ago
The datasheet of a 1N4007 sais it has 30µs reverse recovery time.
that means that when we go higher than 16.6kHz, the diode will work really crappy.

But that recovery time only exists for negative voltages. Since we are pulsing only positive voltages that won't be a problem.

The diode only needs to hold back negative voltages when we power down the circuit, and that's just One pulse, it's not at a certain frequency.
pfred22 years ago
What do flyback videos do? Also is it an N or a P channel MOSFET? I don't use them enough to know which way the arrow goes.
Electorials (author)  pfred22 years ago
It's an N-channel mosfet.
And I ment that I don't need to make a video of this driver with a flyback because you already know what the flyback does.
Thanks for the clarification. I am looking at the original file now and it is different from most schematics I am familiar with. 4,700 Ohms resistance is a common fixed value but in a potentiometer? I cannot say as I have ever seen one of those. 10K is a popular pot size though.

I know you addressed the bizarre power ratings of the resistive elements in your article. What does the "E" mean after 470 below the pot coming out of the op amp? It can't mean what "E" usually means in regards to electronics can it? Easy as pie* it ain't!

Oh, and for the record I do not personally know what a flyback does. I've some vague notion but I wouldn't call it knowledge.

* PIE is Ohms Law P= Watts I = Current and E = Voltage So "E" usually means voltage in regards to electronics. But that makes no sense in the schematic. My best guess is it is a typo. I'm learning to explain my obscure jokes online as many seem to miss them.

P.S. Know what really bugs me? Where'd the I come from in PIE? I've looked but I've never found an answer. Current starts with a C and Amperage with an A so what is up with the I? E is Electromotive Force P is Power they're easy but I? Don't think about it too hard or it'll drive you nuts too. Unless you know.
Electorials (author)  pfred22 years ago
I thought a 4k7 pot was regular because I had one here.
If you don't have that one, you can easily use anything from 4k to 7k.
a 10k will still work but you won't be able to control the frequency precisely.

The E in 470E is commonly used here in Europe to indicate the 'Eenheid' in my language (regular unit)
So it means that it's not MOhm, not kOhm, not mOhm but just Ohms.
We use it a lot here so I thought the whole world used it.
so it's definitely not a typo :)

for the flyback, check my youtube channel (Electorials), I have some flyback videos :)
what it basically does is convert a low voltage to a very high voltage (several kV's).

We also use I (current), unit A (Amps) and I have no idea where it comes from.
We use U for voltage instead of V or E

They don't use C for Current because they used it for Coulomb too, which is for some weird reason indicated with Q. maybe it's the Q of Qharge and the I of Iurrent (if you get the joke)
Electorials (author)  Electorials2 years ago
Oh, and I know that the power ratings are weird but I just calculated what they should at least be. I think it's better for people so that they can use more power values.

example: I calculate 120mW for a resistor, and I type 0.25W on the schematic

If someone has a 150mW resistor (I don't know if that exists, but if somebody has it,) than he'll think he can't use it because the schematic sais 0.25W.
Eighth watt resistors are common. They're a bit too small for me to deal with though. Bit too small to deal with 150mW too I guess. They'd probably work if you can work with them.

I'm going in the other direction myself. My present project has a 30 amp contactor in it and I hope it can handle the power!
Electorials (author)  pfred22 years ago
awesome :D
Whether it works or doesn't I'll put up an article about some aspect of the project when I am done.
Electorials (author)  pfred22 years ago
Ok :)

Get More Out of Instructables

Already have an Account?


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!