What can I modify-add to this circuit to get a short pulse to trigger a DPDT relay

Thread Starter

Barnys1

Joined Jun 6, 2017
7
Hi
I have built the attached circuit (on both sides of the chip) that uses a push button to trigger a CD4013 to switch between two LEDs and also switch a DPDT relay from NC to NO via a PNP transistor. Because I have used non latching relays (i.e. they reset when powered off) and that the CD4013 will power on at its previous (power on) state, I have put a 47k to ground and 0.1uF to vcc combo on pins 4 and 10 to reset the chip when power is removed-restored.
I have tested the whole setup and it draws between 10mA with both relays sitting in NC and 100mA with both relays switched to the NO pins.

I had intended to power it from a small wall wart supply, but I am now thinking that if I can alter the circuit to use latching DPDT relays I could remove the RC from pins 4 and 10 and run the box from battery power.

My question is simply, how can I get a short “trigger” pulse (>10ms) to set-reset a DPDT latching relay like a Zettler AZ832P2-2C-5DE (because I have some of these)?
Thanks.
 

Attachments

Ohmlandia

Joined Mar 2, 2020
32
This is quite a complicated proposition, without much insight into why you need to do this. Are you sure that you need latching relays? Might there be some way you could use the other half of the 4013 to do what you want? More details please!
 

Thread Starter

Barnys1

Joined Jun 6, 2017
7
Thanks for replying Ohmiandia
Sorry for the delay in responding, I have been trying to solve this but unfortunately I have not succeeded.

I am trying to make a push-button activated switching/selector box which has 2 separate switched channels (each side of the CD4013) which simultaniously switches between 2 indicator LEDs and flipflops a DPDT relay.

What I have tried;
I am using both sides of the CD4013.
Each side has a single push button and two LED indicators.
When a button is pushed, the 4013 switches between that sides outputs (flipflops) and activates the relevant LED.
I have also added a DPDT relay to each side of the 4013 and have the relay switched by the push-button triggered flipflop of the 4013s outputs.
The circuit I originally posted works as intended. Each side of the 4013 reliably switches its outputs to turn on the relevant LED and trigger the relay.

The current issue;
I found that when switched to the NO position, the current draw of the non-latching relays was about 10 times more than what the circuit draws when the relays are in their NC position. This meant my small rechargeable battery I was using to power the circuit would drain within a few hours.
Because of this I had the idea of changing the relay end of the circuit to generate a short pulse with each button push to trigger-switch DPDT latching relays thereby reducing the long term power consumption and allowing the use of my small rechargeable battery as the power source.

I have loaded a new-modified schematic. This one uses 2 NE555 chips on each side of the CD4013 to generate a one second pulse (+5V) whenever the relevant button is pressed.
This works well except for one issue; unlike the CD4013, all of the 555 circuits trigger when the power is turned on!
I am thinking that simultaneously activating both coils of a dual coil relay is not a good idea....

But what to do about the problem, can these 555 circuits be modified so they don’t trigger when power is supplied, or perhaps there a better option-circuit that can generate the short pulse needed to trigger the relays?

Thanks
 

Attachments

crutschow

Joined Mar 14, 2008
34,280
A 555 is overkill for this requirement.
Here's the LTspice simulation of a simple circuit that will pulse the relay coil for sufficient time to latch it, with no power-up glitches.
The circuit's input can be the Q outputs from the CD4013 FF.
Each coil requires one of these circuits.

1586539052140.png
 
Last edited:

Tonyr1084

Joined Sep 24, 2015
7,852
I think what @Barnys1 wants is a single push button to latch the relay then push the same button a second time to unlatch it. Hence, the D type FF. Without knowing how I'd go about this - my first thought process is a D type FF to toggle Q high then low then high then low, with each push of the button. Where the trick comes in is having that pulse go high for a short period of time - on the order of 500 mS for example.

Another approach would be to use two chips - a Double D FF and an AND gate. When the button is pressed there's a clock pulse to one of the two legs of a Quad 2 Input AND gate and to the clock of the D FF. When both the clock and the D output is high it feeds the SET of the relay. The /Q (NOT Q) output can be connected to the RESET of the relay, that too is through one of the Quad 2 Input AND gates. Only when both clock and the associated AND gate is high the latching relay latches in either SET or RESET - depending on the circuit. The other two AND gates should have their inputs tied to ground.

Give me some time and I'll bang out a general drawing of what I propose.
 

crutschow

Joined Mar 14, 2008
34,280
Without knowing how I'd go about this - my first thought process is a D type FF to toggle Q high then low then high then low, with each push of the button.
I believe that is what he has.
Where the trick comes in is having that pulse go high for a short period of time - on the order of 500 mS for example.
Why?
For his circuit the pulse can be high indefinitely.
 

Tonyr1084

Joined Sep 24, 2015
7,852
Two chip design with latching relay:
1st Push of the button - Clock toggles Q high, /Q low. Simultaneously 4081 A latches the relay
2nd Push of the button - Clock toggles Q low, /Q high. Simultaneously 4081 B Unlatches the relay.
The relay is only energized during the push of the button. Let go of the button and the relay remains in whatever state it is set to.
1586545215199.png
Extra gate inputs need to be held low.
1586545357325.png
 
Last edited:

Tonyr1084

Joined Sep 24, 2015
7,852
I believe that is what he has.
Why?
For his circuit the pulse can be high indefinitely.
As I posted in #5 I was beginning to work out the solution. The 500 mS was a spitball idea. The drawing using the AND gate drives the relay into latch or unlatch only during the push of the button. So the 500 mS idea was preliminary. I'm now wondering if there's a way to use the second D FF as an AND gate. Probably not - but I'll think about it.

His "indefinitely high" - he said will drain his battery. So on the premises of the TS wanting to use power to change the state of the relay ONLY when the button is pressed - in keeping with that thinking I used the AND gate to deliver the momentary trigger for the relay.

Also not shown on the drawing is the flyback diode. Don't forget to put that in circuit or you could hurt the AND gate.
 

Tonyr1084

Joined Sep 24, 2015
7,852
@crutschow Good point.

[edit] since there are two extra gates - one of those can be used with the debounce at the switch. No?

[edit #2] the remaining gate can toggle between the two LED's.

OK, I'm done editing. I think.
 
Last edited:

Thread Starter

Barnys1

Joined Jun 6, 2017
7
Thanks for the responses, your input is appreciated.
I have ordered some 4081s
Now its time to hurry up and wait for them to arrive.....
 

RAMBO999

Joined Feb 26, 2018
259
Hi
I have built the attached circuit (on both sides of the chip) that uses a push button to trigger a CD4013 to switch between two LEDs and also switch a DPDT relay from NC to NO via a PNP transistor. Because I have used non latching relays (i.e. they reset when powered off) and that the CD4013 will power on at its previous (power on) state, I have put a 47k to ground and 0.1uF to vcc combo on pins 4 and 10 to reset the chip when power is removed-restored.
I have tested the whole setup and it draws between 10mA with both relays sitting in NC and 100mA with both relays switched to the NO pins.

I had intended to power it from a small wall wart supply, but I am now thinking that if I can alter the circuit to use latching DPDT relays I could remove the RC from pins 4 and 10 and run the box from battery power.

My question is simply, how can I get a short “trigger” pulse (>10ms) to set-reset a DPDT latching relay like a Zettler AZ832P2-2C-5DE (because I have some of these)?
Thanks.
Two RC circuits can be used to provide a pulse. Choosing the right combinations of resistor and capacitor will enable you to control the duration of the pulse by manipulating the time constants of the capacitors during charging. In this demo the resitance / capacitor combo on the right controls the duration that the cap on the left, which lights te LED, retains its charge before being discharged. The cycle repeats. All you need to do is figure out how to make this occur only once. By making it dependent on the relay in yor circuit perhaps. Just a thought.

http://www.smegateway.co.uk/SMEgateway/videos/flashingledcaps.mp4
 

Tonyr1084

Joined Sep 24, 2015
7,852
Thanks for the responses, your input is appreciated.
I have ordered some 4081s
Now its time to hurry up and wait for them to arrive.....
Before you rush forward with your project - how much current does the relay require? The 4081 might not be able to provide sufficient power to toggle the relay. You may need a switching transistor in the circuit to carry the amperage needed for the relay. The circuit I drew was to present an idea for moving forward, but is not necessarily complete or accurate. As @crutschow pointed out - my debounce circuit may be unnecessary. At least that's what I think he was conveying.
 

crutschow

Joined Mar 14, 2008
34,280
my debounce circuit may be unnecessary. At least that's what I think he was conveying.
Yes, if the D flip-flop has an RC delay from the /Q output to the D input, as shown in the first post.
But that circuit actually is not quite correct, since there should be a resistor between the /Q output and the capacitor to generate a proper delay (greater than the longest expected switch bounce time).
 

Thread Starter

Barnys1

Joined Jun 6, 2017
7
Hi
I now have some 4081s.

I have been attempting to find/figure out a circuit that triggers the 4013 with a high (5V) pushbutton pulse, unfortunately this has proved to be a bit challenging. The circuit I started with (in the first post) pulls pin 3 down.

I found the attached circuit which uses both sides of the 4013 to toggle pins 12 (Q/) and 13 (Q) when triggered by a button push which pulls up pin 6. The good news is that I currently have a working circuit where, with each button push an alternating latched output is achieved between pins 12 and 13 and each button push also produces a pulse from the associated end of the 4081.
Unfortunately this circuit resets the 4013 at power up (it powers on with Q latched). This is in contrast to the circuit I started with which would maintain it setting when powered off and back on.
This would mean that when using latching relays, the LED- relay position association may not be correct at power on (each LED pair serves as an indicator for the relevant relay setting). While this isn’t a huge problem, the LED - relay association mismatch should be corrected with the first button push, it would be cleaner (nice) if there was a solution that had the 4013 and relays maintain their matched state when the power is cycled.

Does anyone have an idea – suggestion – circuit that would solve my 4013 power on reset problem?

I found the attached circuit at http://www.bowdenshobbycircuits.info/page9.htm

4013.gif
 
Last edited:

crutschow

Joined Mar 14, 2008
34,280
if there was a solution that had the 4013 and relays maintain their matched state when the power is cycled.
If you want the 4013 to maintain its state when power is removed, then you need to add a battery backup to maintain the state, since it has no memory and will otherwise come up in a random state.
The battery can be a lithium coin cell that will last for years since the 4013 only draws a very small leakage current in the static state.
Otherwise you could use feedback from the relay to set the 4013 to the proper state when power is applied.

The post #16 circuit seems rather complex to perform a simple task.
The simple circuit below triggers on the high PB push.
The first PB pulse (blue trace) has oscillations to show that the circuit ignores switch bounce as provided by the feedback delay from R1C1.

1588089855938.png
 
Last edited:

eetech00

Joined Jun 8, 2013
3,856
Hello

You can try something like this but it requires a latch relay with two separate contacts.
One contact for the load and one contact to provide status.

When the circuit is off, the relay is in an unknown state. When the circuit powers on, a pulse is generated to set the state of the toggle flip flop, U1A, to match the current state of the relay.

See circuit and simulation below.

1588103914204.png

1588103972054.png
 

MisterBill2

Joined Jan 23, 2018
18,167
Thanks for replying Ohmiandia
Sorry for the delay in responding, I have been trying to solve this but unfortunately I have not succeeded.

I am trying to make a push-button activated switching/selector box which has 2 separate switched channels (each side of the CD4013) which simultaniously switches between 2 indicator LEDs and flipflops a DPDT relay.

What I have tried;
I am using both sides of the CD4013.
Each side has a single push button and two LED indicators.
When a button is pushed, the 4013 switches between that sides outputs (flipflops) and activates the relevant LED.
I have also added a DPDT relay to each side of the 4013 and have the relay switched by the push-button triggered flipflop of the 4013s outputs.
The circuit I originally posted works as intended. Each side of the 4013 reliably switches its outputs to turn on the relevant LED and trigger the relay.

The current issue;
I found that when switched to the NO position, the current draw of the non-latching relays was about 10 times more than what the circuit draws when the relays are in their NC position. This meant my small rechargeable battery I was using to power the circuit would drain within a few hours.
Because of this I had the idea of changing the relay end of the circuit to generate a short pulse with each button push to trigger-switch DPDT latching relays thereby reducing the long term power consumption and allowing the use of my small rechargeable battery as the power source.

I have loaded a new-modified schematic. This one uses 2 NE555 chips on each side of the CD4013 to generate a one second pulse (+5V) whenever the relevant button is pressed.
This works well except for one issue; unlike the CD4013, all of the 555 circuits trigger when the power is turned on!
I am thinking that simultaneously activating both coils of a dual coil relay is not a good idea....

But what to do about the problem, can these 555 circuits be modified so they don’t trigger when power is supplied, or perhaps there a better option-circuit that can generate the short pulse needed to trigger the relays?

Thanks
A very simple cheating trick that works well with DC circuits to provide a short pulse to set a latching relay is just to use a series capacitor between the pushbutton switch and the relay coil. When the button switch closes and a current flows into the relay until the capacitor is charged. Then the current ceases to flow. Of course some experimenting is needed to find the correct capacitor value, and the pulse time does vary, but if the time needed is simply "short" then the circuit will work. That is as simple a circuit as I can offer. One series capacitor.
 

Tonyr1084

Joined Sep 24, 2015
7,852
At power-up, the relay will be in its last set state. If you push the button you SHOULD get a good set signal setting the relay to the (lets assume) ON position (regardless of its previous setting). Since the relay holds its set, power-up shouldn't be that much of a concern. The relay only changes state when the button is pressed. IF the 4013 is in the wrong configuration at start-up all you need to do is push the button a second time and you will have full control.
1588166812274.png
There's a lot of really great circuits posted in this thread. I think this simple circuit will do. @crutschow (post 15) said my circuit was a little incorrect. I think I've corrected it to work.
 

Attachments

Top