Dual latch Relay Circuit Setup

I'd wait for feedback about the really used relay. If it has separate set and reset coils, two transistors will be perfectly sufficient, a full H-bridge is required only for a single coil relay. For insiders: just the same difference as with unipolar and bipolar stepper motors :-)

DrDiettrich: For insiders: just the same difference as with unipolar and bipolar stepper motors :-)

yes, once you get familiar with a coil, you soon realize that a solenoid, a relay a stepper, are all just coils and are treated the same basic way

dave-in-nj: yes, once you get familiar with a coil, you soon realize that a solenoid, a relay a stepper, are all just coils and are treated the same basic way

Right, but as we know from resistors in parallel and in series, multiple coils can be combined in several ways, with distinct behaviour ;-)

Separate 5V supply is needed but H-bridge is not needed (I've used these). Only 2 outputs needed. Remember to use a pulse (HIGH) to set or reset the relay (do not leave the outputs continuously high). A pulse duration of 40ms works well.

|500x213

For a single coil you can use a "poor man's H-bridge"

Wow thank you so much for all your replies everyone. I am sorry for not making it clear. The relay i am using is the double Latch Relay.

It is the G5RLk1EDC5

it takes 5v. I also have some of the single coil, although I am pretty sure that the double altch will be more suitable for my project.

From the datahseet it has 9 pins. 6 pins for the current that is being switched. That is 2 pins for NC, 2 for C, and 2 for NO.

It also has a + a reset and set.

I have TIP120s and 2n3904 transistors..probably more lying around. Would these be sufficient. I have also ordered some from china..

I am pretty sure that the way I connect it is:

5v to the +, then make Reset and set outputs which I pulse into either state. I just have to be careful with backflush EMF and alot of the other things you guys mentioned.

I have diodes and transistors and resistors. Is there any sure fire way of selecting the right one or is it setup the circuit and test current and voltage?

Arduino 5v - > middle pin

Arduino output pin --> Diode ->transistor --> reset

Arduino output pin --> Diode ->transistor --> set

Is this the right setup for a double latching relay?

Is this the right setup for a double latching relay?

The diodes need to be connected across the center tapped coil as shown in the diagram.

Diode 1: Anode to relay pin 1, cathode to relay pin 9. Diode 2: Anode to relay pin 8, cathode to relay pin 9.

Here's a simple test script:

const byte ledPin = 13;            // LED pin (shows relay status)
const byte setPin =  6;            // connect to relay coil "S" pin
const byte resetPin = 7;           // connect to relay coil "R" pin

void setup() {
  pinMode(ledPin, OUTPUT);
  pinMode(setPin, OUTPUT);
  pinMode(resetPin, OUTPUT);
}

void loop() {
  // Set the relay
  digitalWrite (setPin, HIGH);
  delay (40);
  digitalWrite (setPin, LOW);
  digitalWrite (ledPin, HIGH);

  // Wait 1 second
  delay(1000);

  // Reset the relay
  digitalWrite (resetPin, HIGH);
  delay (40);
  digitalWrite (resetPin, LOW);
  digitalWrite (ledPin, LOW);

  // Wait 1 second
  delay(1000);
}

The diodes need to be connected across the center tapped coil as shown in the diagram.

Diode 1: Anode to relay pin 1, cathode to relay pin 9. Diode 2: Anode to relay pin 8, cathode to relay pin 9.

Thank you for your reply.

I do not currently have the transistor that you specified , but I do have 2n3904. Will these work until I can source the ones specified?

Thank you so much for the test script, it is exactly what I needed.

Will any cathode do? Does the downwards arrow mean to ground, except we do not want the arduino and the 5v to have common ground?

you have provided the diagram for a single latch relay. Will the same script and circuit work for the double latch?

Thank you for your continued response.

Yes, the 2N3904 should work OK. Most any diode would do ... IN4448, 1N914, IN4004, 1N4005, 1N4006, 1N4007 and others.

Does the downwards arrow mean to ground, except we do not want the arduino and the 5v to have common ground?

for any diode, this is the anode side -----l>|------ this is the cathode side

The long line side does not mean "to ground". In this application, this end of the diode (cathode) connects to the center pin of the relay coil (+5V).

you have provided the diagram for a single latch relay. Will the same script and circuit work for the double latch?

No, it's for the double-winding Latching Type.

You may have a different relay contact configuration. The SPDT (single pole double throw) type "1C" (form-C). Yes, it will work for this type also.

Thank you again for your response, I will attempt to make something following your guidelines after i finish work tonight.

I was referring to the hollow white downward arrow, is this ground?

If not I was curious as to how the circuit is grounded? I am a beginner at this stuff, but from the diagram you provided it looks as if the current from the high pulse will trail back out the left pin of the opposite transistor?

Once again thank you for your time.

After looking over the diagram further.

Does the white hollow arrow mean 5v? That would mean that 5v goes into the collecter, then the base is pulsed and the emitter delivers the current towards either reset or set? then the back flush of emf travels through the diode back into the centre pin?

You better use the circuit diagram in #8. The H-bridge circuit in #3 is too specialized and simplified, will work only under certain conditions. The weakest point is the restriction of the supply voltage, which is supposed to equal the logic HIGH voltage of the driving output pin, under load. Even then the top transistors may not turn fully on, due to the voltage drop in the base resistors. If a base current of only 1mA is required, this will drop 1-3V on the 1-3k base resistors, another 0.7V on B-E, and 0.4V on the C-E of the bottom transistors, so that less than 3V is left for the coil :-( Increasing +V doesn't help, because the emitter voltage can not exceed the base voltage, which is determined by the connected controller output pin. In practice the top transistors should be PNP, with another NPN transistor driving their base.

The hollow arrows mean ground. The diodes let the back flush rush into the power source.

Thank you for your reply. I am building the circuit now. Is the external 5v supply mandatory or is this the only way doing it this method?

Would this mean I would need two power supplies for every one of my projects? Would it be possible to have 1 main external supply that feeds all of the relays around the house through cat6? I know there would be a voltage drop, so you would up the voltage at the start, is there anyway however to ensure that 5v goes into the circuit at the end?

Thank you so much for your guidance

Hi There,

You better use the circuit diagram in #8.

I attempted the circuit. I have enclosed pictures but will describe as best as possible

arduino pin 6 -> 470 resitor to base of transistor, with left pin leading to ground and right pin leading a common line which splits off into 1 pin of relay (of the 3 pins), the other is a diode pointing towards a line that is fed 5v from an external power source. This is repeated for pin 7.

I then used the script your provided, no clicking noise when hot is not attached and no switching when it is.

I feel i have possibly confused myself somehow and done things wrong. The bit that worries me the most is around the input area. I have attached pictures to attempt to assist my explanation.

Thank you

15133658_10154166847287613_307958096_o.jpg|2048x1152

15152314_10154166847952613_1569652414_o.jpg|2048x1152

15152379_10154166848622613_595268401_o.jpg|1152x2048

Test your circuit by disconnecting the base resistors from the controller, and connect them momentarily to Vcc to switch the relay. You can also add a LED (+resistor) to the output pins, for visual feedback.

I was thinking something similar as DrDiettrich. If the LEDs alternately blink, then replace the relay test circuit with the actual relay. Here's an updated diagram:

|500x305

I'm a little concerned that the 2N3904 will not be strong enough to switch the relay coil. May need to replace with PN2222A or other.

EDIT: In the code, you may need to temporarily change the pulse interval from 40ms to 100ms to see the LEDs blink (pulse) a bit brighter.

I'm a little concerned that the 2N3904 will not be strong enough to switch the relay coil. May need to replace with PN2222A or other.

I have ordered 50 PnAAAA weeks ago, but they have not arrived. I also have:

2NAAAA will these work?

I understand this circuit a little better than the other. Does the led go in series after the diodes to the far right?

Once again thank you so much for your continued correspondence.

The 5V coils draw 120mA, should not be a problem with any transistor.

2NAAAA will these work?

If you mean 2N2222A, then yes.

I understand this circuit a little better than the other. Does the led go in series after the diodes to the far right?

The LEDs go in series with the 330 ohm resistors. The common connection point of the resistors is the 5V relay supply voltage.

EDIT: In the code, you may need to temporarily change the pulse interval from 40ms to 100ms to see the LEDs blink (pulse) a bit brighter.

I just followed the code you provided originally and there was a 40 - 1000 ms delay change. So i assumed this was what you meant.

With the revised LED test circuit and changing the transistors I have managed to get the LED circuit working as I would imagine the relay circuit would. I think I understand the circuit better now.

Now I just replace the whole relay test driver section with a relay, or do I need to swap the resistors back to the oldies.

Thank you so much for your help so far.