I'm trying to use an Arduino to release a single drop of water using a solenoid valve.  This article describes how to create this circuit with a Raspberry Pi using a DC powered solenoid that opens and closes very quickly and they use this for photographing water drops. Exactly what I need, if I could only get it to work with the starter kit items first.

The design for the solenoid circuit from that site looks like:

Solenoid actuating circuit diagram

I don't have a solenoid yet, but I've been experimenting with the cheap motor that comes with the Arduino and a 9 V battery.  I've burned out several transistors in my attempts to get this working.  My schematic looks like:

Motor actuating circuit with Arduino

Relays won't work.  They are too slow.  Also, I need to use an external battery.  I can't use the power from the Arduino because I will eventually be moving up to a 12 V battery and the Arduino won't be able to handle that.

  • A motor is a quite different load than a solenoid. Before it starts rotating it takes a lot of current. A solenoid has no inrush current when you apply power.
    – Wirewrap
    Jan 9, 2016 at 11:26
  • Are you sure about the inrush current? Seems to me there would be.
    – dlu
    Jan 10, 2016 at 2:03

3 Answers 3


Seeing as you want to use a 12V battery, you should try an external motor controller. You would essentially connect the Arduino to the controller, then the external battery and motor to the controller. Dimension Engineering makes several high quality motor controllers that are compatible with Arduino and can handle the voltage (like this controller). The site also includes Arduino libraries, documentation, and all the specifications on every product. I have used several of their products with my Arduino Uno and have had no problems.


I can think of a couple of things that you might consider.

The motor looks like a good surrogate for the solenoid.

If you're burning out transistors, look at the following 3 most probable causes:

a) Voltage spike when you cut the current to the coil (motor or solenoid). If the fly-back diode is still intact, this should not be your case.

b) Current spike exceeding Icmax. This is the maximum current your BJT can sustain without damage. An inductor like your solenoid or motor will reach in DC a maximum value dictated by Ohm's law. So measure the motor's resistance with a multimeter and calculate the Imax. It should be Imax = (VDC - Vcesat)/Rcoil, where Vcesat is the saturation voltage of your BJT, somewhere around 0.3V. Measuring the current of the motor connected to the battery also works if you measure it while you block the rotor. Check that your transistor can handle the current. Small signal transistors usually are rated at around 150mA, so this might be too little for your coil. So maybe you would need to buy/build a Darlington transistor that will have the amplification factor and current capacity to handle the load.

c) If a and b are OK, then maybe the transistor is overheating? Your fingers will tell you :-)

Once this works with the motor, you might need to recalculate to accommodate the (eventual) higher current of the solenoid.


You will also need a ceramic capacitor connecting the wires of the motor. also the diode should be at least 1amp and the transistor have the specs to take the loadd.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.