Would this work?

Hi,

would it work to use the mega for accurately reading 16 differential pressure sensors and each switching at a certain value autonomously 1 of 16 relays on 2 relay shields like this?
http://www.ebay.de/itm/5V-8-Channel-Relay-Shield-for-Arduino-UNO-2560-1280-ARM-PIC-AVR-STM32-A049-/261016679695?pt=LH_DefaultDomain_0&hash=item3cc5ce750f

possibly all relays are switched at the same time, use of external power

Would this be no problem or r strong interferences or something like that to be expected?

It would not be a problem to sequentially read the registers and perform an action up a related output pin, either right after the reading, or after gathering the data from all 16, and using direct port manipulation to change the 16 outputs as 2 groups of 8
Would seem to be simultaneous, just tens of nanoseconds apart, for example:
PORTC = data1;
PORTD = data2;

that sounds great, thank you.

Is the timeframe for measuring and measuring again really only 10ths of nano secs?

What i have not completly understood about the external supply: even if i give the ardu its own powersupply eg 5V with the powerjack can i then draw more then 200mA from the 5V pins of the board, like to supply all sensors? Is it there a limit like with the pins which must not exceed 40mA or 200mA together

Or is the powerjack connected to a voltage regulator which has a limit?

Not 10ths of nanosecs, but tens of nanoseconds between the 2 port writes.

You are switching between analog signals?
Internal A/D takes 13uS to take a reading, and usually need two readings to give input signal time to settle.
So, a for:next loop that reads 16 inputs into 16 variables, and then sets bits hi/lo in two bytes based on those variables, and then sets 2 output ports via port manipulation.

Probably, you don't have to use direct port manipulation, relay is slow device , 1- 10 msec, so simple digitalWrite wouldn't introduce much difference.
IMHO, better to use external power supply, firstly shield optoisolated, which is good, and secondly if 1 relay take let say 100 mA, 16 = 1.6A that is too high for arduino to handle.
What kind of sensor, analog or digital , 4-20 mA, maybe modbus or something?

So long as you wait a few ms after switching any of the relays then any interference from the switching will have died down and you can start monitoring the sensors again until the next time a relay needs switching. You also need to arrange that any one individual relay is not switched at too high a frequency (depends on the relay).

You should have some hysteresis in your threshold detection, otherwise you'll get annoying and damaging relay-chatter as the pressure passes the threshold.