# Phase Shift Square Wave

Is it possible to shift the phase of a square wave (which is generated by an arduino ) with passive components?

I have a 0 to 12v square wave that I would like to split into several phases. The idea is to send the original square wave to load 1, and a 60° shift to load 2, an additional 60° shift to load 3, and so on until I've got 360°.

I also have a 0 to -12 square wave that I would like to apply this to as well.

• fixed or varying frequency? What kind of load(s)? And what are you trying to achieve? Mar 16, 2017 at 12:02
• How much current (power) are we talking about? Are you trying to drive some sort of motor? If you give us some context about your application, you'll probably get better answers. If you are still trying to drive electromagnets, then you'll want to synthesize the phase-shifted signals in your Arduino, and use a separate driver transistor for each one. Mar 16, 2017 at 12:19
• A PLL might be a good starting point Mar 16, 2017 at 12:27
• @MarkoBuršič: In what sense is a PLL a passive component? Mar 16, 2017 at 12:29
• Do you mean delay the square wave?
– Chu
Mar 16, 2017 at 12:35

You could use a "Delay-Line" chip, but you still need active components to do the actual switching.

However, you have not stated whether your frequency is fixed or variable, and I suspect the latter is much more likely.

If so, you need to generate the signals from the MICRO individually, possibly with the addition of a multiplexer chip external to the micro if you need more outputs.

• Thank you @Trevor. I apologize. The frequency is currently unknown. It will depend on the placement of the electromagnets and the number of turns in the coil, I'm sure. I don't know how to do the math on that. If successful then a secondary coil should pick up trace voltage. I'll adjust the frequency to the highest trace voltage. A lot of testing to do. moving the electromagnets around, trying different coils, etc. Eventually it will be a fixed frequency, I'm guessing somewhere between 2 and 3 hz. Mar 16, 2017 at 14:20
• @JohnMuggins It rather sounds like whatever this is, you should be integrating some devices or coils or whatever into the mechanism to "FEED-BACK" the position of the moving object to the micro so that it knows when to "COMMUTATE" the coils. Just delaying the signal will not be sufficient for that. Mar 16, 2017 at 14:24
• oh, just ot clarify, a "multiplexer" chip would simply give me more outputs that I can code from the Arduino, correct? Good answer, Trevor. Thank you for the help. Mar 16, 2017 at 14:24
• Yes on the multiplexer... Mar 16, 2017 at 14:25

Use a 6 bit Johnson counter and drive that with a frequency 12x higher than what you want. The counter will generate 6 equally spaced, phase shifted, divided output square waves.

Rather than shifting a square wave, you could generate a faster square wave and frequency divide it. If you start each divider in a different state, they will have different phases once up and running. Here, you'd likely be best off with a fundamental at 6x the intended frequency, three divide-by-6 circuits to get the 0, 60 and 120 phases, then three not gates to get the other three phases. Be careful to make sure the div6 circuits keep a 50% duty cycle, if that's important for your application. Doing div3 then div2 would probably be a good approach.

It's not based on passives, but it only requires a few fairly basic logic chips. It should work for a very wide range of frequencies, and it will keep the phase angles very accurate.

• That is amazing. I didn't know we have frequency dividers. After briefly researching I see that f-out = f-in/N. At 60° phase shift each time then N should equal to .167? Mar 16, 2017 at 16:44