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?
On Mon, 4 Aug 2003 10:30:16 -0700, "Jonathan Peakall"
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?
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?
On Mon, 4 Aug 2003 11:16:07 -0700, "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
OUT 1 >---+----,
/ \ |
/ \ |
OUT 2 >---+----'
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.
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!
On Mon, 4 Aug 2003 13:04:37 -0700, "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?
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?
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
Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here.
All logos and trade names are the property of their respective owners.