PWM

hello everybady

I want to order 2 transistors MOSFET with 2 PWM signals with a phase shift of 180° between the 2 signals

plz someone help me I want to use Arduino Uno to generate these signals. :-\

Give full details of what you want to do with a circuit.

Weedpharma

I'm really curious as to why you would do this: after all, all PWM does is give an average low voltage on the output, where that "apparent" voltage depends on the duty cycle specified. The phasing is usually of no concern.

You could try a delay between the two calls to analogWrite(). At 490Hz, T=2ms, so you could try a 1ms delay and check on your scope to see if that has the desired effect.

I suspect this is an XY problem and as wp says, you should provide more detail.

Phase shift of 180 degrees is easy. Just invert one of the outputs. Don’t even try to do that onboard the Arduino.

MorganS:
Just invert one of the outputs.

Hmmmm, why didn't I think of that.

But still wondering why OP wants to do this.

MorganS:
Phase shift of 180 degrees is easy. Just invert one of the outputs. Don't even try to do that onboard the Arduino.

PWM involves a cycle where the on period over the cycle is varied. For a low output the period would be say 25% on then for the remainder of the cycle it would be off. For high output it would be reversed.

A cycle takes 360 degrees so 180 degrees shift would start the on pulse at half way through the cycle time.

Inverting the output is just that, an inverted signal. The 180 degree shift would only be true for a 50% PWM.

It may be what he wants but not what was asked for.

Weedpharma

In the absence of a reply from the OP, can anyone even hazard a guess as to why the OP wants to do this?

To create a symmetric signal, kind of like a RS485 signal.
Signals like that are harder to disturb by EMF, certainly if they are conveyed through a (shielded) twisted pair cable.
Why one would need that with a PWM signal, no idea.

Almost a week later and no word from the OP. I am really curious about this one....

JimboZA:
Almost a week later and no word from the OP. I am really curious about this one....

What is it that makes a complete stranger dive into an icy river to save a solid gold baby? Maybe we'll never know. - Deep Thoughts by Jack Handy

Hi, yes big difference PWM, 180Deg Shift and Inverted.

Only the same when PWM 50%.

Tom… :slight_smile:

Trying to control a an inverter with push-pull layout? Any more details?