IEBus differential signal to TTL circuitry

Discussion in 'The Projects Forum' started by nslogan, Oct 18, 2012.

  1. nslogan

    Thread Starter New Member

    Oct 17, 2012
    Hey! First post! Also let me preface this by saying that I'm a huge electronics noob and also a mechanical engineer (compsci minor, like to mess around in electrical engineering when I can).

    I'm currently working on a project that receives a differential signal (via Bus+/Bus-) and I need to convert that to TTL (0V = 0, 5V = 1) so that I can read it with my USBee SX (and ultimately with some 8-bit AVR) to determine packet structure. That last part is irrelevant to my question but I thought I'd give a general project goal.

    What I'm currently working on is the circuitry to convert the differential signal to TTL. The input signal is defined that a difference of less than 20mV = 1 and a difference of greater than 120mV = 0. I have confirmed these voltages with my oscilloscope. Also, the maximum time between transitions is 40us and the minimum is 7us.

    What I've done so far is to use a LM324 to subtract the signals and amplify the output by 10. On average, the voltage difference between high and low has been around 200mV so my output from the op-amp has been right around 2V which makes sense. However, while the output signal is nice and pretty (see this album), the slew time on the LM324 is too low and thus my rise/fall times are way to long. On the 7us transition I end up with the falling/rising edges of signals running in to each other.

    So, I need to find a better op-amp, I'll talk about that in a second. The next step after this (at least in my mind) is to use a comparator circuit with known hysteresis to convert the ~0V low and ~2V high in to 0V and 5V logic. Does this sound like a good plan?

    Back to op-amps. I've also tried the circuit (right, let me give you that) with a TL082 (both of these op-amps are available at my local radioshack, I'm currently searching online for a better one that I'll order from digikey with some other parts). The TL082 didn't work so well, the signal seemed non-linear and the output wouldn't go below 1.3V (when the difference got close to 0V).

    Overall, I'd say I'm somewhat close to accomplishing what I want. After observing many captures of the signal, the op-amp didn't produce an unexpected spike (or miss a spike). On the plus side of low slew rate, there is essentially zero noise in my output signal right now ha.
  2. DickCappels


    Aug 21, 2008
    You aren't going to get by using general purpose opamps but as you point out, you should be using a comparator. Try something like the LM119/LM319 from National Semiconductor (now Texas Instruments) which switches in tens to hundreds of nanoseconds. You might want to add about 20 to 30 mv of hysteresis so that you don't get garbage when there is nothing coming in, and of course the hysteresis will also reduce the chances of "stuttering" in the event of a slow rising or ringing edge.
  3. nslogan

    Thread Starter New Member

    Oct 17, 2012
    I actually started out using comparator but because of my lack of experience with circuits was unable to figure out how add the hysteresis. I searched on and off for something like a week or two but couldn't find a circuit that did what I wanted - I'm not saying they don't exist, I'm positive they do, I just don't know how to find them ha. So, help a guy out? How do I add hysteresis to a comparator whose inputs are differential lines?