CMOS buffer hysteresis?

From: Mark Haase (mehaase_at_earthlink.net)
Date: 08/20/04


Date: Fri, 20 Aug 2004 04:18:53 -0400

Hi all--

I'm building a drivetrain for an autonomous robot, and I bought a
photointerrupter to use as part of a homebrew shaft encoder. With
tweaking of the circuit, the photo interrupter outputs about .5V when
the encoder disk is black, and about 4.6V when the encoder disk is
white. These vales are probably OK for talking to my HC11, but I figured
that to "do it right" meant using a CMOS buffer. (The exact part I
bought is here:
http://rocky.digikey.com/WebLib/Texas%20Instruments/Web%20data/CD74HC4049
,4050.pdf).

I used the output of my circuit to send signals to an input compare pin
on my MCU. The problem is that the CMOS buffer's output apparently
oscillates rapidly, and so when the optical encoder moves forward one
segment, my MCU gets dozens or hundreds of input pulses.

Without a scope I can't tell exactly what's happening, but AFAIK buffers
usually have about a .5V hysteresis, true? So I guess what's happening
is that the CMOS buffer is oscillating between 0 and +5V very rapidly.
So my question is, how on earth should I smooth out the input signal to
my MCU? The pulses I'm interested in will be at least a few MS long (the
optical encoding disk has 16 segments, and the motor's output is about
120RPM). The MCU is 2Mhz, but its juggling a bunch of other tasks and
there's no FPU, so I can't do the smoothing in software--unless there's
a real efficient way I don't know about. (Ie. I'm familiar with FIR and
IIR but they seem to be too expensive for my application).

Thanks for any hints--I don't even know the terms for which I should
google

Mark

-- 
|\/|  /|  |2  |<
mehaase(at)sas(dot)upenn(dot)edu


Relevant Pages

  • Re: CMOS buffer hysteresis?
    ... >photointerrupter to use as part of a homebrew shaft encoder. ... >bought is here: ... my MCU gets dozens or hundreds of input pulses. ... sure you connect the inputs and outputs of the unused comparator to ...
    (sci.electronics.misc)
  • Re: Signaling over powerline help
    ... > phase-shift keying circuit. ... wire antenna, and can be extended using better antennas. ... You might also be able to use the encoder / decoder chips over the ... powerline, but you run ...
    (comp.arch.embedded)
  • Re: Absolute encoder outputs
    ... (I have the circuit but not the encoder). ... sure how to emulate the encoder's 5v signal to the circuit. ... Does it say if the encoder outputs are TTL compatible or anything? ... for either CMOS or TTL signals? ...
    (sci.electronics.basics)
  • Re: Absolute encoder outputs
    ... (I have the circuit but not the encoder). ... The encoder has a pinout ... sure how to emulate the encoder's 5v signal to the circuit. ... An absolute encoder I worked with had open collector outputs, ...
    (sci.electronics.design)
  • Re: Absolute encoder outputs
    ... (I have the circuit but not the encoder). ... sure how to emulate the encoder's 5v signal to the circuit. ... Clearly I did not design the circuit, I'm just trying to use it. ... An absolute encoder I worked with had open collector outputs, ...
    (sci.electronics.design)