How to control 250 relays?

Hey Everyone

I have a question about my project and I’ll really appreciate any help you can give,

I’m going to programming a software in order to automatically open up 250 doors with FINGERPRINT SCANNER, I mean I’ve 250 members in a gym and I want to recognize any of them by their fingerprint and then open their related door wardrobe.
So the question is, I don’t know after verifying any individual person and understanding the related door, how can I command to the doors to open?
Let me clarify the sentence, Arduino have 16 pins as output and I’ve 250 doors to control.
I know it’s completely ridiculous to dedicate 250 pins to 250 doors but I don’t know how to overcome this problem and reduce the pins number!

Thank you in advance for your attention to this matter.

Many thanks
Abolfazl

You will need shift registers or multiplexing chips.

For example, using 4 MAX219 chips will let you address all 250 doors individually, and send a signal that can signal a relay/solenoid/transistor/whatever (separately powered themselves).

There are probably many different chips you can use, that's just the one I'm most familiar with.

@AbolfazlNejatian, do not hijack. Errant post removed.

@AbolfazlNejatian, do not cross-post. Other two threads removed.

For the relays: Port expanders.
There is a whole range to choose from.

e.g. the TPIC6B595 can directly switch eight relays/solenoids (<=150mA), and can be daisy-chained.
Only three wires for a whole bunch of them.
Even a Nano should be able to control 250 relays easily.
Leo…

Hey Everyone

I have a question about my project and I’ll really appreciate any help you can give,
I’m going to programming a software in order to automatically open up 250 doors with FINGERPRINT SCANNER, I mean I’ve 250 members in a gym and I want to recognize any of them by their fingerprint and then open their related door wardrobe.
So the question is, I don’t know after verifying any individual person and understanding the related door, how can I command to the doors to open?
Let me clarify the sentence, Arduino have 16 pins as output and I’ve 250 doors to control.
I know it’s completely ridiculous to dedicate 250 pins to 250 doors but I don’t know how to overcome to this problem and reduce the pins number!

Thank you in advance for your attention to this matter.

Many thanks
Abolfazl

What are the lock mechanisms?
If they’re just simple solenoids, then you could look at an off the shelf MOSFET driver and shift registers to pop individual solenoids.

But keep in mind the distance between the nodes, as the shift clock & data lines will need to be buffered, and probably have some noise rejection added.

Power supply sizing will also need to consider how many locks. will be driven at any given moment.

Have you thought about I2C Port Expanders? According to http://playground.arduino.cc/Code/I2CPortExpander8574

-The PCA9698 from Phillips has 40 bits of digital I/O, can be addressed at 64 different addresses, is extremely powerful, but is a $4.00 56-pin surface-mount part.

That IC has 64 addresses, so up to 64 Chips can be used. Each chip can control up to 40 digital Pins. You only would 6 Chips for 240 doors or 7 for up to 280 doors. That should be reasonable.

I've never worked with the Fingerprint sensors. How much Memory do they Need to store one print? Are you planning on storing the prints on a SD Card and reading through the SD in some sort of Loop?

In general, this problem is called "multiplexing".

The way I'd do it is either to drive some shift registers, or to have slave arduinos manage blocks of doors and to communicate with them from a master - I2C, or even ethernet.

I wonder if the neopixel chip might be a live option? Each chip has an R, G, and B output (0-255), and you can chain any number of them.

I recall seeing dedicated "demultiplexing" chips. 16 Channel Multiplexer - COM-00299 - SparkFun Electronics But the poit of those is that they will acommodate way more than single bits of information, which is all you need.

A problem might be the distance between the controller and the doors. I2C probably won't work well (or at all) over those kinds of distances. This is one benefit of ethernet - it will manage cable runs of several meters, and you can easily daisy-chain ethernet switches. No need for a router and all the config that that involves.

Another interesting option might be MIDI. There's a lot of off-the-shelf gear that you can just plug together.

Either you will have to do some electronics, or you'll be getting one arduino per 10 or so doors and have one pin per door.


So, I suggest 2 options.

1 - several arduinos with ethernet shields, each managing a block of doors, networked together. This option allows you to blug the doors into the rest of your network and - for instance - write webapps for the person at the front desk.

2 - 1 shift register per block of doors, daisy chained. each register will require power, ground, data and clock. You will also probably need to switch 12v to drive the locks.

I built a set of these for running some steppers and 12v downlights. Each board has a dhift register and a solenoid driver, and the input pins are configured to permit them to be daisy-chained.

@AbolfazlNejatian, stop cross-posting. Last warning.

Threads merged.

Unless all his 250 doors are within a 1-metre radius, i think we can discount I32C as the primary comms layer.

I’d be thinking (ethernet as above, or) low-speed buffered SPI style of comms, or Rs485 out to individual control nodes (e.g. each handles a number of solenoid drivers)… but we haven’t heard back from OP yet about the first questions, so this unlikely to go anywhere!