How to control 125 solenoids with Arduino UNO R3

Hello!

I would like to control 125 solenoids with Arduino. As we well know there are not enough connections in Arduino board for 125 solenoids but something must be putted between the Arduino board and the 125 solenoids but as a total newbie I have not too much experience of such complex connection. Please tell me how to exactly make such a connection. I am really thankful if somebody draws an image for me how to connect them.

Look into controlling LEDs with shift registers. Pretty much the same electricly except each solenoid will need a diode to absorb reverse voltage spike. Trasistor switch for each solenoid as well if they draw more than about 20mA each. Need all specs of solenoid to design a driver. You will certianly need an external power supply with enough power to actuate how many ever solenoids that are active at one time.

You could simply use enough shift registers to provide 125 outputs (and transistors etc) to provide a separate independent output per solenoid. If you don't need to have every possible combination of solenoids activated simultaneously there are ways to multiplex then with a much smaller number of outputs. In the simplest case where you only need to operate one solenoid at a time, you could get it down to 24 outputs. If you're able to charlieplex the solenoids I think you could get it down to about half that.

You could use latching multiplex chips. The below is for a parallel port, but the same type thing probably could be done with an arduino.

http://computerchristmas.com/christmas/link-how_to/HowToId-4/How_To_Build_A_Parallel_Port_Controller_Box

RaiRaiRai:
Hello!

I would like to control 125 solenoids with Arduino. As we well know there are not enough connections in Arduino board for 125 solenoids but something must be putted between the Arduino board and the 125 solenoids but as a total newbie I have not too much experience of such complex connection. Please tell me how to exactly make such a connection. I am really thankful if somebody draws an image for me how to connect them.

Have you thought about self latching double acting solenoids like these?

You'll have 250 coils but you can activate them sequentially with no need for a holding current. I suggest using 74HCT4067 16 chanel multiplexer/demultiplexers.
16 of them to select which solenoid coil and another one to select which of the other 16 is enabled. This will use 8 pins on your arduino for addressing, one for enable and one for the signal to activate the selected solenoid.

Many thanks for quick replies. I found this from ebay:

http://www.ebay.com/itm/10-x-Shift-registers-8-BIT-74HC595-Add-Arduino-Pins-/171057785683?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item27d3d6ab53

Do you know any components which might suit better? Are there proper electrical components which has more pins? If I use these I need to put quite many of them.

I need to study your replies carefully they are good solutions!

Can you post a link to the specification of the solenoids you want to drive? Also, if you arrange them into groups of 8, can you give an upper limit on how many of the 8 might need to be energized at the same time? This affects the best way of driving them. Possibilities include:

  1. TPIC6B595 shift registers driving the solenoids directly. Only feasible if the solenoid current is low (< 100mA) and/or the maximum number energized in each group of 8 is low.

  2. 74HC595 shift registers driving transistors (if the solenoid current is no more than about 500mA) or mosfets (for larger currents).

Either way, you will also need flyback diodes. If you need to achieve a fast release time, you may also need resistors in series with the flyback diodes.

Thanks DC 42 for your comments. I am going to make the solenoids by myself. I know I could get better things from the store but this is a hobby for me.

I think I need to use mosfets because the current may be more than 500 mA. Please tell me exactly what kind of mosfets these parts should be?

I found a type of this but its very expensive:

And also type like this which is much more suitable by its price:

http://www.ebay.com/itm/10pcs-Package-DIP-14-74HC164N-Shift-Register-High-Quality-/190773414400?pt=LH_DefaultDomain_0&hash=item2c6afb4a00

Neither of those parts you linked to in reply #7 are suitable, however the 74HC595 you linked to in reply #5 can be used to drive the mosfets.

As for the type of mosfet, the most economical mosfets are surface mount types such as AO3400 which you can also get from eBay. As they are surface mount, you would need to use them with a printed circuit board. If you want to use non-surface mount mosfets for easier soldering, then they don't come much cheaper than this one http://www.digikey.com/product-search/en?x=-1315&y=-71&lang=en&site=us&KeyWords=irlu8726.

You will need a big power supply (e.g. 125 solenoids @ 0.5A = 62.5A total), and be very careful with the ground layout. A PC ATX power supply will probably be cheapest. It's probably better to wind your solenoids for 12V than for 5V so that they don't need so much current. I suggest you start by experimenting with solenoids to find a voltage/current/number-of-turns combination that works. Then you can scale the wire diameter and number of turns to adjust the design for the voltage you decide to use. Bear in mind that a 12V solenoid taking 0.5A will dissipate 6W, so there may be a lot of heat to get rid of

You will need 16 shift registers to get 125 (actually 128) outputs. Rather than connect all the shift registers in a single chain, I suggest you use several separate chains, for example 4 chains of 4 shift registers each. This will be less sensitive to ground noise and easier to get working.

The 74xx595 parts are better for this than the 74xx164 because with the 164 the outputs change while clocking in new data whereas the 595 has seperate registers for shift register and output. the 595 oputputs retain ther value as the data is shifted and once the clocking is finished there is a latch signal that transfers shift register data to the output latches.

Hello again!

I have been trying to design a circuit according to tutorials in the internet. However I am not an expert of the field but more like an artist so this is all very new to me.

So please check the following connection table and if possible please explain what connections to change in order to achieve a safe circuit system.

There must be some wrong connections but this is exactly the reason why I am asking help from the experts... :slight_smile:

...and here is the original Frizing file of the connections...

Danger Zone 3.fzz (47.9 KB)

Your external power supply ground should connect with Arduino ground. There should be 1K resistors between the 74595 outputs and the transistor bases. The plus side of the solenoids should be connected to v+, minus side of solenoid to transistor collector (transistors NPN type and assuming that no series current limit resistor required). Transistor emitters to ground. check out how a breadboard connections are laid out. You have a lot of wires going nowhere (external supply plus and ground to transistors. You do have the idea on how to use the shift registers just need to sort out details.

Also, the anodes of your flyback diodes are not connected to anything. Each 74HC595 needs a 0.1uF decoupling capacitor between its Vcc and ground pins. You will also need decoupling capacitors on the solenoid power rails.

Hi,

Did it work ? I have the same problem/need