Maker Pro
Maker Pro

0-5V square wave to sine wave with zero crossing?

Hi, I was wondering if you guys could help me with a little problem. I
am swapping transmissions in my car and the new transmission uses a
different type of speed sensor. My original transmission uses a
variable reluctor that generated a sine wave. My new transmission uses
a sensor that generates a 0V to 5V square wave. I was wondering if
anyone know how i could convert me 0V to 5V signal to a sine wave with
a approx 10Vpp. My freshman year i play with a XR2206 function
generator IC. But I have no idea how to make it work to solve my
problem. I was also thinking about using a op-amp summer with a gain of
about 2 and adding a negative offset. Any advice would be helpful.
 
J

John Popelish

Jan 1, 1970
0
Hi, I was wondering if you guys could help me with a little problem. I
am swapping transmissions in my car and the new transmission uses a
different type of speed sensor. My original transmission uses a
variable reluctor that generated a sine wave. My new transmission uses
a sensor that generates a 0V to 5V square wave. I was wondering if
anyone know how i could convert me 0V to 5V signal to a sine wave with
a approx 10Vpp. My freshman year i play with a XR2206 function
generator IC. But I have no idea how to make it work to solve my
problem. I was also thinking about using a op-amp summer with a gain of
about 2 and adding a negative offset. Any advice would be helpful.

The signal you create from the variable reluctance pickup can not
exactly duplicate the square wave sensor in one respect. It cannot
work all the way to zero speed. That may not be important, but this
needs to be verified.

A pretty good way to convert the VR pickup to digital output is to
clamp it with a pair of Schottky diodes (and possibly a series
resistor) so that it has a peak swing in each direction of about .3
volts. Then pass that through an LM393 comparator with a pull up
resistor on the output to +12. The comparator can handle a swing .3
volts below ground, with the other input at ground and give a nice
clean square wave output. The chip container 2 comparators, so you
need to ground the inputs of the second half to park it.

http://www.fairchildsemi.com/ds/LM/LM393.pdf
 
J

John - KD5YI

Jan 1, 1970
0
John said:
The signal you create from the variable reluctance pickup can not
exactly duplicate the square wave sensor in one respect. It cannot work
all the way to zero speed. That may not be important, but this needs to
be verified.

A pretty good way to convert the VR pickup to digital output is to clamp
it with a pair of Schottky diodes (and possibly a series resistor) so
that it has a peak swing in each direction of about .3 volts. Then pass
that through an LM393 comparator with a pull up resistor on the output
to +12. The comparator can handle a swing .3 volts below ground, with
the other input at ground and give a nice clean square wave output. The
chip container 2 comparators, so you need to ground the inputs of the
second half to park it.

http://www.fairchildsemi.com/ds/LM/LM393.pdf


Hey, John -

I think he wants to go the other way (make a sine from a rectangular signal).

Or I'm not reading it right, in which case, oops!

John
 
J

John Popelish

Jan 1, 1970
0
John said:
Hey, John -

I think he wants to go the other way (make a sine from a rectangular
signal).

Or I'm not reading it right, in which case, oops!

Yep, you're right. Never mind.
 
J

Jim Thompson

Jan 1, 1970
0
Hello John,



Sorry to be a bit OT here but did you ever get a confirmation about that
from any of the manufacturers? I know that the chips will do it but the
data sheet is hardnosed, says that the barbed wire is at exactly 0V.

How about LM339? I believe it's spec'd below ground, but beware, too
far below and one input causes the output to switch polarity :)
I
always wondered why they didn't state -200mV or at least -100mV. This
way, if you work in a heavily regulated industry you can't use any of
them to properly sense current in the negative return. Neither can you
do that on VCC since that's where they have to really stay 2V or so away
from the rail.

Regards, Joerg


...Jim Thompson
 
P

Phil Allison

Jan 1, 1970
0
Hi, I was wondering if you guys could help me with a little problem. I
am swapping transmissions in my car and the new transmission uses a
different type of speed sensor. My original transmission uses a
variable reluctor that generated a sine wave.


** One with amplitude that increases with rpm ?

Or is the signal processed ?

My new transmission uses
a sensor that generates a 0V to 5V square wave.


** With no amplitude variation.


I was wondering if
anyone know how i could convert me 0V to 5V signal to a sine wave with
a approx 10Vpp.


** It is not very likely that you need 10v p-p at all frequencies.

Simply coupling the output via a cap will remove the DC component and may be
all that is needed to make it work.

Your real problem is the number of pulses per revolution - are the old and
new units the same in this regard ???




........... Phil
 
J

Joerg

Jan 1, 1970
0
Hello John,
... The comparator can handle a swing .3 volts below ground, with
the other input at ground and give a nice clean square wave output. ...


Sorry to be a bit OT here but did you ever get a confirmation about that
from any of the manufacturers? I know that the chips will do it but the
data sheet is hardnosed, says that the barbed wire is at exactly 0V. I
always wondered why they didn't state -200mV or at least -100mV. This
way, if you work in a heavily regulated industry you can't use any of
them to properly sense current in the negative return. Neither can you
do that on VCC since that's where they have to really stay 2V or so away
from the rail.

Regards, Joerg
 
J

Joerg

Jan 1, 1970
0
Hello John,
Yep, you're right. Never mind.


The only way I could figure doing that would be to sync some kind of
function generator chip to it. If that sync has a wide enough range for
this case. Or use a micro controller's PWM feature.

Regards, Joerg
 
J

Jamie

Jan 1, 1970
0
Hi, I was wondering if you guys could help me with a little problem. I
am swapping transmissions in my car and the new transmission uses a
different type of speed sensor. My original transmission uses a
variable reluctor that generated a sine wave. My new transmission uses
a sensor that generates a 0V to 5V square wave. I was wondering if
anyone know how i could convert me 0V to 5V signal to a sine wave with
a approx 10Vpp. My freshman year i play with a XR2206 function
generator IC. But I have no idea how to make it work to solve my
problem. I was also thinking about using a op-amp summer with a gain of
about 2 and adding a negative offset. Any advice would be helpful.
a choke/inductor in series with a little load on it ? or maybe
pass it through a transformer.
 
M

me

Jan 1, 1970
0
[email protected] wrote in @g49g2000cwa.googlegroups.com:
Hi, I was wondering if you guys could help me with a little problem. I
am swapping transmissions in my car and the new transmission uses a
different type of speed sensor. My original transmission uses a
variable reluctor that generated a sine wave. My new transmission uses
a sensor that generates a 0V to 5V square wave. I was wondering if
anyone know how i could convert me 0V to 5V signal to a sine wave with
a approx 10Vpp.


Are you sure that you need to?
 
Wow thanks for answering guys. Yea i am trying to get from a square
wave to a sine wave or some wave with zero crossing. The amplitude does
change with speed but the ECU only reads the frequency. The 10Vpp is
just a clean signal that can be read. The new sensor outputs a 0-5V
pulse it might even be TLL but i'm not sure. I'm pretty sure the number
of pluses per revolution is the same and should be 4000Hz for one mph.
So something around 600kHz should work fine. I am pretty sure the ECU
just detects the zero crossing so i figure a -2.5V offset would be
great. Some people with different cars are able to put a 5V pulse one
pin and 2.5V onthe other to bump up ground. I tired that today but it
seems one of my pins is tie to ground.
Simply coupling the output via a cap will remove the DC component and may be
all that is needed to make it work.

Phil,
Thats sound easy to test how would i wire this up exactly?

Thanks a bunch guys.
 
B

Barbarian

Jan 1, 1970
0
Unless your Speedo, tranny or ECU requires a balanced () & un-grounded)
input, you probably don't need to do any signal conversion.

The fact that the previous signal level varies with speed is probably
ignored by the using circuit.

The fact that the previous signal was a sine wave is probably ignored by the
using circuit.

As was mentioned before, the important consideration is the number of pulses
per revolution, because that will affect the operation of the Speedo, tranny
or ECU.
 
B

Barbarian

Jan 1, 1970
0
The frequency range that you are quoting seems completely out of line with
standard speedo sensors, are you sure about that?.

The "standard" signal is about 8000 pulses per mile, some GM products use up
to 32000 pulses per mile.

65 MPH would result in a frequency of less than 150 Hz at 8000 PPM or a
little over 575 Hz at 32000 PPM.

Most sensors that are not variable reluctance are Hall Effect and have
open-collector outputs... pulled up to 5 volts or to 12 volts.
 
I just remember reading it somewhere. So it's 8000 pulses per mile
traveled? I thought it was a little high for mile per hour. How can i
tell if its a hall effect sensor? The sensor has 3 connections
according to the wiring diagram there is a ground, V+ and a signal. If
matters the new transmission is off of a 2003 Acura CL type s 6spd and
is going in to 1999 Honda Accord V6.
 
P

Phil Allison

Jan 1, 1970
0
I tried just hooking up the 5Vpp to the input of sensor and got
nothing. My speedo didn't move and my car didn't shift.



** Add one capacitor - stir well.



........... Phil
 
F

Fred Bloggs

Jan 1, 1970
0
Wow thanks for answering guys. Yea i am trying to get from a square
wave to a sine wave or some wave with zero crossing. The amplitude does
change with speed but the ECU only reads the frequency. The 10Vpp is
just a clean signal that can be read. The new sensor outputs a 0-5V
pulse it might even be TLL but i'm not sure. I'm pretty sure the number
of pluses per revolution is the same and should be 4000Hz for one mph.
So something around 600kHz should work fine. I am pretty sure the ECU
just detects the zero crossing so i figure a -2.5V offset would be
great. Some people with different cars are able to put a 5V pulse one
pin and 2.5V onthe other to bump up ground. I tired that today but it
seems one of my pins is tie to ground.

Then do this:
View in a fixed-width font such as Courier.


..
.. 5 --
.. | |
.. | | 0.1U 2 --
.. 0 -- -- >--------||-------+----> | |
.. | | |
.. | -3 -- --
.. +----|<|-|<|-|<|-+
.. |
.. --- 3x
.. ///
.. 1N914
..
..
..
 
F

Fred Bloggs

Jan 1, 1970
0
You can also play around with these:
View in a fixed-width font such as Courier.

..
..
.. 5 --
.. | | 150 0.1U 2 --
.. | | >-----/\/\---||-------+----> | |
.. 0 -- -- | | |
.. | -2 -- --
.. GND-+-|<|-|<|-|<|-|<|-+
.. | |
.. +-|>|-|>|-|>|-|>|-+
..
.. 8x
.. 1N914A
..
..
..
..
..
..
.. DELUXE VERSION
..
..
.. 12V
.. |
.. +-----+
.. | |
.. / |
.. 1K |
.. / |
.. \ |
.. | |/
.. +---| 2N2222A
.. | |>
.. | | 5 --
.. | | 560 0.1U | |
.. ||--+-|<|-+--/\/\---||---+--> | |
.. 5 -- 100 | 1N914A | -5 -- --
.. | | >--/\/\-+--||< |
.. | | | | |2N7000 /K
.. 0 -- -- / ||-+ A 2X 1N5338B
.. 10K | | 5.1V ZENERS
.. / | A
.. \ | K/
.. | | |
.. +-----+--------+------------+
.. |
.. GND
..
..
 
Thanks Fred I try those this weekend. Scoped the sensor today in lab
and i was right the output is a nice shape square wave. I tired 470pF
and a .01uF cap in series with the output today and got nothing on the
car but on the scope it seemed to remove the DC.
 
Thanks Fred I try those this weekend. Scoped the sensor today in lab
and i was right the output is a nice shape square wave. I tired 470pF
and a .01uF cap in series with the output today and got nothing on the
car but on the scope it seemed to remove the DC.

470 pF is way, way, way too small.

I wouldn't be afraid to try several uF - you have very low frequencies
here, at the very low end of audio frequency. At 150 Hz a 1 uF
capacitor is going to have around 1k ohm impedance, and your .01 uF
would have had 100 K ohms. That's fine when loaded with the megaohm
imput impedance of the scope, but the receiving circuit probably loads
it quite a bit more.

Try scopiung the signal on the ECU side of the cap with the ECU
connected.
 
Top