sine to cosine converter

Thread Starter

dayalrohan

Joined May 28, 2009
7
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/

Any comments/suggestions?
If there is any other way of doing this, I am open for it.
 

tom66

Joined May 9, 2009
2,595
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.
 

Thread Starter

dayalrohan

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

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

Thread Starter

dayalrohan

Joined May 28, 2009
7
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?
 

tom66

Joined May 9, 2009
2,595
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.
 

Thread Starter

dayalrohan

Joined May 28, 2009
7
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.
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.
 

Papabravo

Joined Feb 24, 2006
21,225
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.
 

t06afre

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

Thread Starter

dayalrohan

Joined May 28, 2009
7
The OPs component's values failed to follow the Application Note.

Consider this simulation using the TLC 2201 and the Application Note:
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.
 

DickCappels

Joined Aug 21, 2008
10,171
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:

Thread Starter

dayalrohan

Joined May 28, 2009
7
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.
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
 

DickCappels

Joined Aug 21, 2008
10,171
That brings us back to crossover distortion. Is your power supply voltage adequate? Sometimes crossover distortion is helped by a load resistor to ground.
 

Thread Starter

dayalrohan

Joined May 28, 2009
7
That brings us back to crossover distortion. Is your power supply voltage adequate? Sometimes crossover distortion is helped by a load resistor to ground.
Already tried that long time back (I mean loading),
supply is nice, have checked it on oscilloscope for any ac ripple. (I am using +/- 5V)

Even tried a generous offering of bypassing capacitors at the + and - supply near the op-amp.

I thought this was going to be done in 10 minutes, boy was I wrong :(
 
Top