sine to square wave converter

Thread Starter

s900t8v

Joined Mar 12, 2011
48
hey guys

I've been looking on the net for a cheap and simple box that converts a sine wave to a square wave

for my project TRACK car - the ECU needs a square wave speed signal. I have a sine wave reluctance style sensor in the back of the speedo. I want to condition the signal.

I can change the pulse settings blabla in the ECU to get the speed right so I can just use any converter right? The problem is I can't even find one :(
 

MrChips

Joined Oct 2, 2009
30,720
Going from sine to square is a lot easier than the other way around.
Any amplifier, transistor, logic gate or comparator will do the job.
 

Thread Starter

s900t8v

Joined Mar 12, 2011
48
ok, so i'm a total noob when it comes to electronics, can you point me at something cheap and readily available

Ideally I just want to connect the sine input, and connect the square output, is there anything that makes it that easy lol ;D
 

MrChips

Joined Oct 2, 2009
30,720
You have to provide more information.
What is the output voltage and impedance of the sensor.
What voltage is required by the ECU. What is the input impedance of the ECU?
Some of these questions you may not know the answer. But if you can provide more details we can figure it out.

If this has anything to do with real automobiles, we cannot help you.
 

Thread Starter

s900t8v

Joined Mar 12, 2011
48
You have to provide more information.
What is the output voltage and impedance of the sensor.
What voltage is required by the ECU. What is the input impedance of the ECU?
Some of these questions you may not know the answer. But if you can provide more details we can figure it out.

If this has anything to do with real automobiles, we cannot help you.
na it's a project...

how do I measure these things?

I can measure the voltage at the sine wave sensor? how do I measure impedence?

not sure about the ECU, seeing if I can find that out now !

thanks for the help :)
 

blah2222

Joined May 3, 2010
582
The output impedance of the sensor is going to determine how large the input impedance of your "converter" will roughly have to be so that you do not lose your signal.

Assuming that this sensor is linear and is completely resistive (probably not the case) if you hook a known supply voltage up to the sensor and measure the current produced, the impedance (resistance) can be found as the input voltage divided by the measured current.

If you want to get the reactive component of the impedance (capacitive/inductive) pass in an AC voltage and measure the current amplitude and phase difference from the input voltage and perform the same calculation (involves imaginary numbers). The latter is more involved, but good to do if you know what you're doing.

If there is a capacitive/inductive component, your impedance is going to depend on the operating frequency. Impedance increases with increasing frequency for inductors and decreases with increasing frequency for capacitors. Resistance is not affected by frequency. Find out the frequencies that you will be using.

Once you've got a rough idea of the output frequencies of the sensor, it's output impedance, and its possible amplitude and you will be almost ready to setup your "converter". The signal will most likely need to have noise and DC bias filtered and even amplification if it is too weak.

As a crude example, read up on the Schmitt Trigger as this would be an easy way to transform the signal into what you want. Basically the op-amp acts as a comparator and compares the voltage between its +ve and -ve terminals. If V+ > V- then, its output terminal will be ~+ve supply voltage and ~-ve supply voltage in the opposite case. The Schmitt Trigger has a feedback component that actually takes into account what the output currently is and changes its compare voltage depending on what state your in.

Good luck!
 

Ron H

Joined Apr 14, 2005
7,063
Nope. But, if it turns out not to be what he needs, no big deal, at least he might still learn something. However, if it turns out to be what he does need, I'll have saved everyone time. Pros out-weigh the cons :)
Yeah, you're probably right. Or he might hook one up and say WTF?
He said he could measure the amplitude. The amplitude may change with frequency. If he does try it and come back with WTF, we need to know the amplitude(s). The sensor impedance is, IMHO, irrelevant, because a Schmitt trigger can have basically infinite input resistance.
MrChips basically spelled out the requirements. As I said, I don't think impedance is an issue.
 
Top