Using Arudino to control 250 12v Solenoids

Interested in the community's thoughts and guidance on how to execute a large array of 12v solenoids.

Context would be a single controller box containing an array of 50 to 250 relays to open a grid of solenoids
one at a time for an adjustable amount of time.

What are the details in providing that kind of scalability?

Goddamn, that is a lot of relays!

Probably a long chain of shift registers could be used.

Hi, If I had to do this and didn’t want to do a LOT of custom wiring or printed circuit boards, I’d use all off-the-shelf widely-available stuff:

5 Arduino Megas that communicate with each other (maybe SPI or RS-485 Serial) 54 Digital pins each = 270

5 Mega Sensor Shields plugged atop the Megas so every I/o has easy-to-connect labelled pins:

and 30 optically-isolated 8-channel relay boards:

And easy-to-plug and color code cables from sections of these:

Several 5V 2A power supplies (not too much if you REALLY will activate only one relay at a time).

What are the solenoid voltage/current specifications?

How FAST will they go on-off?

It’s Hmmm… time…

I'd suggest a board that can sink current to energize lot of relays.
I offer a board with 32 N-channel MOSFETs set up to sink 1A on each simultaneously, is easily controlled from an Arduino with simple SPI.transfer() or shiftOut() commands, and is designed for daisychaining.
Here's the former thruhole version. The MOSFETs, Rs, Cs, LEDs have since been replaced with SMD parts on the current board I offer, see the 2nd picture.

MOSFETs sound like a better solution to me - and they can actually power the solenoids directly, so you can do away with the relays. Do add good flyback diodes on all your solenoids, or you'll run into all kinds of weird behaviour!

Extension boards such as the one from CrossRoads also look much easier to program than trying to have five Megas communicate with each other. Especially if you can daisychain a few of such boards.

No matter what, that's one hell of a project! What is the purpose?