Sensor interfaces
From Capsil Wiki
There are main two types of sensor interfaces: Analog and Digital interfaces.
Analog Interface
Analog interfaces are commonly used in simple sensors, such as thermistor and light sensors. However, certain digital sensors, such as vision sensor, may also provide analog outputs. To read analog sensor signals, an Analog-to-Digital Converter ADC is required. Some microcontrollers, such as the MSP430 and the Atmel Atmega, have built in ADCs, and dedicated high precision ADCs are often used when the processors do not have built-in ADC, such as the Intel IMOTE2.
Digital Interface
In general, there are three commonly used digital interfaces:
- Inter-Integrated Circuit Bus (I2C)
I2C, developed by Philips, is a half-duplex, synchronous and master-slave communication interface. To send/receive data, the master device generates the clock signal, and the slave device read/transmitted the data bits in MSB first order. I2C interfaces can often be found in ultrasound range sensors, humidity sensors, etc.
- Serial Peripheral Interface (SPI)
SPI, developed my Motorola, is fairly similar to the I2C in terms of data bit shifting, but instead of half-duplex, it enables full duplex communication and uses a Chip Select signal to identify slave devices. With date rate up to 1Mbps, SPI is often used for interfacing complex chipsets, such as radio transceivers and ADCs.
- Universal Asynchronous Receiver/Transmitter (UART)
UART (or Transistor-Transistor Logic (TTL) version of the RS232) is the asynchronous serial interface used by the serial ports of Personal Computers (PCs). The asynchronous nature of UART simplifies the interface between devices where no clock signal is required. UART interfaces are often used in more advanced sensors, such as SpO2.