Go Down

Topic: Dual latch Relay Circuit Setup (Read 7382 times) previous topic - next topic

Mikie_lomas

Hi Guys,

I will apologise straight off for the lack of circuit diagram. But I will explain what I am trying to do as best as possible.

https://www.omron.com/ecb/products/pdf/en-g5rl_uk.pdf

I have the dual altching relay model of this relay. I am trying to configure it so that I can both latch it either way with my arduino. A wise person on this forum has guided me to understand that in the diagram. I think 5v is applied to the + pin and then when setting or resetting the relay, I have to set either side to low? Is this correct?

I have also read that I should employ  resistors and diodes to protect the arduino from getting fried.

Any help on how I would set this circuit up would be much appreciated.  Thank you for your time.

DrDiettrich

First of all open the data sheet and find your specific relay description (section Dimensions), to identify the coil connectors and polarity. Eventually the same information is printed near the relay pins. Or give the full type ID of your relays, so that we can find the essential details pertaining to exactly that type.

In either case you need at least 2 transistors, better a H-bridge, to drive such a relay. The Arduino outputs are incapable of sourcing that much current or voltage as required to toggle the relays.

dave-in-nj

#2
Nov 20, 2016, 03:13 pm Last Edit: Nov 20, 2016, 03:19 pm by dave-in-nj
lots more data is needed.

latching relays on that data sheet offer either a single coil. you use an H-bridge to revere power
and it shows two coils. one to set one direction, the other for the second direction.

-U is a single coil, you alter ground and power
-K is 2 coil, you need to bring one to ground to make that side work.

very easy to use two coils. but you need two pins from your Arduino.

YOU CANNOT POWER DIRECTLY from the Arudino.
at 5V each coil uses 150 mA.
you must use a transistor.  very easy, couple of cents for a transistor, resistors and the required diode.

power goes to the relay coils, always hot.
you only close the circuit on the coil you want to power.
only needs a few ms to power the coil.



dave-in-nj

#3
Nov 20, 2016, 03:21 pm Last Edit: Nov 20, 2016, 03:22 pm by dave-in-nj
for a single coil, you need to use an H-Bridge.



pins from the Arduino are on the left.
you need 4 transistors, 2 are to be PNP, and two NPN
or use an h-bridge on a chip.

rpt007

H-bridge is the magic word.
But, there is a BUT ...

Building this circuit with discrete devices you will have to make absolutely sure, that certain conditions won't happen if you don't want to fry the transistors in the circuit. As the transistors need a time (ok, pretty short, but they are fast) to switch from ON-OFF or OFF-ON you might run into a situation where the current is shortened through two transistors with any load in between which will fry at least one, maybe both transistors.

There for my recommendation is to use a special IC for that which is designed to avoid that shortening situation.
A suitable H-Bridge IC is the L293D, which is pretty common in the Arduino world and pretty cheap, coming with internal protection diodes and it's inputs can be directly connected to the Arduino outputs without addt'l resistors.

The following links give you some more detailed information how to use the circuit; in your project just replace the motor with the single coil of your latched relay - polarity of the coil is irrelevant as you can switch the state back and forth by the Arduino.

http://www.me.umn.edu/courses/me2011/arduino/technotes/dcmotors/L293/L293.html
and
http://www.robotplatform.com/howto/L293/motor_driver_1.html

Before you ask:
Did you really read and understand How to use this forum ?
AND:
Do you have already some solution or is a part of the problem sitting in front of the screen?  :)

DrDiettrich

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 :-)

dave-in-nj

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

DrDiettrich

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 ;-)

dlloyd

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.


Wawa

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

Mikie_lomas

#10
Nov 21, 2016, 05:04 am Last Edit: Nov 21, 2016, 05:12 am by Mikie_lomas
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?

dlloyd

#11
Nov 21, 2016, 05:58 am Last Edit: Nov 21, 2016, 06:19 am by dlloyd
Quote
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:

Code: [Select]
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);
}

Mikie_lomas

Quote
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.

dlloyd

#13
Nov 21, 2016, 07:13 am Last Edit: Nov 21, 2016, 07:16 am by dlloyd
Yes, the 2N3904 should work OK. Most any diode would do ... IN4448, 1N914, IN4004, 1N4005, 1N4006, 1N4007 and others.

Quote
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).

Quote
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.

Mikie_lomas

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.

Go Up