Two seperate pulses from rising and falling edge

Discussion in 'General Electronics Chat' started by jlawler, Nov 4, 2013.

  1. jlawler

    Thread Starter New Member

    Oct 22, 2009
    7
    1
    Hi,

    Here is my problem. I have a relay output that is driving a valve (0->24VDC). Essentially this is on until reset. I want to replace this with a latching valve driven by an L293 without changing all the other circuitry.

    So if I step down the output voltage to 5V how can I get a rising edge to trigger one monostable (i.e. 1, 0 to the L293) and a falling edge to trigger another monostable (i.e 0, 1 to the L293). The pulse lengths need to be about 1 second.

    I have been racking my brains about this for a while and have been trying with a negative and positive trigger HEF4047B but it wont work because the on time is too long ( i.e. it is not a pulsed trigger input). I am thinking that a monostable 555 might be the best way but I'm not sure how to do the triggering with a falling edge and combining the two.


    If anybody can help I would be grateful.
     
  2. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    Edge detector! In the upper one, R2 and C1 sets the output pulse width.

    Ken
     
    Van Etten likes this.
  3. jlawler

    Thread Starter New Member

    Oct 22, 2009
    7
    1
    Thanks Ken,
    Its not the edge detection as such that's the problem, its the fact I want one monostable to trigger only on a rising edge and the other to trigger only on a falling edge (and of course reset for the next rising/falling edge). Then I can supply the two separate inputs to the L293 to latch the valve open or closed.


    J
     
    Van Etten likes this.
  4. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,548
    2,373
    Sounds as if J-K flip flops would do it?
    Max.
     
  5. jlawler

    Thread Starter New Member

    Oct 22, 2009
    7
    1
    Thanks Max I will have a look.
    Here is a picture of the inputs and outputs.

    J
     
  6. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    OK, I think this will work.

    Ken
     
  7. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,800
    1,104
    Perhaps a modification of this?
     
  8. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,172
    397
    Looks like one two many inversion, ie the 10-11-12 one.
     
  9. jlawler

    Thread Starter New Member

    Oct 22, 2009
    7
    1
    Thanks guys. I will try it out on the bread board.

    I did come across this in an old EDN "Dual One Shot makes rising and falling edge detector" but I'm not sure if it separates the two outputs (might have to "solder-it-and-see").
    http://m.eet.com/media/1150601/24756-3499di.pdf

    What's the best free-ware program I can use to try simulating some of these circuits before I start melting solder?

    J
     
  10. jlawler

    Thread Starter New Member

    Oct 22, 2009
    7
    1
    Hi Ken,
    Just one thing. Is the polarity on C3 correct? If I understand it correctly it is discharging on an input pulse and pulls the input down on a negative edge?
    (I could always just do bling and use tantalum capacitors :) )

    Thanks,

    J
     
  11. MrChips

    Moderator

    Oct 2, 2009
    12,446
    3,361
    Use any dual monostable chip. They come with two trigger inputs for both monostables, one for rising edge trigger and the other for falling edge trigger.
     
  12. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    Bernard and jlawler you are both right. What happens when you are trying to multitask. :(

    This one is tested. ;)

    Ken
     
    Bernard and jlawler like this.
  13. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,800
    1,104
    LTspice (from Linear Technology) works for me.
     
  14. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    One thing about my (OK, I stole part of it!) CD4093 circuit over the +/- triggered dual monostable IC, is that if the input is shorter (for whatever reason) than the 1 second output pulse width, the leading edge output pulse drops when the trailing edge pulse rises. The dual monostable could have overlapping outputs. Not sure how a latching relay would handle that. Then again, it may not be a problem in this application.

    Ken
     
  15. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,800
    1,104
    A single-coil type latching relay will require a pulse of one polarity to set it but the opposite polarity to reset it: not so with the dual-coil type but, like KM, I'm unclear how the latter would handle overlapping drive pulses.
     
  16. jlawler

    Thread Starter New Member

    Oct 22, 2009
    7
    1
    Just to let you know it works a treat. Thanks again. Just playing with it now.

    Appreciate the fact that the circuit won't mix states, handy as its important to keep the pulse of sufficient length to set the correct state on the latching valve.

    I am just going to add a reset on power pulse (same as the negative edge trigger) with a 555 to output 4 to make sure that if things are powered off/on inadvertently it will make sure all the valves are open when powered on again.


    J
     
  17. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    Out of curiosity, what is the over all system that we're modifying?

    Ken
     
  18. jlawler

    Thread Starter New Member

    Oct 22, 2009
    7
    1
    Useful feature
    I integrated the complete circuit into the existing kit using strip-board. I found a really neat feature (serendipitous design side-effect) is that on power up the circuit triggers as a negative edge pulse. This had the effect of resetting the valve. I was going to put in a circuit for this separately but now I don't have to :-D

    Ok the awful truth about the circuit. Basically I did it as a simple project to turns off beer flow to beer taps. It uses normally open valves so beer flows fine when everything is off or not activated. When they are activated they shut off the beer flow. I originally made the circuit with a PIC (it actually uses a remote I2C I/O to control the valves) and just had relays controlling the valves (got a PCB made up). All worked fine at first but I found out later (like you always do) that the valves were getting hot and cooking he beer inside them. Not such a big problem you would think as its only a small volume, but beer is acidic and cider is even worse (don't want to think what it does to your stomach). So hence I changed to latching valves as they are only powered for about a second to switch on or off. I can run the valves on a L293D as they only need about 300mA and it is cheap and simple. I didn't want to throw out what I had already done (and I would have been short of I/O).

    Thanks again
     
  19. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    Sounds like a project I would have rather helped with in person. ;)

    Thanks for the feedback.

    Ken
     
Loading...