Electronic – Fast sensor readings

communicationdataloggeripadsensor

I am developing a data logger for use in high schools like ( http://www.pasco.com ). The main difference is that mine is primary supposed to be used with an iPad. I have a connection between a micro controller and an iPad up and running, but I have a question regarding the communication between sensors and the 'hub' which is the part that makes it possible to connect up to 3 sensors to the iPad.

On the prototype level my hub consists of an Atmega328 (arduino) and the sensors are just connected directly to the A/D converter pins.

But because this system is supposed to support a variety of sensors this solution is not generic enough (i.e.. if a distance sensors should be connected, it would not work on the anlog pin, because it would be the difference between 2 timestamps). So I am thinking of adding a micro controller in every sensor and let that microcontroller communicate with the micro controller of the hub, which then will transmit the data to the iPad.

Which protocols should be used to communicate between these micro controllers? And is at all the way to go?

  1. The length of the wire would be maximum 2m.
  2. The maximum amount of wires is 4 and it should include +5 and GND to
    the sensor.
  3. The readings should in some cases be fast 20hz or preferably even
    more.
  4. It should be possible to send some sort of identification along to
    the hub, so the hub knows which kind of sensors is attached.

It is possible to see a video of the prototype here.

Best Answer

For multiple sensors, an assortment of analog and digital, a simple solution would be to use an Arduino Mega with a "Mega Sensor Shield" (bottom of page) ($11-12) attached to it. DfRobot offers a Mega Sensor Shield with XBee connector on board ($18-20), which might be even more useful:

Mega Sensor Shield with xBee connector

This combination allows different sensors to be plugged in, as each of the 54 digital and 16 analog IOs of the Arduino Mega are brought out to separate 3-pin headers consisting of signal, ground and Vcc (5 volts). Thus sensors which need power would also receive it from the Sensor Shield.

As the Arduino boards themselves cannot provide more than 200 to 500 mA per board, depending on the board specifics, the Sensor Shield also has a connector to accept power from a wall-wart. The Arduino is then powered off the shield, as are all the sensors.

The reason to recommend the XBee connector is that incorporating remote data logging, via a Bluetooth or WiFi XBee module, becomes easy. This is especially valuable in an environment where long cables from sensor / logger location to a computer for data visualization or long term storage bears risks of damage.

Sensor shields are also available with an SD card module on board, or connectors provided for one. This again might be useful if the data logger needs to store large volumes of data locally.