74HC595 to run latching relay?

Hi All,

I have a tiny latching valve that I want to run with a Stamp. Can I use a

74HC595 shift register to do this? I would be withing the source/sink current limitations. If I do so, do I need to implement EMF spike diodes for the coil, and if so, how do I do it, considering I have to reverse the polarity to actuate the device?

Thanks

Jonathan Peakall

--

formatting link

Reply to
Jonathan Peakall
Loading thread data ...

Yes, I've done as much before (if I understand your "latching valve" as meaning something driven similar to a "latching relay.") In fact, it was using latching COTO relays.

Is this a three terminal coil? The COTO arrangement I've used before (latching each way) uses a center tap which is wired to ground or Vcc and then you either drive one side or the other side to effect the latching behavior. Is this the arrangement? Or do you have a data sheet or other description?

Jon

Reply to
Jonathan Kirwan

Jon,

No data sheet. But the valve has 2 pins, and reversing the polarity changes the valve state. So I can't use the usual spike diodes, as they would prevent changing states in one diredtion or the other, depending on which way they were pointed. Will the '595 prevent spikes from whacking the Stamp?

Many thanks,

Jonathan

formatting link

Reply to
Jonathan Peakall

Okay. So you use a pair of outputs for each coil?

Okay. It will probably work out. But if you disable the outputs during the unpowered times, using the /OE pin, there may be a problem since that energy needs to be dumped.

I imagine you are setting this up with two of the '595 outputs per valve. I think it will work okay, something like this:

Both outputs, 1 and 2, are HI. Relay is not energized but is in STATE A. You want to switch to STATE B, so set output 2 LO for the required period of time. Then set output 1 to LO to complete the operation. You are now in STATE B, not energized. You want to switch to STATE A, again, so set output 2 to HI for the required period of time. The set output 1 to HI to complete the operation. Something like that?

I don't know if the '595 has protection diodes on the outputs. Might not, can't say. I'll If you want, you can add an RC snubber across the coil, I suppose. Or you can add some diodes externally:

Vcc | --- / \ --- | OUT 1 >---+----, | | --- | / \ | --- 3| | 3| gnd 3| 3| Vcc | | | --- | / \ | --- | | | OUT 2 >---+----' | --- / \ --- | gnd

This should provide a return path and not interfere with your energizing of the coil.

Those are my hobbyist thoughts. I'm not an electrical engineer, though. So keep that in mind.

Jon

Reply to
Jonathan Kirwan

Jon,

The valve only requires a brief pulse to change it's state, like 200mS or something. It has 2 leads, and switching the polarity changes the state of the valve. So, if OUT1 is high, and OUT2 is low for >200mS, it will open the valve. Then both pins can be set to float until it is desired to close the valve, at which time OUT1 is low and OUT2 is high for > 200mS.

Hope that made sense. I guess I'll have to just try it and see. I still worry about the EMF spikes, but I dont see how I can guard against them.

Thanks for the help!

Jonathan

formatting link

Reply to
Jonathan Peakall

I already figured as much. Did you read the above that I said??

I understood that much, too.

It's the floating part of it that I'd avoid here. What's wrong with keeping the /OE in the enabled condition and latching both ends of the coil HI or else LO in order to de-energize?

The diode protections I mentioned should in conjunction with keeping the outputs active, I believe, provide the necessary path for the coil to collapse its field.

Did you misunderstand that before?

Jon

Reply to
Jonathan Kirwan

Because the '595s are cheap, and I have some, they draw very little current and low component count. I only need a 50mA pulse.

Jonathan

formatting link

Reply to
Jonathan Peakall

Johnathan, Good point, I suppose. I have used shift registers in "johnson counter" configurations to drive small steppers, so I can relate. Anyways, your question about inductive kickback... the inductive kickback would likely be an ac source, so a capacitor would be a good way to route the current towards ground.

More complex (or less complex, depending on how you look at it) would be to use another coil. The characteristic of a coil is to resist large changes in current (used as a choke.)

BTW, have you either measured or tried to calculate what the inductive kickback could potentially be?

Scott

Reply to
Scott McDonnell

Scott,

No I haven't calculated it. For one thing I don't know how ;-)

But, I am going to hook a scope up and try it, so I should be able to see what the actual spike situation is. I hope it's OK, I don't want to get too complicated.

Jonathan

formatting link

source/sink

Reply to
Jonathan Peakall

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.