Inductive sine wave to 5v square wave

Busaquick

Apr 25, 2011
5
Joined
Apr 25, 2011
Messages
5
 Hi,

My name is Mark I am new to the board.

I am trying to convert a inductive sensor sine wave signal that is more than .7volts peak or 1.4 volts peak to peak into a square wave digital output that is 4.5 to 5.5 volts positive. I only need to capture the positive volt of the sine wave and my frequency is going to be between nearly 1HZ to about 3500HZ.  My load at the output is about 47kohm.

This is going to be on a motorcycle and my supply voltage is between 4.5 to 5.5 volts to ground. I could get 12 volts if I had to but, I would prefer not to so that I can't damage the ecu.

I have part of the circuit done but, it only produces 2.5volts or so output. I think I need another transistor or something but, I am not sure what to do.
squarewaveconverter.jpg


Can any of you help me? Thanks in advance.
Mark

 

audioguru2

Apr 6, 2004
12,026
Joined
Apr 6, 2004
Messages
12,026
You have the (+) input of the opamp at +4.5V and you have the (-) input at 0V. Its voltage gain is about 200,000 so its output will be saturated as high as it can go.
But the minimum supply for a TL082 is 7V and most will not work properly with only 5V.

Most opamps are destroyed when the input voltage goes lower than 0V in your circuit but your input swings around 0V so it has this problem half of every cycle.

I do not know of an opamp that will work with the input swinging around 0V unless it has a dual-polarity supply. But then the output will also swing around 0V which will destroy your ecu (unless you rectify the output signal).

 

Busaquick

Apr 25, 2011
5
Joined
Apr 25, 2011
Messages
5
Audioguru,

Thank you for the reply. I have my + input voltage figured at nearly .5V using the voltage divider of 10k and 100k resistors in series.

I did not know about the TL082 needing 7V thank you for that info. I also have a LM393P dual differential chip on hand that maybe I could use. I could also get a 741 from Radio Shack locally if those would work better.

I will try to work out the negative input swing to the OP amp thank you again for that info also. After you mentioned that I remember reading something about negative input hurting op amps.

Thanks for the input, keep it coming please,
Mark
 

Busaquick

Apr 25, 2011
5
Joined
Apr 25, 2011
Messages
5
You have the (+) input of the opamp at +4.5V and you have the (-) input at 0V.

Woops I found you were right. I had the resistor figured out for .5V but, put them in the wrong locations.

Thank you,
Mark
 

audioguru2

Apr 6, 2004
12,026
Joined
Apr 6, 2004
Messages
12,026
You cannot use a 43 years old design (a 741 opamp).
The datasheet for an LM393 dual comparator shows that its inputs can go below 0v if the input current is limited but the output might go high or go low which you do not want.

Attenuate the input so it never goes negative more than 0.3V.

 

Busaquick

Apr 25, 2011
5
Joined
Apr 25, 2011
Messages
5
audioguru said:
You cannot use a 43 years old design (a 741 opamp).
The datasheet for an LM393 dual comparator shows that its inputs can go below 0v if the input current is limited but the output might go high or go low which you do not want.

Attenuate the input so it never goes negative more than 0.3V.
Good idea on the attenuation! I think I could do that easily enough. I will need to work out the series resistors with my R3 resistor and I might have to shunt the inductor for part of its sin wave swing.

In my picture I am using the  R3 16kohm to load my inductor sensor so that it will hopefully not become noisy and I chose it based on the load that I measured from the computer it was plugged into.

Mark
 
Top