one pulse on switch close, and one on switch open

Discussion in 'General Electronics Chat' started by grovecat, Oct 22, 2011.

Thread Status:
Not open for further replies.
  1. grovecat

    Thread Starter New Member

    Oct 22, 2011
    2
    0
    I'm looking for a circuit that will connect to a single on/off switch and will send a single pulse when the switch is closed, then another single pulse when the switch is opened. There will be a time delay between the events, but that is controlled externally to the circuit.

    There are many 555 circuits that will do the above with two momentary switches but I have to do it with one.

    The application is for a device that assesses low functioning individuals by starting a cd player track then turning it off after a time period. The idea is to see if the patient grasps the connection between a button and the resultant action, by restarting the song with the button. The front end is a standard switch latch and timer device used in timer mode. On a button press it closes a switch for a set delay then opens it. As a CD player expects a momentary button press to pause, then another to play, the switch latch and timer does not do the job by itself.

    Any advice will be appreciated.
     
  2. iONic

    AAC Fanatic!

    Nov 16, 2007
    1,420
    68
    Do you know the voltage level and duration of the pulse needed?
    And with respect to your switch, you mentioned both an on/off switch and a momentary switch. Which switch do you need for this design.

    on/off switch - flip up to start music, flip down to stop the music
    momentary switch - press and let go to start music, press and let go to stop music.

    As far as the single 555 solution, I an still pondering that.
    And there's no way a 556 couldn't be used??

    I'm having a bit of trouble understanding the whole thing.

    You have a circuit that starts and latches on a music player for a time, then turns off?
    You want a circuit to control this circuit?

    So can I assume the latching circuit can not be reset with the same on switch, the time must run out.

    Are you trying to see if the subject can grasp the concept of starting and restarting the music with the same button or if they can start and stop the music with the same button, or both?
     
    Last edited: Oct 22, 2011
  3. crutschow

    Expert

    Mar 14, 2008
    13,016
    3,235
    You can use an exclusive-or gate, such as the CD4070, to generate a pulse on both the push and release of a push button. You connect the switch directly to one of the exclusive-or inputs and connect the switch through an RC delay (series resistor, capacitor to ground) to the other input. The exclusive-or pulse width will be approximately equal to the RC time constant.

    The switch output will require some type of debounce circuit, of course.
     
    viveiroscordeiro and Teacher like this.
  4. grovecat

    Thread Starter New Member

    Oct 22, 2011
    2
    0
    Thanks for the responses. I'll try to make the situation a bit clearer.

    The switch latch device timer (SLT) device in this case will just close a switch (when a momentary button is pressed) for a certain time then open it. I need to take that switching output and send a single pulse (through a NO relay) to the Play/Pause button input of a CD player that is set to Pause. That will then start it playing. At the end of the delay time, the SLT device will open its switch, and I want to then send another single pulse to put the CD player back into Pause. If the patient associates the button with the playing of the song, he/she will press the button again. This is for my son to use in his occupational therapy work with disabled children.
     
  5. iONic

    AAC Fanatic!

    Nov 16, 2007
    1,420
    68
    I apologize for being so dense. I'm not sure I understand this any better, in part because you did not answer any of the questions I posed. Perhaps someone else will pop in and clear things up some. Until then answering the questions below will help me understand and help you.


    Q1. Do you already have a circuit that starts and latches on a music player for a time, then turns off? And this circuit incorporates a N.O. Relay?
    IF NO go to Q:6

    Q2. You want a circuit to control this circuit? one press to start, another press
    to start

    Q3. And there's no way a 556 couldn't be used??

    Q4. Do you know the voltage level and duration of the pulse needed?

    Q5. Are you trying to see if the subject can grasp the concept of starting and restarting the music with the same button? (This is a YES)

    Q6. If you have no existing circuit and you need one to do all of this then the scenario could be as such!?

    Press a momentary switch
    ....................| short pulse occurs
    ....................| Music begins to play
    ....................| timer starts


    ....................|Timer stops
    ...........................| short pulse occurs
    ...........................| Music stops

    User repeats cycle by pressing momentary switch again.

    Q7. Do you think there might be some advantage in having the play duration manually variable? Might this encourage a repeat press?

    Q8. Do you know the voltage used to pause/start playback (the pulse amplitude), the duration can be .5sec to 1sec.

    Not real sure why your needing a relay, if it is already part of an existing circuit or just something you envisioned.
     
    Last edited: Oct 22, 2011
  6. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    I don't know how long you want your output pulse to be.

    Attached is a couple of circuits based on crutschows' suggestion of an XOR gate with an RC time delay; one with a purpose-built XOR gate on the left, and an XOR gate built from 4093 Schmitt trigger quad NAND gates. As shown, the output pulse width is roughly 10mS.

    It is good to use Schmitt-trigger inputs when you have slowly transitioning signals on the inputs, as gates without Schmitt triggers can operate erratically when the input signal is in the indeterminate region (neither clearly a logic 1 nor 0.)
     
    Teacher likes this.
  7. tsk1979

    New Member

    Dec 4, 2013
    6
    0
    I started a new thread today, but I guess this is what I need.
    I have a further question.
    What if I want to restrict this in a way such that
    1 pulse on switch on
    1 pulse on switch off only if switch off - switch on time > 1s

    i.e. just momentary activation of switch should do only one pulse
     
  8. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    Welcome to AAC!

    A thread belongs to the OP (original poster). Trying to take over someone elses thread is called hijacking, which is not allowed at All About Circuits.

    Your other thread, which you started and does belong to you, is here, On/Off pulse switch

    In addition, you have practiced the arcane art of necromancy, the revival of a long dead thread. Likely the OP (Original Poster) has solved his problem in the years that has passed, or thrown it away, or something.
     
Loading...
Thread Status:
Not open for further replies.