View Full Version : BASIC Stamp AND Solenoid

02-09-2007, 11:08 AM
I would like to know whether·a solenoid can directly interface with the·BS2px-IC BASIC Stamp. Thanks in advance.

Mike Green
02-09-2007, 11:11 AM
Read "What's a Microcontroller?" (downloadable from the Parallax website). It shows you how to connect a solenoid to any Stamp.

Professor Chaos
02-09-2007, 01:51 PM
Check out www.parallax.com/dl/docs/cols/nv/vol1/col/nv6.pdf (http://www.parallax.com/dl/docs/cols/nv/vol1/col/nv6.pdf)

It describes how to interface high current inductive loads to a Stamp.

02-09-2007, 09:27 PM
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.

Loopy Byteloose
02-09-2007, 09:33 PM
Use a darlington transtor or a MOSfet with a protective diode inside the same package. It is best to add a current limiting resistor from the BasicStamp to the control device [about 250 [for transistor] to 1000 ohms [for MOSfet]]. That protect the BasicStamp and the MOSfet from failure.

Some of the MOSfets will allow the BasicStamp to control much higher DC voltages and currents [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 [·黃鶴 ]·in Taiwan

02-10-2007, 01:55 AM
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 .

Mike Green
02-10-2007, 02:13 AM
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.

Chris Savage
02-10-2007, 03:40 AM
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

02-10-2007, 07:05 PM
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...

They also do an AC version..

······ Quattro