multiple switch sensing

Hello everyone. I would like to hear any ideas for a project I am designing. It consists of having multiple sensor switches, say 20 to 30, which irrelevant of their initial state I would like an Arduino to count how many of the switches change state in a pre-determined set time frame, say in 2 or 3 seconds. At the end of this time frame if there are say more than 2 switches that have changed state I would need to trigger an output that drives a relay with Arduino. Once the time frame is over the cycle repeats again - that is, takes note of all the inputs and in those 2 or 3 seconds time frame checks again how many sensor switches have changed their state. Any ideas would be most welcome

lsellul:
Hello everyone. I would like to hear any ideas for a project I am designing.

What's the goal?

What's your level of electronics/programming experience?

lsellul:
multiple sensor switches, say 20 to 30

What kind of sensors? Got a datasheet/link?

lsellul:
I would like an Arduino to count how many of the switches change state

Which Arduino?

lsellul:
At the end of this time frame if there are say more than 2 switches that have changed state I would need to trigger an output that drives a relay with Arduino.

What if a switch closes and reopens during the interval, does it count? If so, does it count as one or two changes?

The goal is to determine fluid level at different levels and specific periods of time when the liquid level is going up and/or down a vertical pipe

Experienced more with designing electronic circuits than with programming - I can do this project with logic gates but was thinking that programming an Arduino Uno or Nano would be simpler

The sensing is done via corrosion/electrolysis free circuitry having outputs from op-amps or fet's and driving opto isolators in case of long lines

For my project purpose, it doesn't matter if one switch or a group of switches change their state once or more times within the interval but I still need to see a trigger if that happens

Sounds like you have the hardware handled. An UNO/NANO won't have enough I/O so you'll need to look at PISO shift registers or I/O expanders (a common one). There are libraries for these to reduce the grunt work.

You could dispense with the peripheral chips by going with a Mega, which has I/O to spare.

The code shouldn't be too complex. Basic language elements available. And then there's the wide world of C++ tutorials and other info on the web. Get your feet wet with the demos in IDE -> file/examples/digital.

Any operator interface included?

I attached two images showing I/O hookups.