# How to introduce 90 degree phase shift to 555 timer?

#### Gilsdank

Joined Jul 21, 2020
5
hello,
I need to generate 2 signals: a square wave of a pretty low frequency, say 10hz. Right now I'm using a 555 timer to generate the square wave. I also need another square wave 90 degrees out of phase.
How can I do this?
I've attached a picture of the signals I need.

#### Attachments

• 56.3 KB Views: 52

#### WBahn

Joined Mar 31, 2012
29,885
Use the 555 to generate a signal at 4x the frequency and then use a finite state machine clocked by that signal generate your two quadrature waveforms. That way you don't have to worry about trying to get a 50% duty cycle from the 555.

#### Gilsdank

Joined Jul 21, 2020
5
Use the 555 to generate a signal at 4x the frequency and then use a finite state machine clocked by that signal generate your two quadrature waveforms. That way you don't have to worry about trying to get a 50% duty cycle from the 555.
Ah yes, a finite state machine I know about those on a very basic level, but have no idea how I would implement that.

Would I use a series of latches?

#### Gilsdank

Joined Jul 21, 2020
5
Use the 555 to generate a signal at 4x the frequency and then use a finite state machine clocked by that signal generate your two quadrature waveforms. That way you don't have to worry about trying to get a 50% duty cycle from the 555.
It actually looks like this might work?
If I had my 555 running twice the speed of my desired clock I can use the QA signal and the QB signal as my 2 clocks.

#### Attachments

• 334.6 KB Views: 95

#### Papabravo

Joined Feb 24, 2006
21,029
Yes -- that is precisely how you should do it. Bravo!
It is NECESSARY, the devices be clocked flip-flop of any flavor instead of latches. Latches are level sensitive rather than edge sensitive.

#### WBahn

Joined Mar 31, 2012
29,885
It actually looks like this might work?
If I had my 555 running twice the speed of my desired clock I can use the QA signal and the QB signal as my 2 clocks.
Look carefully at your (main) two waveforms that are in quadrature, namely Qa and Qb. The 555 is not running at twice those clock speeds, but at 4x those speeds.

You can get quadrature waveforms using a 555 running at just twice the clock frequency, but you have to use both edges of it and the result is that it is somewhat difficult to get true quadrature waveforms -- but they are close enough for most purposes. I don't know if they would be close enough for yours.

#### WBahn

Joined Mar 31, 2012
29,885
Yes -- that is precisely how you should do it. Bravo!
It is NECESSARY, the devices be clocked flip-flop of any flavor instead of latches. Latches are level sensitive rather than edge sensitive.
Sure you can use level-sensitive latches. You simply need to provide the needed combinatorial logic to control the signals to the latch inputs.

#### Papabravo

Joined Feb 24, 2006
21,029
Sure you can use level-sensitive latches. You simply need to provide the needed combinatorial logic to control the signals to the latch inputs.
Sure you can use level-sensitive latches. You simply need to provide the needed combinatorial logic to control the signals to the latch inputs.
The uninitiated might not be aware of that. I cannot remember a time or a situation where a choice had to be made.

#### Gilsdank

Joined Jul 21, 2020
5
The uninitiated might not be aware of that. I cannot remember a time or a situation where a choice had to be made.
Yeah my bad on calling them latches, I said latches but in my head I was thinking of like a d flip-flop.

Ahh I see WBahn, you're right! Well thank you both for your help. I did a little circuit up in spice and it works great!

#### Orson_Cart

Joined Jan 1, 2020
90
there is a simpler way too - as the 555 timer cap goes from 1/3 Vcc to 2/3 Vcc as it runs, if you use 2 resistors to give 1/2 Vcc and connect this to a comparator, and the timing cap signal to the other, you will get a 90 deg phase shifted square wave out of the comp ... - not quite as exact as going to 4 x freq and dividing down - but good for many apps ...

#### WBahn

Joined Mar 31, 2012
29,885
there is a simpler way too - as the 555 timer cap goes from 1/3 Vcc to 2/3 Vcc as it runs, if you use 2 resistors to give 1/2 Vcc and connect this to a comparator, and the timing cap signal to the other, you will get a 90 deg phase shifted square wave out of the comp ... - not quite as exact as going to 4 x freq and dividing down - but good for many apps ...
If everything worked perfectly that would give a phase shift of just under 75°. That MIGHT be good enough, but for most apps where a quadrature signal is needed, that's probably not.

#### Gilsdank

Joined Jul 21, 2020
5
If everything worked perfectly that would give a phase shift of just under 75°. That MIGHT be good enough, but for most apps where a quadrature signal is needed, that's probably not.

I've created the wave form I need, and I'm fairly certain that 90° shift is important.
I've atrached the apuce screenshot of the signals im generating.

#### Attachments

• 383.7 KB Views: 36

#### WBahn

Joined Mar 31, 2012
29,885
I've created the wave form I need, and I'm fairly certain that 90° shift is important.
I've atrached the apuce screenshot of the signals im generating.
I take it the purple and green waveforms are what you need? If so, the you don't need two square waves that are 90° out of phase because that's not what those are.

If you want two square waves that are in quadrature, why not just use the Q outputs of your two FFs directly? The output of the right one follows the output of the left one by 90°. Just those two FFs form a synchronous state machine being clocked at 4x the frequency of the two output waveforms. Sound familiar?