Shop OBEX P1 Docs P2 Docs Learn Events
Latching Relay Goldmine — Parallax Forums

Latching Relay Goldmine

ercoerco Posts: 20,256
edited 2013-02-28 20:07 in General Discussion
Electronic Goldmine has DIP DPDT latching relays for $1.50. http://www.goldmine-elec-products.com/prodinfo.asp?number=G2011

Data sheet at http://pdf1.alldatasheet.com/datasheet-pdf/view/197272/OMRON/G6HU-2.html

They're more like $8-9 elsewhere: http://www.newark.com/jsp/search/productdetail.jsp?SKU=02H7528

These relays are latched on by a brief pulse, and latched off by another brief pulse. So your motor or external circuit remains on, even though there is no power being consumed by the relay to keep it on. Very economical on power consumption, latching relays like these are used in battery powered applications for long life. That's how your heater thermostat works for a whole year on 2 AA batteries.

The only tricky aspect is that you need two I/O pins to control the relay, but you can multiplex them easily. Worst case, for N relays, you need N-1 I/O pins, or you can do binary pin combinations and use fewer.

from http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=15391&start=0 :

You are right the relay is set by + on Pin1 and - on Pin 10, and vice versa for reset.

Comments

  • localrogerlocalroger Posts: 3,451
    edited 2011-07-01 15:13
    Wow, and they work directly from 3v3.
  • xanatosxanatos Posts: 1,120
    edited 2011-07-01 15:27
    Thanks for this tip - just ordered 10!
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-07-01 16:53
    localroger wrote: »
    Wow, and they work directly from 3v3.

    But not the ones erco linked to. Right? I read in the datasheet "Must operate voltage" equals "75% max. of rated voltage." 75% of 5V is 3.75V.

    You'd need to buy the ones 3sam linked to to use with 3.3V.

    So could a Prop drive the 3V version directly? The datasheet says "Rated current | 33.3mA." A Prop should be able to handle 33.3mA. So if I add a diode across the coils it should be okay?

    I think I'll get some of the 5V since the price is so good.

    I've used these type of relays before. Two of the ten pins are not connected. I have a bunch of eight pin sockets so I just left the nc pins hang over the side. I think I had to modify the socket a little; the relay's body is wider than a normal IC. I'm using these in my sprinkler controller.

    Thanks for the tip erco.

    Duane
  • ercoerco Posts: 20,256
    edited 2011-07-01 18:28
    Heck, I checked and I already got 10 of these with my last goldmine order when they were on sale for $1. I didn't even realize then that they were latching!

    I got distracted when I posted and I forgot to include the specs. At 5V, they only draw 20 mA, so you could run them directly and continuously, even though you don't use them that way. Blip them for 100 ms and that's plenty. And the switched contacts are rated for 1 amp. Sweet...

    AFA 3.3 V operation, that "must operate at 75% voltage" spec is probably conservative. I have lots of my favorite Aromat 5V DIP relays, which are designed to operate off operate off 20 mA, 270 ohm coil. MOST of them operate reliably directly from a Stamp Homework board, which is 5V with inline series 220 ohm resistors. So they are operating off of just over 2.7 V. I bet most of these $1.50 relays would trigger off 3.3V, even if you had to hand pick them.

    My Aromat relays have built-in flyback diodes, but those are not latching relays like these Omrons. The only thing left to determine is whether flyback dodes are necessary or can even be used on these Omrons. Since you apparently reverse polarity to the same two pins to switch the relay, traditional flyback diodes in parallel with the coil would short out in one direction.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-07-01 18:44
    erco wrote: »
    The only thing left to determine is whether flyback diodes are necessary or can even be used on these Omrons. Since you apparently reverse polarity to the same two pins to switch the relay, traditional flyback diodes in parallel with the coil would short out in one direction.

    I think you need the flyback diodes with these.

    You want to use two diodes per relay. Each coil pin should be connected to the anode of its own diode. The cathodes of the diodes are both connected to Vdd. I think this is the way I hooked up my latching relays. Whatever I did, it worked. I'll take a look at the board an make sure. But the method I described make sense in my mind.

    Duane
  • ercoerco Posts: 20,256
    edited 2011-07-01 18:49
    At a quick glance, without any extra hardware, I think you can drive 3 relays with 3 pins;
    6 relays on 4 pins;
    10 relays on 5 pins, etc.

    For instance for 5 pins, there are 4+3+2+1 unique combinations. A simple BS1 with 8 pins could switch 28 relays!

    This is essentially using the relay's latching feature as external "memory".
  • ercoerco Posts: 20,256
    edited 2011-07-01 23:39
    Just tested the dozen relays I have. You 3.3V users will be happy to hear that 100% of my 5-volt relays triggered (latched and unlatched) on just 3.14 volts... two AA alkaline cells. So the Prop and any other 3.3V circuit should work fine.
  • ercoerco Posts: 20,256
    edited 2011-08-08 23:38
  • ercoerco Posts: 20,256
    edited 2013-02-28 20:07
    Sold out! Glad I stocked up previously. I still need to make a BS1 control 28 relays directly. And with impunity.
  • ercoerco Posts: 20,256
    At $19 each, I should dig my 99-cent latching relays out of storage and sell them. 1800% markup ain't bad, about the same as Radio Shack's margins on $8 watch batteries.

    https://www.amazon.com/OMRON-ELECTRONIC-COMPONENTS-G6HU-2-DC5-SIGNAL/dp/B011NKJQ1Y
  • ercoerco Posts: 20,256
    Appears to be a $2 toggling relay, either push the button or send a signal. I ordered one, will advise upon receipt.

    http://www.ebay.com/itm/1-Channel-5V-Latching-Relay-Module-with-Touch-Bistable-Switch-/282405746030

    s-l1600.jpg
  • jmgjmg Posts: 15,173
    erco wrote: »
    Just tested the dozen relays I have. You 3.3V users will be happy to hear that 100% of my 5-volt relays triggered (latched and unlatched) on just 3.14 volts... two AA alkaline cells. So the Prop and any other 3.3V circuit should work fine.
    Was that tested via a Prop port pin, or 3.14v at the relay leads ?
    Did you try that with both the Relay and Prop warmed up ?


  • ercoerco Posts: 20,256
    IIRC only tested coil direct to 2x AA cells, so Prop pin impedance could be a factor. But I did test some 5V reed relays directly from a Prop pin:

  • I have had luck with some OPTO modules that are iffy at 3v3 driving them by pulling them DOWN from 5V instead of driving them from the pin against ground. With the pin open or high, the 1.7V difference between 5V and 3v3 isn't enough to drive the module, but when you pull it low you put 5V on the module and it operates. Note: This may have worked for me because these were solid state, and below a certain voltage threshold they don't conduct at all. If the mechanical relay coil resistance is too low the "leakage" current might damage the prop pin clamping diodes, which can't carry much current.
Sign In or Register to comment.