Making detecting pulses easier?

Discussion in 'The Projects Forum' started by wrybread, Aug 22, 2012.

  1. wrybread

    Thread Starter New Member

    Jul 3, 2005
    I'm interfacing a computer to an old Seeburg tabletop jukebox unit (this kind of thing: The unit sends pulses, which I'm trying to detect in a Python script. It generally works great, but from time to time I miss a pulse.

    The pulses are about 50ms apart.

    I'm wondering if there's some simple circuit I could make to make the pulses more pronounced and easier to detect? I'm a beginner at circuit design if that's a factor.

    Thanks for any help.
  2. crutschow


    Mar 14, 2008
    You could add a 555 configured as a one-shot to lengthen the pulses, if they are short.
  3. Austin Clark

    Active Member

    Dec 28, 2011
    Try looking at monostable multivibrators.

    Triggering it will cause it to change state temporarily, based on the capacitor value and resistor values. Meaning a short pulse can cause the vibrator to change state for a longer period of time :)

    Use a NOT gate to buffer and invert the input to the monostable multivibrator.

    EDIT: You may also consider using a flip-flop. It'll change state with every pulse. You could just detect when the state changes. This is probably the best solution, actually. You can get ICs that perform this function easily, and at wide voltage ranges.
    Last edited: Aug 22, 2012
  4. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    The likely cause is a "python script" being a high level interpreted language that runs slowly and is subservient to all the PC interrupts etc.

    If the script is just polling the PC parallel port then all the PC interrupts will interfere with the script and during any interrupt the pulse cannot be detected and will be missed.

    If you provide more info on what the pulses do, and frequency. timing etc and info on your PC and how it detects the pulses we can help you a lot better.
  5. Austin Clark

    Active Member

    Dec 28, 2011
    I would assume close to 20Hz, beings that he said they were 50ms apart. This isn't very fast and, I suspect, should be easily detected by any computer, even using Python, IF they lasted long enough and weren't too short as to "slip" between the samples taken. Thus, his best solution, I feel, would still be the flip-flop idea.