# Time Difference between 120 degrees phase shift signal or a 3 phase signsl

I am trying to create an Arduino 3 phase square wave code, and I wanted to know the time difference between each 120 degree phase shifts.

With some effort I could calculate it to be 6.66 millisecond. Please let me know if I am missing something, or is the result correct?

• Depends on your frequency. – winny Jan 14 '19 at 8:19
• It's for a 50 Hz frequency! – Swagatam Majumdar Jan 14 '19 at 8:27
• Then yes, it's 6.66.. ms delay between the phases. – winny Jan 14 '19 at 8:31
• OK, great! thanks so much for the help! Appreciate it very much. – Swagatam Majumdar Jan 14 '19 at 8:32

We can't give you a time as it depends on the frequency.

But given there are $$\360^o\$$ in a circle $$\120^o\$$ is one third of the period.

The most common mains frequencies are 50Hz and 60Hz.

For 50Hz as used in the UK and elsewhere

$$\ \text{Period} = \dfrac{1}{50 \text{ Hz}} = 20 \text{ms} \$$, and $$\ \text{Delay} = \dfrac{1}{3 \times 50 \text{ Hz}} \approx 6.667 \text{ ms} \$$

For 60Hz as used in the US and elsewhere

$$\ \text{Period} = \dfrac{1}{60 \text{ Hz}} \approx 16.666 \text{ms} \$$, and $$\ \text{Delay} = \dfrac{1}{3 \times 60 \text{ Hz}} \approx 5.556 \text{ ms} \$$

The time difference between the three (120 degree shifted) square wave signals depends on the frequency of the signals that you are trying to make.

The period of a single signal is: $$$$T=\frac{1}{F}$$$$

The time between the signals is 1/3 of this period because they are 120 degrees shifted, giving the following equation: $$$$T_{offset}=\frac{1}{3}T$$$$

• Thank you for the reply, I have a follow up question, kindly help me to figure this out...does this also mean that the ON/OFF time of each square wave pulse will be 6.67 ms in duration? – Swagatam Majumdar Jan 14 '19 at 8:46
• That depends on what you want. If you don't want the three signals to overlap then the ON time should be 6,67 ms and the OFF time should be 13,33 ms – Leonvd Jan 14 '19 at 8:53
• yes, basically I am trying to replicate a 3 phase 50 Hz overlapping signal which I can use for triggering the inputs of 3 half bridge ICs IR2112..., the HIN, LIN inputs of the IC. So can I go ahead as per your above suggestion? – Swagatam Majumdar Jan 14 '19 at 8:58
• Can you use 100Hz and divide by 6 with a 2us deadtime square ? – Tony Stewart Sunnyskyguy EE75 Jan 14 '19 at 9:02
• @SwagatamMajumdar Yes you could try the 6,67 ms and 13,33 ms times and see if it works. If necessary you could try making the signals a bit longer to compensate for the ton and toff times of your driver. – Leonvd Jan 14 '19 at 9:10
50 Hz  ---...---...---...---...---...-- limited
100 Hz|  |  ^  |  ^  |  ^  |  ^  |   ^   XOR edge detect clock 0.1us
Phase A  _________|---------__________--- div /6

Phase B  ------_________|--------_________

Phase C  ______---------________|--------____


Using divide /3 counter to get 3 phases then /2 counter to get a square wave on each and ensure proper phase by initialization with a simple state machine design.

It is best to use 50 Hz hardware timer interrupts for stability.