sine to square wave converter

Discussion in 'General Electronics Chat' started by s900t8v, Oct 16, 2012.

  1. s900t8v

    s900t8v Thread Starter Member

    Joined:
    Mar 12, 2011
    48
    0
    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 :(
     
    #1
  2. MrChips

    MrChips Moderator

    Joined:
    Oct 2, 2009
    11,752
    3,010
    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.
     
    #2
    s900t8v likes this.
  3. s900t8v

    s900t8v Thread Starter Member

    Joined:
    Mar 12, 2011
    48
    0
    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
     
    #3
  4. MrChips

    MrChips Moderator

    Joined:
    Oct 2, 2009
    11,752
    3,010
    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.
     
    #4
  5. s900t8v

    s900t8v Thread Starter Member

    Joined:
    Mar 12, 2011
    48
    0
    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 :)
     
    #5
  6. blah2222

    blah2222 Well-Known Member

    Joined:
    May 3, 2010
    541
    32
    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!
     
    #6
  7. Stuntman

    Stuntman Member

    Joined:
    Mar 28, 2011
    161
    37
    #7
  8. Dodgydave

    Dodgydave Well-Known Member

    Joined:
    Jun 22, 2012
    2,813
    382
  9. Ron H

    Ron H AAC Fanatic!

    Joined:
    Apr 14, 2005
    7,050
    647
    Track car + ECU = automobile
     
    #9
  10. Austin Clark

    Austin Clark Member

    Joined:
    Dec 28, 2011
    404
    35
    #10
  11. Ron H

    Ron H AAC Fanatic!

    Joined:
    Apr 14, 2005
    7,050
    647
    Do you know the signal amplitude?
     
    #11
  12. Austin Clark

    Austin Clark Member

    Joined:
    Dec 28, 2011
    404
    35
    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 :)
     
    #12
  13. Ron H

    Ron H AAC Fanatic!

    Joined:
    Apr 14, 2005
    7,050
    647
    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.
     
    #13
Loading...