Sensor System
Introduction
A sensor measures the information about the current state of the system. Temperature, pressure. humidity, ranging detection, facial recognition, navigation, etc. are typical information that is provided to the processor to calculated required sensory information to meet product requirements. Some state information like temperature can be provided by one sensor, however, complex system such as navigation require 3 different sensors. Hence, sensor system design is highly dependent on product requirements and complexity.
Background
A sensor performance is characterized by its input range, precision, linearity, and output error and output data rate. All these characteristic need to be evaluated to tailor towards the needs of the product requirements. For instance, if low latency orientation detection is needed, then the IMU sensor needs to output data rate at a sufficiently higher rate to minimize user noticeable lag.
We define the sensor system as a network interconnecting sensors within a product to provide necessary measurements information to estimate the state of product.
Goal
The goal of this article is to provide insight into consumer electronics sensor types, design, integration, and calibration.
Overview
Common sensor working principles:
Pyroelectric effect: heat flow across the sensing element induces a voltage (e.g passive infrared motion sensor)
Piezoelectric effect; deformation of the sensing element generates a voltage (e.g. ultrasonic distance sensor)
Piezoresistive effect: deformation of the sensing element changes the the its resistance (e.g. Metal strain gauge, MEMS pressure sensor , & accelerometer)
Photoelectric effect: incident light creates current flow inside the sensor (e.g. photodiodes used in photodetector)
Types of sensors
Motion sensor:
What does it do?
detects motion of an object
Why do you need it?
it can be used for applications such as burglar intrusion
What are some common types?
Passive IR sensing body temperature
Ranging Detection:
What does it do?
Why do you need it?
What are some common types?
proximity sensor, time of flight, ultrasonic, light detection ranging, etc.
Touch sensor
What does it do?
it detects touch and its movement
Why do you need it?
it helps to locate the tips of your finger
What are some common types?
surface capacitive, projected capacitive, restive touch, surface acoustic, and infrared.
Finger Print Sensor
What does it do?
it detects the patterns of a finger print.
Why do you need it?
it is used for identify verification such as unlocking your device.
What are some common types?
Most widely used are capacitive sensors.
Temperature sensor:
What does it do?
Measures temperature of the room. A resistor that changes with temperature, a thermistor, is used.
Why do you need it?
Monitor and regulate product is within safe temperature operation window. To reduce temperature from rising, processor will be throttled to a slower speed. Typical CPU die temperature is set at 85 to 115 degrees depending on the production requirements.
What are some common types?
thermistor, resistive temperature detection (RTD), thermalcouple, infrared, etc.
Note: thermistor is the most commonly used to detect IC and ambient temperature inside the product. Themalcouple is widely use to measure the surface temperature of the product during safety tests.
Humidity sensor:
What does it do?
It measures the humidity level of the ambient environment
Why do you need it?
It can measure the relative humidity level and temperature of the environment.
What are some common types?
Barometric Pressure sensor
What does it do?
it measures the ambient pressure of the product in mPscal
Why do you need it?
it is used to tell altitude of the location in combination with GPS location data.
What are some common types?
semiconductor ones are generally
Hull sensor
What does it do?
it measures the magnetic field
Why do you need it?
it a magnetic cover is used for the product, a strong presense of magnetic field is used to detect lid closing. This can be used to turn of the screen to save power.
What are some common types?
Ambient light sensor
What does it do?
It measures the intensity of light
Why do you need it?
it is used to detect the environment light intensity so the screen brightness can be adjusted according for better clarity
What are some common types?
it's passive detection sensor that often uses photo diodes with transimpedance amplifier to amplified the detected signal.
Imaging
What does it do?
it measures the light intensity of RGB colors
Why do you need it?
it creates the image of the word
What are some common types?
CMOS and CCD
note: Almost all imager sensor uses CMOS today/
Strain gauge
What does it do?
it measures the strain (resistance change with applied force) created by deformation of the object such as bending of a surface.
Why do you need it?
it can be used to detect a force, tension, pressure, and weight.
What are some common types?
A Wheatstone bridge circuit is used to detect strains of the sensing element which outputs mV in response to delta resistance of the gauge. Then the voltage is amplified and converted to digital values for further processing.
IMU
What does it do?
It measures the inertial of the system
Why do you need it?
it can detects movements such as steps in simple device. In a more complex device with 3-axis accelerometer, it can detect orientation of the device.
What are some common types?
Accelerometer, gyro or combination of them.
Accelerometer
What does it do?
It measures the acceleration of the device
Why do you need it?
it detects movements such as steps in simple device. In a more complex device with 3-axis accelerometer, it can detect orientation of the device.
What are some common types?
3 axis MEMS acceleratometer are commonly used. It detects acceleration in x,y, and z directions.
Gyro
What does it do?
It measures angular velocity of the device.
Why do you need it?
it can uses to measure orientation of the device like roll, yaw, and pitch. In a more complex device with 3 axis Gyron+3 axis accelerometer, it can refine the accuracy of object orientation.
What are some common types?
3 axis MEMS gyro are commonly used. It detects anguler rotation speed along x,y, and z axis.
Magnetometer
What does it do?
it uses to measure magnetic field of the earth
Why do you need it?
it provides acts as the heading for navigation.
What are some common types?
TBD
Note: Please see fundamental->sensor sections for detailed sensor selection criteria and guideline.
System Architecture
Block Diagram
Below is a common sensor system used in the phone.
Block Description
Application Processor: this is the main processor running general purpose processes such as Android OS and its applications
Main Memory: DRAM is where the run-time OS and data is, loaded, stored and executed while Flash is used to store system image and persistent data.
Sensor Core: Generally, there is dedicated sensor core is that used to processor the sensor information. This sensor core can be external using cortex-M4F micro controller or internal to the SoC itself.
Sensors:
we have 7 sensors in a typical phones:
Accelerometer, gyro, magnetometer as known as eCompass: generally these three sensors works together to calculate object orientation needed for navigation and screen orientation detection.
Barometric pressure sensor (Barometer): it measures air pressure and works with GPS to retrieve the altitude information of the geographic location of the device in order to improve navigation accuracy.
Ambient light and proximity sensor: Ambient light and proximity sensor comes together in one package, with an IR emitter and an IR receiver. The IR receiver by itself works as a ambient light sensor; however an IR emitter is used for emit an active IR light for the purpose of detecting for where or not a face is in contact with the phone The level of proximity of an object is determined by the reflected IR light received by the IR sensor; hence object proximity information is measured.
Touch sensor: touch sensor detects location of finger positions, it contains high amount of data for processing.
Fingerprint sensor: It contains a matrix of capacitive cells to detect finger print signature. It contains high amount for fingerprint detection that needs to be transferred sensor core for detection.
Design analysis
The main system design besides choosing the sensors is identify to serial interface selections for each component. For high data transfer such as finger print and IMU (Gyro+Accelerometer), we choose to use dedicated SPI interface which can operate in tens of MHz clock. For other slower reading sensors, we can use I2Cs which is commonly at 400 KHz.
Common Manufacturers
Bosch is generally used for Barometer
Bosch, STM, and Invense are good with MEMS accelerometer, gyro.
STM and AKM semiconductor is good for magnetometer
AMS is generally used for Ambient light sensor and proximity
STM is generally good at Touch controller
Imaging sensors are Sony and Omnivision
CALIBRATION
Sensor often always need to be calibrated against offset and temperature. Generally this is done at the factory for each sensor. An example of ambient light sensor calibration is shown below.
No light: record sensor reading at no light environment. This is the offset reading that needs to be subtracted.
Low intensity: record sensor reading at~ 20 flux condition
Reference intensity: record sensor reading at a known reference ~ 870 flux.
High intensity: record sensor reading at high condition ~ 2000 flux
Find a linear regression of sensor reading and adjust the slope to match the know conditions.
The calibration is just a linear regression equation y=mx+b, where m is the slope after adjustment and b is the offset that needs to be removed.
Write the calibration data for each device back to the persistent memory.
Summary and Conclusion
Accurate sensor data depicts current state of the device. We understand that the sensor merely provides that information. Then sensor measurements can be used to calculate device orientation, device altitude, navigation, and personal identity verification. Lastly, sensors have internal non-linearity and offsets that varies with temperature, so in order for sensors to measure data through out a wide range of temperature, we need to calibrate each device individually.
Additional Resource:
Please review the IMU noise model to understand the real world application for modeling noise in IMU sensors and the caliberation steps: https://github.com/ethz-asl/kalibr/wiki/IMU-Noise-Model