Two seperate pulses from rising and falling edge

Thread Starter

jlawler

Joined Oct 22, 2009
7
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.
 

Thread Starter

jlawler

Joined Oct 22, 2009
7
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
 

Thread Starter

jlawler

Joined Oct 22, 2009
7
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
 

Thread Starter

jlawler

Joined Oct 22, 2009
7
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
 

MrChips

Joined Oct 2, 2009
26,515
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.
 

KMoffett

Joined Dec 19, 2007
2,918
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
 

Alec_t

Joined Sep 17, 2013
12,900
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.
 

Thread Starter

jlawler

Joined Oct 22, 2009
7
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
 

Thread Starter

jlawler

Joined Oct 22, 2009
7
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
 
Top