# sine to cosine converter

Discussion in 'The Projects Forum' started by dayalrohan, Sep 22, 2010.

1. ### dayalrohan Thread Starter New Member

May 28, 2009
7
0
Basically I want a circuit that can convert a sine wave to cosine wave.

I cannot use a passive circuit like LR circuit since my frequency of operation is very low ( a few Hz) so the passives would be very huge.

What I was trying to do was a op-amp differentiator circuit ; since differentiation of sine is cos.

The image of the circuit I am using is attached.

http://img683.imageshack.us/i/circuitl.jpg/

My values are R2=157k,R1=1k, C1=.1u, C2=220p : input frequency - 10 Hz

However, I am getting a distortion as shown below

http://img215.imageshack.us/i/waveforms.jpg/

If there is any other way of doing this, I am open for it.

2. ### tom66 Senior Member

May 9, 2009
2,613
218
The LM101A is a very old operational amplifier. It would probably be better to substitute in an op-amp with lower cross-over distortion, which is likely causing the distortion you see.

3. ### dayalrohan Thread Starter New Member

May 28, 2009
7
0
Oh!! The circuit was just for reference.

I am using TLC2201IP,
Low Noise Precision Rail-To-Rail Output Operational Amplifier

4. ### tom66 Senior Member

May 9, 2009
2,613
218
What are the values of R1, R2 and R3?

I would suggest you drop C2, R2 and R3 and see how it works.

5. ### dayalrohan Thread Starter New Member

May 28, 2009
7
0
My values are R2=157k,R1=1k, C1=.1u, C2=220p : input frequency - 10 Hz

R3 is arbitrary around 10k I think, no change in dropping that resistor.

C2 was a later add-on to my circuit ( in the hope of mitigating "noise" )

;the only change that I see on adding it is absence of little spikes (even smaller than the ZC distortion).

Why would I drop R2 ?
this with C1 forms the differentiator.

Also, I might add, I had similar waveform with the ubiquitous UA741, anything in my connections/values that may be causing this?

6. ### tom66 Senior Member

May 9, 2009
2,613
218
R2 is not part of the differentiator. Only R1 and C2, as well as the op-amp, form the differentiator. All the other components are unnecessary in a traditional differentiator.

I think R3 should the same as R1 || R2, or about 993 ohms, so change the 10k to 1k. R3 only helps with minimizing input current offset.

7. ### dayalrohan Thread Starter New Member

May 28, 2009
7
0
I think one of us is getting confused

http://www.ecircuitcenter.com/circuits/opdfr/opdfr.htm

so R2 and C1 should form the differentiator, not R1 and C2 (that is a traditional integrator).

I will try the R3 change though and just R2 and C1 as well.

8. ### tom66 Senior Member

May 9, 2009
2,613
218
Yeah, sorry. Doing too many things at once. R2 and C1. But the other components are unnecessary for now.

9. ### Ghar Active Member

Mar 8, 2010
655
73
R1 does not influence DC performance because of C1.

10. ### tom66 Senior Member

May 9, 2009
2,613
218
Doesn't it reduce the offset voltage due to input current?

11. ### Papabravo Expert

Feb 24, 2006
11,760
2,487
You can also use an integrator to convert a sine to a cosine. If you have a choice between an integrator and a differentiator you should always choose the integrator.

12. ### JoeJester AAC Fanatic!

Apr 26, 2005
3,912
1,742
The OPs component's values failed to follow the Application Note.

Consider this simulation using the TLC 2201 and the Application Note:

File size:
80.8 KB
Views:
34
• ###### differentiator-1.PNG
File size:
12.2 KB
Views:
38
Last edited: Sep 24, 2010
13. ### t06afre AAC Fanatic!

May 11, 2009
5,939
1,227
Perhaps it would be more easy for you to create a "quadrature oscillator" such an oscillator give out a sine and cosine wave.

14. ### dayalrohan Thread Starter New Member

May 28, 2009
7
0
Not sure what I did wrong,

R2C1 = designed to give 0 dB gain at fc=10 Hz, hence their values. fh is a order higher. Can you give me your designed values?

Also I get correct results in my simulations as well (I use LTspice).

I was thinking of an integrator, but the output will have a DC bias equal to the supply voltage, getting rid of that bias is going to be difficult at such a low frequency. I can use a RC type load I guess to chop off that DC and get that AC on the R load.

I am inclining towards a quadrature type oscillator myself; havent made one ever, does the signal come out nice practically ( I mean distortion free).

Also
@tom66
Removing the compensating components (non-essential), I just increase the noise in the output but the distortion remains.

15. ### JoeJester AAC Fanatic!

Apr 26, 2005
3,912
1,742
According to the application note ... fc = 10f and fh = 100f (both formulas) f (10 Hz) will be -20 dB.

16. ### DickCappels Moderator

Aug 21, 2008
5,017
1,525
From the distortion, it looks like the output of the opamp is capacitively coupled to the non-inverting input, causing hysteresis. Try grounding the noninverting input instead of returning it to ground through a resistor, and that would solve the problem if its coupling via stray capacitance. I think you can get away with leaving R3 out of the circuit because the input bias currents on the inputs of the TLC2201IP are very low.

Other than the stray C, the circuit as you show it is fine.

Last edited: Sep 25, 2010
17. ### dayalrohan Thread Starter New Member

May 28, 2009
7
0
Well, I tried that as well. As far as I could see, no appreciable change. My simulation runs fine, so it must be something on BB (practical) that is skewing up things. In fact, I coupled a capacitor as high as 100 pF between non-inverting input and output but could not see the same result in simulation.

I tried other options like:

1. Integrator - too much phase delay in my range ( 2-30 Hz)
2. Quadrature oscillator circuit - too much noise, resembles a triangular wave rather than a sine wave.

Any help or any other circuit to convert sine to cos would be really appreciated

18. ### DickCappels Moderator

Aug 21, 2008
5,017
1,525
That brings us back to crossover distortion. Is your power supply voltage adequate? Sometimes crossover distortion is helped by a load resistor to ground.

May 28, 2009
7
0