Electronics > Microcontrollers

Driving latching relay with attiny85

(1/5) > >>

dadler:
Hi all-

I am working on a circuit similar to this:



However, I am concerned about inductive transients when the (single coil latching) relay current pulse abruptly stops.

I guess an H-bridge or equivalent, or something like a ULN2003 would certainly work, but seems like overkill for this application. Trying to keep the parts count/cost minimal. I also considered back to back zeners, but I don't think this will actually protect the inputs.

I contacted the designer of the above circuit, and he claims transient protection is not necessary (didn't give a reason).  I thought maybe he was doing something clever in software, just a guess.

Here is the datasheet for the relay I am using: EA2-5SNJ (single coil latching) http://www.mouser.com/ds/2/283/ea2-1419.pdf

Any input would help--I am a beginner.

JoeN:
So you are using pins 6 & 7 basically as an H-bridge, setting one high and the other low and reversing the polarity to drive this relay?  And it works right now? - as in there is enough current and you are not exceeding the ICs current sourcing/sinking specs?  Well, if so that's great.  The one thing is that I have never heard of anyone recommending driving any inductive load off an Atmel microcontroller or any microcontroller that isn't also a motor driver IC (Freescale does some of these) without protection.  I found this and it seems it is the industry standard protection circuit for an H-bridge.  It requires 4 diodes rather than one, but otherwise works in the same fashion.

This is showing a 74LS244 doing the driving but you just substitute your pin 6 for the junction of pin 12 and 14 and pin 7 for the junction of 16 and 18 on that GIF.  This all assuming that your microcontroller's pins are not being overdriven right now.


bktemp:
It is hard to say if driving an inductive load is within specs or not, but it works. I have done simillar things multiple times without problems. But I would not use it on a product where a failling microcontroller can have expensive results.
Since an AVR is CMOS, it has internal protection diodes on all pins. But the datasheet does not give a maximum current rating for those.
One solution might be using only low and high instead of tristate. To remove power from the coil instead of switching the outputs to tristate, simply drive both pins low. This shorts both coil pins together and gives the stored energy a path to discharge without generating any spikes.

linux-works:
one of the products I designed uses latching relays (for an audio attenuator).

http://www.amb.org/audio/delta1/

schematic and even code is available (arduino) - maybe that will give you some hints.

JoeN:

--- Quote from: linux-works on February 04, 2015, 06:33:58 am ---one of the products I designed uses latching relays (for an audio attenuator).

http://www.amb.org/audio/delta1/

schematic and even code is available (arduino) - maybe that will give you some hints.

--- End quote ---
That circuit uses ULN2003s, which I think is the way to go personally, but the original poster specifically said:


--- Quote from: dadler on February 01, 2015, 11:04:14 pm ---I guess an H-bridge or equivalent, or something like a ULN2003 would certainly work, but seems like overkill for this application.

--- End quote ---
I think he doesn't want to use a 7 channel IC just for one channel for aesthetic reasons.  Those ICs are certainly cheap enough these days.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod