0
\$\begingroup\$

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?

Thanks in Advance!

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

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} \$

\$\endgroup\$
1
\$\begingroup\$

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: \begin{equation} T=\frac{1}{F} \end{equation}

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

In your case (50 Hz frequency) the answer is 6,67 millisecond. Your result is correct.

\$\endgroup\$
  • \$\begingroup\$ 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? \$\endgroup\$ – Swagatam Majumdar Jan 14 '19 at 8:46
  • \$\begingroup\$ 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 \$\endgroup\$ – Leonvd Jan 14 '19 at 8:53
  • \$\begingroup\$ 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? \$\endgroup\$ – Swagatam Majumdar Jan 14 '19 at 8:58
  • \$\begingroup\$ Can you use 100Hz and divide by 6 with a 2us deadtime square ? \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Jan 14 '19 at 9:02
  • \$\begingroup\$ @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. \$\endgroup\$ – Leonvd Jan 14 '19 at 9:10
0
\$\begingroup\$
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.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.