No, a solenoid takes too much current to interface "directly". However, it doesn't take much additional circuitry. That's what the above referenced resources tell you how to do.
Some of the MOSfets will allow the BasicStamp to control much higher DC voltages and currents [noparse][[/noparse]like 100volts DC at 10 amps]. With internal protections, they are ideal for big solenoids.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"If you want more fiber, eat the package.· Not enough?· Eat the manual."········
···················· Tropical regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
Thanks for the info. I was thinking of using a relay to serve as a switching mechanism for the solenoid. The solenoid will probably operate at 5Vdc for a second or two. Any advice on what relay to use. It has to very tiny to be suitable for my application .
You need to have a relay rated for the amount of current the solenoid requires. You will likely need a protective diode for the relay as well (it protects the relay contacts from arcing). Frankly, I'd suggest using a transistor to switch the current for the solenoid. It's going to be smaller than the relay, cheaper, quieter, faster. You'll need the protective diode no matter what. The additional part you'll need is a current limiting resistor for the base current. If you use an MOSFET, all you'll need is the transistor and a protective diode.
I have found that having a Relay drive a Solenoid will often create enough noise to cause problems. If possible you should drive the solenoid directly through a transistor or MOSFET. What are the ratings for voltage and current for this solenoid? An IRL520 or IRF520 can handle substantial current and have built-in protection. Nonetheless you should put a diode in reverse bias across the solenoid to absorb any back EMF generated by the collapsing magnetic field. I hope this helps. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Chris Savage Parallax Tech Support
if the current requirement is less than 1.5amps - look for a pvdz172n - photovoltaic - small ssr of sorts - optoisolation and reverse biased diode included - in small package - just need a resistor and this .. see attachment.
I have used these for a number of years in industrial applications...
Comments
It describes how to interface high current inductive loads to a Stamp.
Some of the MOSfets will allow the BasicStamp to control much higher DC voltages and currents [noparse][[/noparse]like 100volts DC at 10 amps]. With internal protections, they are ideal for big solenoids.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"If you want more fiber, eat the package.· Not enough?· Eat the manual."········
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
I have used these for a number of years in industrial applications...
They also do an AC version..
later,
······ Quattro