Electrical – How to increase number of micro-controller inputs

inputmicrocontrolleroutput

I have relatively little experience with electronics, but do have a basic understanding. I am attempting to build a measuring device, which will measure 100 points in 0.1 seconds. These will all produce a digital number which will need to be stored on a micro controller.

If I were to use the raspberry pi model b, it only has 17 input GPIO pins. My question is that is there a relatively simple way of taking more inputs than the micro controller has pins?

Currently the way I am looking at doing it is having an output which sends a number to choose which input to read, that sensor would then send its current value back to the micro controller. The disadvantage of this method is obviously that it takes up time. I want 100 inputs in the order of 10^-3 seconds and I assume that this has to be a fairly common feature of circuit design given most systems have a large numbers of sensors.

So, is there an easy way of doing it? Is the way I have detailed above at all sensible? Is this a common problem, if so how is it normally overcome?

Best Answer

If you want a large number of sensors to record simultaneuosly, then one way is to have sensors that can be strobed, record their own value internally, then be polled by the central controller at leisure later. But that takes some degree of an intelligent sensor.

At the other end of the spectrum is a central controller with enough I/O to record them all at once. As you say, you will need very many pins.

An intermediate position is some sort of latchable storage, parallel to serial registers for instance, that can latch your sensors, and then be interrogated later by the controller. Easiest to regard this as input width expansion for your controller.

How simultaneous is needed? You could use a controller with DMA to execute a very fast poll.