Hundreds of sensors to read

Since arduino buffer is limited to few characters , what is the best way to read hundreds of sensors data ? (except by adding arduino boards) I heard about 16 bit bus... Ideally I want to read all the datas in my python program... Thanks in advance for your help.

Mats's picture

Multiplexing

You would probably want to use some type of multiplexing.

Think of it as a grid with 10 rows and 10 columns with a sensor in each cell.

Activate the first row of sensors, and read the sensor values for each column. So now you have the values for the first 10 sensors. 

Then you activate the next row of sensors, and read the sensor valules for each column to get the next 10 values. 

Repeat this for each row of sensors.

In this case you need 10 outputs to activate each row of sensors, and 10 inputs to read the values.

titi56's picture

Thank you for your reply Mats

Thank you for your reply Mats ! 

I get it !  (at least theorically) but I guess there is a time issue with the multiplexing method since each row data is read one by one... ? I want the robot to be able to analyse its environment (so all the sensors data at same time!) each 100 milliseconds.

juerg's picture

100 ms looks like a lot of

100 ms looks like a lot of time for an arduino. You will need to check on the response time of your sensors, arrange them in a way to read the fast responding and slow responding ones together maybe.

Of course reading the values is one and processing the data is another task. Tell us a bit more about the sensors you are planning to use and what needs to be done with the values read.

titi56's picture

Mux ?

Thanks for your answer Juerg ! 

I found this : http://mayhewlabs.com/products/arduino-mux-shield 

Do you think it can do the job with (let's say) 48 photoresistors running at 100 ms time ?

juerg's picture

Hi The product looks good for

Hi

The product looks good for connecting lots of sensors - yes - BUT

you should first experiment with a smaller amount of sensors (without the multiplexer) and your arduino. I use some Sharp 2Y0A21 distance sensors for my robo cart and ran into lots of issues with them - like doing multiple reads, sorting the results and take an average from the middle section of the values, adding caps etc..

Try to find out first how much time you need to read (and most probably convert) the sensor values and either how  much time you need to process the result within the Arduino of pass them off to another device.

I would only invest in larger amounts of sensors and multiplexers once I am convinced to have understood the limits of the sensors and how much time I need to process the data.

good luck - any hint what exactly you are trying to achieve and what sensors your looking at?

Juerg