Go Down

Topic: single coil bistable / latching relay (Read 12320 times) previous topic - next topic

yesyes

Nov 28, 2015, 04:04 pm Last Edit: Nov 28, 2015, 04:04 pm by yesyes
Hi,

so far I have used bistable relays with 2 separate coils for SET and RESET. I control them from an Arduino with 2 pins like shown in attachment "img0072.png". This works fine.

Now I want to use single coil bistable relays where you need a voltage pulse to set / latch the relay and then a reverse polarity pulse to reset / unlatch. I'm having a hard time coming up with a circuit or finding one.

What I have found is the circuit in attached "latching Relay-5.gif".
(source: http://www.talkingelectronics.com/projects/200TrCcts/101-200TrCcts.html#20)

Is this the best way to control this from an Arduino? Where would I put the protection diodes? Or don't I need them in this case?

Is there any better way to control a single coil bistable relay from an Arduino?

One condition is that the relay does not move when power fails. This is the main reason why I use bistable relays.
Chris

Location: Berkshire, UK
My Astro and DIY projects website: http://yesyes.info/

MAS3

Hi.

Looks to me like that should do the trick, this is less trouble than using an H-bridge.
The protection diodes go over the collector and emitter of each transistor, pointing up in that drawing, and as close as possible to the coil.

You could consider using some more transistors, and then use one output to switch on and off, if you need to save outputs.
There's more ways to save pins, especially when you would be using more than a single relay.
Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

yesyes

so something like the attached circuit would work?

I have plenty of spare pins on this project and only one relay. So no need to save pins.
Chris

Location: Berkshire, UK
My Astro and DIY projects website: http://yesyes.info/

Paul__B

#3
Nov 28, 2015, 09:53 pm Last Edit: Nov 28, 2015, 09:54 pm by Paul__B





So you are making a "poor man's H-bridge" then.  Does the same job, with 25% efficiency. :smiley-lol:

OK, in that circuit, the relay coil only ever sees two thirds of the supply voltage, so if you operate from a 5 V supply, the relay must operate reliably from 3 V.  If the relay is in fact, specified for 5 V, then you need to supply the circuit with at least 8 V, or 12 if that is what is powering your Arduino.

Now as long as the transistors are specified for at least twice the supply voltage (and 500 mA), the diodes are in fact, quite unnecessary as the 47 Ohm resistors perform their job.  (The third circuit is wrong in any case. :smiley-eek: )

The base resistors should be 1 k.

Also, the common advice that the diodes should be "as close as possible to the coil" represents a complete misunderstanding of their purpose.

yesyes

How would you do it? I'm open to any suggestions on how to approach this in a better way...
Chris

Location: Berkshire, UK
My Astro and DIY projects website: http://yesyes.info/

Paul__B

You can do it that way given the constraints I explained - you need to use 60% more supply voltage than that required to operate the coil.  The inefficiency will not matter greatly because you are only using brief pulses to switch the relay.

I gather that this will in fact be mains operated, and that your concern is the "memory" of the relay rather than power efficiency.

The alternative is to use an H-bridge.  If in fact, your relay is 120 Ohms and operates at 5 V, then it will require about 42 mA; there should be some CMOS logic devices capable of driving this current, possibly using a number of gates in parallel.  (Note you can parallel gates in an array, but not Arduino pins.)  Any logic device output is already half of an H-bridge; it is only a matter of the current you require it to drive.

yesyes

#6
Nov 29, 2015, 12:57 pm Last Edit: Nov 29, 2015, 01:01 pm by yesyes
Thanks Paul. I haven't quite decided on a particular relay model yet. It just looks like the single coil versions are a bit cheaper than the 2-coil ones I'm using now. The one model I'm looking at has a coil resistance of 42 Ohms and is rated for 5V.

This is part of a controller for RGB and white LED strips that has 12V power supply. The relay switches power to the strip on and off on the +12V side, MOSFETs on the GND side PWM the individual colours. The relay works together with a normal SPDT wall switch so both the switch or the relay can be used to switch the LEDs on or off regardless of what position the other one is in. By using a bistable relay I'm avoiding the relay changing position in case of power failure, which could cause the lights to be switched on unnecessarily when power comes back (and noone is home, for example).

Full circuit diagram and a photo of the first assembled controller attached.

Since the controller has a 12V power supply, it shouldn't be a problem to supply more than 5V to the relay circuit. But I'm beginning to wonder if it is worth the hassle changing the circuit to accommodate the single coil relay to save less than £1 per controller.
Chris

Location: Berkshire, UK
My Astro and DIY projects website: http://yesyes.info/

yesyes

#7
Nov 29, 2015, 01:02 pm Last Edit: Nov 29, 2015, 01:08 pm by yesyes
hmmmm, there was an issue uploading the photo. trying again...
Chris

Location: Berkshire, UK
My Astro and DIY projects website: http://yesyes.info/

Paul__B

#8
Nov 29, 2015, 01:22 pm Last Edit: Nov 29, 2015, 01:23 pm by Paul__B


Actually, I would call your concept, bad design.

If you want the default to off, you use the (ordinary, normally off) relay alone to control the lights, and use your wall switch (or better yet, a push button) to control the Arduino in addition to your remote control.  When it powers up, it first reads the wall switch and considers that position "off".

If you really want the relay to "remember" its position, you just use the EEPROM in the Arduino.  That's what it is there for.

And if switching mains, use a SSR.

yesyes

I have designed it this way so that I can still switch the white LED strip on and off using the wall switch even if the Arduino has failed for some reason.
Chris

Location: Berkshire, UK
My Astro and DIY projects website: http://yesyes.info/

ian332isport

I use a similar circuit to your original, but use a couple of channels of a Darlington array (ULN2003) to drive the relay coil. See attached.

It's a bit of a waste if you're only using two channels of the ULN2003, but it works very will. I use the Arduino to pulse (for approx 10ms) pin 1 or 2 depending on the direction required. I'm using the spare channels of the ULN2003 for other duties, but I simplified the diagram to keep it clear.

Cheers,

Ian.

yesyes

Thanks. That looks simple enough.
I see you use 5V. Does the relay have a 5V or 3.3V coil?
Chris

Location: Berkshire, UK
My Astro and DIY projects website: http://yesyes.info/

ian332isport

I see you use 5V. Does the relay have a 5V or 3.3V coil?
I've used it with 5v & 4.5V relay coils. Not tried with 3.3v versions, but can't see it being an issue, as long as you drop the voltage to suit. I believe the ULN2003 will switch quite happily with 3.3v logic as well.

Cheers,

Ian.

yesyes

I meant these 47 Ohm resistors. As Paul has pointed out, these resistors will drop some of the voltage. It doesn't seem to be a problem with your relays.
Chris

Location: Berkshire, UK
My Astro and DIY projects website: http://yesyes.info/

ian332isport

Yes, there is obviously some drop from the resistors, but not enough to cause problems. Certainly not with the small Omron relays I'm using. I initially used the 5v coil version, and later moved to the 4.5v version. This was only due to product availability though, and not to cure any problems.

Ian.

Go Up