Advice working with solenoids

hallo there, i'm totally new to the arduino environment, and I need advice on a piece which i want to incorporate the arduino. I am going to work with solenoids and after reading whatever i can find about solenoids, i'm ready to take up the challenage. I will be getting parts as in . I would like to work with a maximal of 16 solenoids and i am using a ATmega 8 board. I see 0-13 /14 digital ports. Can i hook up all 16 solenoids to this board? Is there other ways of doing this?

Basically i want a solenoid to be attach to a 140 cm long shaft to strike at the end. I know that this is rather long and i need advice on the impact the solenoide needs. What i choose is a 12v at 1.5W with power of 3N. Is this strong enough?

You can not hook 16 the solenoids directly op to the Arduino boards.

I think that two 595 shift registers (check the playground for how to) will give you the 16 outputs you need. But the shift registers can't handle the current the solenoids require, so you need to hook the up with a large transistor or something similar. Something like a TIP120, but check the current need of your solenoids first.

You should find the datasheet for the solenoids you ar planning to use, to get all the data like how much current they draw, what voltage the need, and their duty cycle (how long can they be on before the need to be off to cool down).

One very important thing you should consider is the powersupply. You can under no circumstances power the solenoids from the Arduino board, and depending on how many of the solenoids will be on at the same time, you might need a powersupply with a very high current rating.

I'm afraid i can't answer the question about the force of the solenoids.

ok, i'll get back with the specifications.



Sure you can hook up 16 servos to the Arduino. With a simple matrix of driver transistors you could easily hook up 64, or more, provided you only need 1 (or a row) to fire at a time. It all depends upon the requirements. Let us know more about what you're doing and we will try to help.

Regards, David

hi what i want to achieve with the solenoids is to 'trigger/hit' different objects at different times, or at the same time. i don't think that i would use all 16 at one time, but could this nevertheless possible?

My configuration is at maximum 16. till i get the solenoids and try and test it, then i will make a decision.

the solenoid i ordered are EBE TDS-04C and 06A. the 04C have a 1,5W at 65 degress 100% ED, 12VDC. i guess using the P = VI, my current is at 0,125 A ? it states that it can withstand a voltage of 500 Veff, 1 min. thanks dze

1.5W is about 150ma per solenoid… You can use a TIP122 transistor to switch each one- there’s a schematic in the Playground.


do you mean tip102? the schemactics on ?

my parts have not arrive so i can't try, i hope it will arrive on monday!

There are several things being addressed in this thread.

Do pay close attention to what people have been saying about not driving the solenoids directly.

However...the good news is that if you really only need 16, and if you don't need the analog inputs of the Arduino for anything, then those pins can ALSO be used for "normal" digital output, so you don't need to do any clever multiplexing to get the "extra" outputs.

As I said before, you DO need "extra electronics" to "fix" the power issues, though.

Someone more expert than me should also, I suspect, address the issue of a diode to "suck up" the pulse of negative voltage(?) which arises when you remove power from a coil, be it solenoid or relay.... but if someone knows the answer, could they start THAT discussion in a new thread??

All you need is to strap a 400x diode backwards parallel to the solenoid coid. The stripe on the diode (cathode) should connect to the positive supply and the anode should connect to the transistor. (When using an NPN transistor).

BTW if you have an oscilloscope it is perfectly easy to see these pulses, which can be 100 volts or more. Yikes. If not dealt with they can kill your transistor or something more valuable.

yes TIP102 or TIP122 if I remeber coreectly. I drew that schematic, so whatever it says is what I meant. :)


ok thanks.

thanks for the note. i'm still a beginner with electronics, though understand schmectics isn't a big problem, but it might take some time.

i will try to find someone with an oscilloscope to test the ciruits.

according to what Daniel2 wrote in playground, i just need a tip102, a 1k resistor and a 1N4004 for my 12vdc 1.5W solenoid. 400v diode? you mean the 1n4004?

i will start with one solenoid first when my parts arrive. then i will get back with more details and questions.

what could be a good arduino sketch to try these out?


you can just use the blink sketch, and hook the free end of the 1K to pin 13. A 1N4001 diode will work fine also.


Hallo there,

the electronics finally arrived! I've tried the schmatics on the playground and it works! So far i've tried with just the arduino and the circuit.

question is, do i need extra power to power up all 16 solenoids? or can i use the 9v on arduino? of course, I'm will be make 16 of the same circuit with transitor, resistor, diode and solenoid but with the same power 9v from arduino. is this possible? if not how should i go about?

best dnz