Shop OBEX P1 Docs P2 Docs Learn Events
BASIC Stamp AND Solenoid — Parallax Forums

BASIC Stamp AND Solenoid

guru1guru1 Posts: 8
edited 2007-02-10 12:05 in BASIC Stamp
I would like to know whether·a solenoid can directly interface with the·BS2px-IC BASIC Stamp. Thanks in advance.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-02-09 04:11
    Read "What's a Microcontroller?" (downloadable from the Parallax website). It shows you how to connect a solenoid to any Stamp.
  • Professor ChaosProfessor Chaos Posts: 36
    edited 2007-02-09 06:51
    Check out www.parallax.com/dl/docs/cols/nv/vol1/col/nv6.pdf

    It describes how to interface high current inductive loads to a Stamp.
  • allanlane5allanlane5 Posts: 3,815
    edited 2007-02-09 14:27
    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.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2007-02-09 14:33
    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 [noparse]/noparse]about 250 [noparse][[/noparse]for transistor] to 1000 ohms [noparse][[/noparse]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 [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
  • guru1guru1 Posts: 8
    edited 2007-02-09 18:55
    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 GreenMike Green Posts: 23,101
    edited 2007-02-09 19:13
    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 SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-02-09 20:40
    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
  • QuattroRS4QuattroRS4 Posts: 916
    edited 2007-02-10 12:05
    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..

    later,
    ······ Quattro
Sign In or Register to comment.