[dorkbotpdx-blabber] where to get and learn about solenoids

Paul Stoffregen paul at pjrc.com
Wed Dec 3 12:33:30 EST 2008


When you switch a solenoid with a transistor, ALWAYS make sure you have 
a clamping diode connected in parallel with the solenoid.  The cathode 
(side with the stripe or other marking) goes to the positive side and 
the anode goes to the negative side.  Schottky or "fast" diodes are best.

If you forget the diode, the solenoid makes a high voltage spike that 
will usually destroy the transistor and maybe your microcontroller too.

Many solenoids are designed for AC voltage (usually 24 volts), but you 
can drive them with DC if you use a lower voltage (usually 1/2 or less 
of the rated AC voltage).  If the coil gets scorching hot, that's a 
pretty good sign you need to lower the voltage.  If you experiment with 
a variable power supply to find the minimum necessary voltage, be sure 
to do it with the mechanical load connected.

If you use an optoisolator to switch AC (triac output), unless you 
really know what you're doing, it's much easier if you get one that has 
a "zero crossing" feature.




More information about the dorkbotpdx-blabber mailing list