Complementary PWM generator with deadtime

Thread Starter

cmartinez

Joined Jan 17, 2007
8,728
I need to PWM a motor with an n-FET using an already existing function in an MCU. That's the easy part, because I already know how to do that. What I'd like to do now, is to generate a complementary signal that will be used for EMI suppression purposes. But this signal must have an independent delay-start and a delay-end with respect to the original signal, as shown in the following graph.

upload_2018-8-13_11-10-11.png

A requirement is that the complementary wave must be generated outside the MCU, mainly to avoid programming overhead. Another requirement is that D-st and D-end must be independent of each other, and easily adjustable in order to account for the different gate rise and fall times of the mosfet being driven. Frequency range will be between 10 and 28 KHz

After some thought, I realized that generating D-st is not that complicated, but that I cannot predict the future to generate D-end, since the reference signal must always be the original PWM function. And D-end has a negative value with respect to PWM.

The solution that came to mind was to generate a delayed replica of the original PWM wave to drive the motor's mosfet, and then generate the complementary function referenced to the original PWM one to drive the EMI suppresor circuit. This way all delay values would stay positive, the downside being that I'd need to generate three different delays instead of two. Those would be: Da, Db and Dc; as shown in the following image:

upload_2018-8-13_11-11-5.png

An advantage is that Da can stay constant, and only Db and Dc must be adjustable. Using a couple of pots for this purpose would be an acceptable solution.

My first thought was to use a set of 555/556 chips to accomplish this, but I'm beginning to think that maybe there's a simpler (and, especially, more reliable) solution out there. Maybe using gates, flip-flops or whatever? It also occurred to me that a slave MCU could also be used to accomplish this, but that seems like an awful waste of resources.

What do you guys think?
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,728
After browsing through the multitude of enthusiastic answers and well-meaning and valuable opinions posted in this thread so far [/END SARCASM], I've come to the conclusion that the best thing to do would be to use the already-familiar PIC10F322 that has a CWG built-in function with the exact features that I need. The device is cheap, easy to program, and has the low pin-count desirable for my design. Only downside maybe is that the "easy to adjust" requirement is met only halfway, this because the delay values can only be changed by reprogramming the device.

Another thing is that the PIC10F322 doesn't have UART nor SPI interfaces that would allow to serially communicate with it, and command it to dynamically change the PWM duty cycle ... but I'm going to start looking into other members of the PIC family and see if any of them come with a UART port, and PWM and CWG functions; and possibly use one of them as a complete solution to this problem
 

Alec_t

Joined Sep 17, 2013
15,111
Only downside maybe is that the "easy to adjust" requirement is met only halfway, this because the delay values can only be changed by reprogramming the device.
That PIC has a 3-channel ADC. If you put a couple of pots on two of the channels you could read their values and adjust timings in software.
 

OBW0549

Joined Mar 2, 2015
3,566
Another thing is that the PIC10F322 doesn't have UART nor SPI interfaces that would allow to serially communicate with it, and command it to dynamically change the PWM duty cycle ... but I'm going to start looking into other members of the PIC family and see if any of them come with a UART port, and PWM and CWG functions; and possibly use one of them as a complete solution to this problem
I haven't looked, but I would be absolutely shocked if there aren't a multitude of such PICs to choose from.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,728
I haven't looked, but I would be absolutely shocked if there aren't a multitude of such PICs to choose from.
Yeah, I already found quite a few, thanks. I used digikey's parametric search, because Microchip's parts select page sucks.
 

ebeowulf17

Joined Aug 12, 2014
3,307
If you did choose to try the original scheme, couldn't you reduce Da to a point where Da and Dc were the same, thereby only needing two delay values?

I guess, depending on how it was physically implemented, maybe having the values match doesn't matter, since you still need two physically separate timers to delay the two different signals.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,728
If you did choose to try the original scheme, couldn't you reduce Da to a point where Da and Dc were the same, thereby only needing two delay values?

I guess, depending on how it was physically implemented, maybe having the values match doesn't matter, since you still need two physically separate timers to delay the two different signals.
Da has to be greater than Dc, otherwise Dc would end up being negative ... and negative time is something that I'm unable to achieve without Dr Strange's green infinity stone ... :D
 

ebeowulf17

Joined Aug 12, 2014
3,307
Da has to be greater than Dc, otherwise Dc would end up being negative ... and negative time is something that I'm unable to achieve without Dr Strange's green infinity stone ... :D
I understand negative delays are... difficult, to say the least!

Sorry, I totally mis-wrote my last post. What I should've said is reduce Da until Dc is zero (not until Da = Dc; that would be silly!) DelCOMP could transition at the same time as PWM, so long as DelPWM has the appropriate Da delay.
 

Bordodynov

Joined May 20, 2015
3,430
i prefer to use 74LS14 , HC is CMOS and very noisy , not stable in complementary
Perhaps this was due to the fact that you used a large capacity (10nF).For CMOS it is not recommended to use such a large capacitance.With this capacity, the microcircuit is heated.
In the second stages, you can use the MIC1557 timer, which has a fixed hysteresis (1/3 and 2/3 thresholds from the power supply).
But of course it will be more expensive.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,728
You can use this circuit

use ic 7414, and resistor like 100ohm and capacitor 10n

it's make good complementary for signal

Beautiful circuit! ... I'll be changing R2 and R5 with 10k pots configured as rheostats, and add a 5K resistor in series to R5, to match the last circuit. Then I'll test it and see the resulting adjustment range. Many thanks to both!
 

danadak

Joined Mar 10, 2018
4,057
Dead band in PSOC, but dead clocks setting is for both edges, eg. symmetrical.

Quad out, True and Complementary.

And of course Verilog or schematic capture capability should you so choose.


Need four or more of them, no problem, just drag/drop/config.

Regards, Dana.
 

Attachments

Top