Using phase correct PWM to drive charge pump

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just wanted to share a small circuit where I use phase correct PWM to drive the gates of complementary MOSFETS, preventing that moment when they are both on. This is a voltage doubler that turns on a relay with a 12V coil (nominal, it's specced to turn on with 70% of nominal or more, that is 8.4V). Sure, I could just use a relay with a 5V coil, but it turns out I'm just a hobbyist and my junk bin only contains 12V (and 18V) relays.

 

But the point is that I really never had a good use for phase correct PWM before, so...

Circuit:

 

Instead of driving both gates with the same square wave, which would cause power losses through the MOSFETS due to slow switching, I drive the PMOS with a duty cycle >50% and the NMOS with a wave with the same phase, but a duty cycle <50%. So there is a moment where both transistors are off to give time for the gates to charge up.

Naturally, if you connect the OC2 outputs in the reverse way, I'm sure it won't take long to burn the mosfets...

 

These are the waveforms observed at the gates...

 

...and the code (Arduino sketch):

#define N 16		//gives 2us off time @16MHz

void setup() {
	//select phase correct PWM with TOP = 0xFF (mode 1) and enable waveform pin outputs at timer 2
	TCCR2A = 1<<COM2A1 | 1<<COM2A0 | 1<<COM2B1 | 1<<COM2B0 | 1<<WGM20;
	OCR2A = 128 - N;		//set duty cycle > 50%
	OCR2B = 128 + N;		//set duty cycle < 50%
	DDRB = 1<<PB3;			//enable OC2A output, connect to PMOS gate (Arduino pin 11)
	DDRD = 1<<PD3;			//enable OC2B output, connect to NMOS gate (Arduino pin 3)
	TCCR2B = 1<<CS20;		//start timer and waveform generation
}

void loop() {
}

 

Maybe this is useful for someone, or maybe it's a bad idea to connect the MOSFETS this way... I don't see what could go wrong, but you never knowcheeky

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There could be a glitch in your software, that might activate the self-destruct mode, so use care.  You could use a current-protected fet on the low side (there are many available),  in case they both turn on---there is a safety fallback.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Or use a boost converter.......

1 schottky diode

1 mosfet

1 cap

1 inductor

Last Edited: Sun. Apr 16, 2017 - 12:09 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Or use a boost converter.......

 

Be careful, in that the standard boost cannot be shut off (in that the min output voltage is roughly Vin)....A few boost chips have an output disconnect (typically using internal back-to-back fets).  Of course you could add extra transistors to your ckt as needed.

 

 

....But the point is that I really never had a good use for phase correct PWM before, so...    I don't see what could go wrong, but you never know...

   I don't think this mode truly guarantees both channels "off", such as if you set OC2A for 0% duty cycle (always low) & OC2B for 100% duty  (always high)....KABOOM...this post will self destruct in 5 seconds

https://www.youtube.com/watch?v=h0tNw4jNp28 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks, I'll look into current protected mosfets.