Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

"Simple" Relay Circuit - What am I missing!

Status
Not open for further replies.

hranalli

New Member
I used to experiment with electronics years ago. I was never advanced but I can usually find my way around basic circuits. I had an idea for a very simple circuit, but something is happening that I just can't figure out.

The circuit:
The circuit layout is in the attachment. The relay is a DPDT latching relay (this series). In the "reset" position, pins 9 & 10 and 4 & 3 are connected. In the "set" position, pins 9 & 8 and 4 & 5 are connected.

I am using it by applying +12V to pin 12 to reset it and +12V to pin 7 to set it.

What it is supposed to do:
When power flows into pin 12, the relay is reset and the same power source is connected to the blue output line through pin 10. This way, when power is removed, the output goes dead, even through the relay is still in the reset position. But if power is removed from pin 12 and then applied to pin 7 via the momentary switch, the relay closes in the set position, applying a constant 12V to the blue output through pin 5, so that the line remains active even though the switch is open. When power is once again applied to pin 12, the relay resets.

The application is on a motorcycle. There are times when it is useful to have auxiliary power for some items (e.g. charge camera batteries) without running the headlight and other needless items. So pin 12 is connected to a power source that comes on when the key is turned. Pin 7 is connected to a switch. When I want auxiliary power, I turn the key off and press the switch. When the key is next turned on, the relay is reset (thus saving me from draining the battery by forgetting to turn off a mechanical switch).

What it is doing:
The blue line is meant to go to an automotive relay controlling an auxiliary fuse panel. When it is connected to a digital panel meter, it works exactly as expected. But as soon as it is connected to the automotive relay, it will generally not reset when power is applied to pin 12. I say "generally" because sometimes it will (about 10% of the time, let's say), making me think that something is forcing the coil back to the set position, and that once in a while my connecting and disconnecting of the power catches the relay in the proper position.

If I disconnect the link between pins 5 and 10 (where they tie together to activate the automotive relay), the circuit works. If I connect a diode between pin 10 and the relay line, with the cathode at pin 10, the circuit resets properly, but of course I cannot power the relay through pin 10, because the diode is blocking the flow.

All this is completely counter-intuitive to what I would expect. There should be no interaction between the two coils, and the one point where there is a potential for interaction (the connection between pins 9 and 12 - which should be disconnected in the set position) would force the relay into the reset position, not the set position, which seems to be what is happening.

I've rewired the circuit twice and it's now on a breadboard, so I am sure that it isn't a short or other wiring error. The same thing happens both on the bike and from a 12V power supply on my desk.

I've gone over this in my head again and again, and I'm sure I'm missing something really, really obvious. Can anyone help?
 

Attachments

  • Dual Mode Switched Power Circuit Layout.png
    Dual Mode Switched Power Circuit Layout.png
    11.2 KB · Views: 242
Do you have the Bistable version, 1-coil?
 
Have you tried a diode snubber on the automotive relay?
 
I'm with Mike. You may have transient inductive spikes causing problems since none of the relay coils have a suppression diode. I suggest you try connecting a silicon diode across each relay coil (cathode to plus side of coil, anode to minus side) including one across the automotive relay coil (not in series with the coils which does not help).
 
I'm with Mike. You may have transient inductive spikes causing problems since none of the relay coils have a suppression diode. I suggest you try connecting a silicon diode across each relay coil (cathode to plus side of coil, anode to minus side) including one across the automotive relay coil (not in series with the coils which does not help).

Interesting. The automotive relay came as part of an auxiliary kit, and has a diode wired in-line with the relay line, to prevent spikes flowing back into the bike's electronics. It's explained here: easternbeaver.com/Main/Products/Fuseboxes/Wiring_Kits/Diode/diode.html (I didn't make this a link so my post doesn't get moderated).

This is also what I was trying to do with the diodes in my circuit. Obviously, this is different than what you are suggesting. I'll give it a try and let you know how it works. Thanks!
 
Interesting. The automotive relay came as part of an auxiliary kit, and has a diode wired in-line with the relay line, to prevent spikes flowing back into the bike's electronics. It's explained here: easternbeaver.com/Main/Products/Fuseboxes/Wiring_Kits/Diode/diode.html (I didn't make this a link so my post doesn't get moderated).

This is also what I was trying to do with the diodes in my circuit. Obviously, this is different than what you are suggesting. I'll give it a try and let you know how it works. Thanks!
That's a common mistake. A diode in series with the coil has no effect on the spike since the spike polarity is in the opposite direction of the applied voltage (e.g. negative for a positive applied voltage to the coil) so the diode will readily conduct the spike.

The inductance of the coil will attempt to keep the current flowing in the same direction (rather like mechanical inertia), so when the coil switch is opened the current tries to keep flowing. This reverses the coil voltage, giving a negative spike.
Edit: The diode provides a path for this inductive current, eliminating the spike.
 
Last edited:
Adding a diode across both of the latching relay's coils seems to have fixed it (will do some more testing this weekend). My guess is that because either coil could be a set or a reset coil depending on polarity, the spike was causing the coil to be triggered in the opposite position. Thank you very much for your help. A couple of other questions:

1) If I place a diode across the contacts to the automotive relay, can I do that on the board where I will have my smaller relay, or does it need to be wired as close to the relay contacts as possible?

2) I now know a diode in series with the line going to the relay coil does not affect the spike, but does it do anything at all to protect the electronics that are connected to that line? Is there any reason to have one there, and does the one that came installed on the automotive relay have any purpose?

Thanks again to both of you for your quick responses and excellent help. This has been driving me crazy!
 
Last edited:
1) If I place a diode across the contacts to the automotive relay, can I do that on the board where I will have my smaller relay, or does it need to be wired as close to the relay contacts as possible?

2) I now know a diode in series with the line going to the relay coil does not affect the spike, but does it do anything at all to protect the electronics that are connected to that line? Is there any reason to have one there, and does the one that came installed on the automotive relay have any purpose?
1) A diode across the relay contacts will not help. Remember that the inductance tries to keep the current flowing in the same direction, so a diode across the contact will remain reverse biased during any spike. The diode must be across the relay coil (or from the coil to ground).

2) The only thing a series diode will do is block the voltage if the circuit is accidentally reverse connected. I can see no reason to have one otherwise.
 
1) A diode across the relay contacts will not help. Remember that the inductance tries to keep the current flowing in the same direction, so a diode across the contact will remain reverse biased during any spike. The diode must be across the relay coil (or from the coil to ground).
Sorry, by "contacts" I meant to the coil. So running a diode on my board, from the line to the automotive relay's coil and ground should be sufficient. Thanks!
 
I suggest mounting the diode right at the relay coil, with leads as short as possible.
 
I suggest mounting the diode right at the relay coil, with leads as short as possible.
You can argue both ways on that. If you mount the diode at the driving switch or contact, then it will also suppress any transient from the wire inductance between the switch and the coil. Of course that's likely quite small for any normal wire lengths. So the diode should work well whether you mount in near the switch or near the coil.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top