Information Science in Action Week 02 Data Collection: Sensors College of Information Science and Engineering Ritsumeikan University
last week: introduction information data collection transmission storage organisation retrieval analysis visualisation interpretation science 2
this week: data collection: sensing sound direction speed orientation humidity pressure EM field financial medical clerical light temperature sensing entry location radiation fitness music data collection transmission sound medical audio video scanning image text 3
sensors device, module, or system whose purpose is to detect events or changes in its environment send the information to another (electronic) system some examples: touch-sensitive buttons (tactile sensors) temperature, pressure, flow measurement AHRS (attitude and heading reference system) for aircraft gyroscope: roll, pitch yaw; compass: heading nine degrees of freedom input for Wii and game controllers MARGS (magnetic, angular rate, and gravity sensor) position (potentiometers), pressure (force/stress sensing resistors) applications manufacturing/machinery, aerospace, transportation, medicine, robotics 4
miniaturisation micro-electro-mechanical systems (MEMS) in Europe: micro systems technology (MST) in Japan: micromachines microscopic devices with moving parts internal components between 1 and 100 micrometres in size (0.001 mm to 0.1 mm) entire device typically between 20 micrometres (0.02 mm) and 1 mm per side 5
MEMS gyroscope microscopic tuning forks coriolis force lateral to plane of rotation change in vibration mode 6
MEMS devices and applications accelerometers airbag deployment, vehicle stability control camera drop detector gyroscopes roll, pitch and yaw in aircraft AHRS and autopilot magnetometer directional heading, magnetic field detector metal detector (sunken ships), mining hazards microphones portable telephones, headsets, laptop computers pressure sensors car tire monitoring, blood pressure measurement, barometers 7
sensitivity sensor characteristics output change relative to measured input quantity change law: linear, log, exponential As it draws only 60 µa from its supply, it has very low self-heating, less than 0.1 C in still air. The LM35 is rated to operate over a 55 to +150 C temperature range, while the LM35C is rated for a 40 to +110 C range ( 10 with improved accuracy). The LM35 series is available packaged in Typical Applications n Less th n Low se n Nonline n Low im range input range: min. and max. true values measurable DS005516-3 FIGURE 1. Basic Centigrade Temperature Sensor (+2 C to +150 C) output range: min. and max. output values that can be generated FIGURE resolution (discrimination) the minimal input change needed to cause a detectable output change 8
accuracy and precision accuracy how close the output is to the true value being measured absolute error = output true value relative error = absolute error true value precision related to the variance in a set of measurements of the same true value measurements not necessarily accurate repeatability = precision of a set of measurements over a short time interval reproducibility = long-term precision, or between operators/sensors/environments which sensor is more accurate? more precise? true location true location = sensor A output = mean measurement = sensor B output = mean measurement 9
sources of error systematic errors (bias) temperature instability drift (temperature, mechanical, chemical) loading errors (the sensor affects the true value) attenuation (lossy transmission channel) human observational errors (e.g., parallax) systematic error (bias) random error (noise, imprecision) random errors (noise) natural fluctuations in the true value (e.g., water height, with waves) background noise (e.g., fluorescent lights causing mains hum ) signal-to-noise ratio (SNR) should be >> 1 10
static input/output relationships linearity closeness of the output to an ideal line or curve easily compensated for monotonicity increase in true value increase in measurement non-monotonic output ambiguous measurements hysteresis dependence of the output on the input history loose mechanical coupling ( backlash ) ambiguity electrical hysteresis improves digital noise immunity 11
transducers transducer device converting signal from one physical form to another physical form sensor = input transducer receives and responds to a signal or stimulus typically converts physical input signal to electrical output e.g., microphone actuator = output transducer generates a signal or a stimulus typically converts electrical input signal to physical output e.g., loudspeaker input signal sensor processor actuator input transducer calibration, scaling, change of law, etc. output transducer output signal 12
calibration comparison of sensor measurement values with those of a standard of known accuracy another measurement device of known accuracy a device accurately generating the quantity to be measured a physical artefact, such as a standard metre ruler usually followed by certification of the device under test the measured error being noted adjustment made to correct the error to an acceptable level 13
automatic range calibration continually re-calibrate and adjust input range remember maximum and minimum input values (the input range) update input range if new input value is outside previous range adjust output scaling appropriately for current input range 1023 inputmaximum input signal 0 inputminimum unsigned int inputmaximum = 0; unsigned int inputminimum = 1023; for (;;) { unsigned int input = readinput(); inputmaximum = max(inputmaximum, input); inputminimum = min(inputminimum, input);... } useful when output range is fixed regardless of input range 14
simple instrument systems processor typically preceded by analogue-to-digital converter (ADC) electrical signal (voltage) converted to digital value (integer) fixed range (input voltage) and resolution (number of output bits) physical process physical signal sensor electrical signal ADC digital signal processor processed signal display measurement observer ADC can be a source of errors non-linearity (missing output values) non-monotonicity (repeated output values) 15
processors often integrated with input ADCs calibration, scaling, conversion, etc. low-power and small size desirable communication and/or local display integrated sensor nodes combine input sensor ADC and processor communications (Wi-Fi, ethernet, USB) protocol stack (TCP/IP, HTTP, etc.) 16
practical sensing build a simple instrument system sensor (e.g., light, temperature) voltage processor (embedded CPU) voltage ADC digital value display (computer screen or numeric display) 17
environmental sensing: measuring light level a photocell is a resistor whose resistance depends on light level 50kΩ R = high 1kΩ R = low light-dependent resistor more light less resistance how do we turn a changing resistance into a changing voltage? hint: compare with potentiometer (variable resistor) 18
photocell plus resistor = light-dependent voltage divider a photocell can act as one half of a potential divider like a potentiometer, but only one side changes resistance 19
photocell resistance is inversely proportional to light level note the spread of possible values at the high-resistance end 20
environmental sensing: measuring temperature in 1994, measuring temperature suddenly became very easy... LM35 Precision Centigrade Temperature Sensors General Description The LM35 series are precision integrated-circuit temperature sensors, whose output voltage is linearly proportional to the Celsius (Centigrade) temperature. The LM35 thus has an advantage over linear temperature sensors calibrated in Kelvin, as the user is not required to subtract a large constant voltage from its output to obtain convenient Centigrade scaling. The LM35 does not require any external aged in hermetic TO-46 transistor LM35C, LM35CA, and LM35D are plastic TO-92 transistor package. The able in an 8-lead surface mount small o plastic TO-220 package. Features n Calibrated directly in Celsius 21 (Cen
S Package Number H03H TO-92 Plastic Package very low self-heating, less than 0.1 C in still air. The LM35 See is rated to operate over a 55 to +150 C temperature range, while the LM35C is rated for a 40 to +110 C range ( 10 with improved accuracy). The LM35 series is available pack- LM35 converts temperature to voltage level Typical Applications DS005516-2 rder Number LM35CZ, LM35CAZ or LM35DZ S Package Number Z03A DS005516-3 FIGURE 1. Basic Centigrade Temperature Sensor (+2 C to +150 C) you can simply replace your potentiometer in last week s circuit with the LM35 be very careful to connect it correctly, or it will explode the +V S pin must go to the 5V supply the V OUT pin connects to A0 (and GND connects to GND, obviously) your analogue input program from last week will work unmodified 22