HOW TO MAKE ALMOST ANYTHING, help pages, 2002
<< back to topics page
 

DRIVING SOLENOIDS
by David Merrill

Technical details:

(originally from: http://web.media.mit.edu/~dmerrill/mas863/micro.html)

To drive the solenoids, we needed more current than we could safely get from the pin of the pic. (If you look at the datasheet for any microcontroller it will tell you (in the electrical specifications section) how much current can be drawn and sunk from/by a pin) We knew that loads like solenoids (much like motors, other inductors etc..) need a fair amount of current - and that 4 or more solenoids would need a lot! So we had a situation where we needed the following:

  • To be able to use the PIC to trigger the sending of current through the load (solenoid)
  • To supply the actual current to the load (solenoid) from an external power source.
The problem could have been solved in several ways. Basically, the description of what we needed called for something like a transistor (allows/disallows current through it based on a signal voltage). We had heard of MOSFET's also - which are similar to transistors.

In the end, there was a very elegant solution. We found a solenoid driver on digikey.com (Digikey part #: DRV101T-ND) that has the following features:

  • - Can turn on/off current based on a signal voltage to one of its pins.
  • - Will PWM duty-cycle the current (basically cycle it up and down periodically rather than leaving it on continuously) after a certain duration of steady voltage, so that your solenoid doesn't burn out because of too much steady current.
Here is the datasheet for the solenoid driver that we used. It has wiring diagrams which explain how to wire it up in relation to the rest of your setup. One hint that we got was as follows:

Question:

Since we used 2 different power supplies to drive the different parts of our circuit (one for the pic/breadboard, and one to drive the solenoids), are there any rules for getting the voltages to play well with each other?

Answer:

Common ground. On the big power supply (the one providing current to the solenoids) we wired the negative and ground (earth ground) to each other, and then to the ground on our little breadboard. That way they all had the same ground as a reference point.
- Thanks to scooby for this (any many other) answers