Week 4

Sensing the real world

Sensors (v.5e)


 Motion (Orientation/inclination )sensors
 Force/pressure/strain
 Position
 Temperature and humidity
 Rotary position
 Light and magnetic field sensors
Sensors (v.5e)


Motion (Orientation/inclination
Tilt Sensor

Sensors (v.5e)


Accelerometer http://en.wikipedia.org/wiki/Accelerometer  Functions:    measure acceleration in one or more directions.5e) 4 . position can be deduced by integration. Orientation sensing : tilt sensor Vibration sensing  Methods:   Mass spring method ADXL78 (from Analog Device ) Air pocket method (MX2125) Sensors (v.

pdf )  Mass spring type (output acceleration in G)  Measure the capacitance to create output Sensors (v.ADXL78 (from Analog Device http://www.5e) 5 .analog.com/UploadedFiles/Data_Sheet s/ADXL78.

Z ) directions  http://www.com/UploadedFiles/Data_Sheets/ADXL330.pdf 3D accelerometer dx 2 x  2  accerelati on dt x   xdt  velocity x   xdt  distance Recover velocity and distance by integration Problem: noise may be integrated  Can also measure the direction of gravity Sensors (v.5e) 6 .ADXL330 accelerometer for measuring accelerations in three (X.Y.analog.

com)  Gas pocket type  When the sensor moves.parallax. the temperatures of the 4 sensors are used to evaluate the 2D accelerations Sensors (v.2D translational accelerometer MX2125 (from www.5e) 7 .

com/watch?v=9NEiBDBXFEQ Sensors (v.youtube.5e) 8 .com/watch?v=mwAK-fiPyk4 http://www.Accelerometer demo: orientation sensing  Self-balance Robot Sensor demo https://www.youtube.

com/watch?v=WvMrrQ0tMR4 Sensors (v.Accelerometer demo : Tilt sensing demo  Application: Xiaomi Mi band fitness Tilt sensing demo http://www.youtube.youtube.com/watch?v=C6uVrYz-j70 https://www.5e) 9 .

dy/dt.wikipedia. Y (roll).org/wiki/Gyroscope Traditional mechanical Gyroscope  Absolute Gyroscope measures  rotational angles x.5e) 10 . and Z (yaw). z  Rate Gyroscope (or simply called gyroscope now)     measures the rate of rotation along 3-axes of X (pitch).Gyroscopes http://en. y. dz/dt Also need integration to recover rotational angles Modern implementations are using Microelectromechanical systems (MEMS) technologies. Meaning Measure dx/dt. Sensors (v.

pdf  FEATURES   Complete rate gyroscope on a single chip Microelectromechanical systems (MEMS) Z-axis (yaw-rate) response  APPLICATIONS     GPS navigation systems Image stabilization Inertial measurement units Platform stabilization Sensors (v.com/UploadedFiles/Data_Sheets/ADXRS401.5e) 11 .analog.Gyroscope example ADXRS401 http://www.

5e) 12 .com/watch?v=VP4-wdMMLFo Sensors (v.youtube.Rate gyroscope demo  Using Gyroscope compass for virtual reality application in an iphone http://www.

a jitter (noise) of around 1.5° Sensors (v.the Philips KMZ51 magnetic field sensor  50/60Hz (high) operation.Compass-.5e) 13 .

wikipedia.1  What are the functions of a 3-D accelerometer?  What is the difference between an accelerometer and a gyroscope?  Why an electronic compass is needed to make an Inertial Measurement Unit IMU ? (https://en.Student ID: __________________ Name: ______________________ Date:_______________ (Submit this at the end of the lecture.) Exercise 2.org/wiki/Inertial_measurement_unit) Sensors (v.5e) 14 .

com/watch?v=dQWATsLa30g 35cm Sensors (v.Application of motion sensors Self balancing robot  by Kelvin Ko. KH wong Motion sensors: gyroscope and accelerometer 20cm  https://www.5e) 15 .youtube.

Complementary filter  Since Gyroscope : Accurate in High frequency measurement Accelerometer: Accurate in low frequency measurement  Combine two sensors to find output at all frequencies Sensors (v.5e) 16 .

=filter time constant.5e) 17 17 .Complementary filter θ=rotation angle.org/wiki/High-pass_filter Sensors (v.wikipedia. s=laplace operator http://en.org/wiki/Low-pass_filter http://en.wikipedia.

com/watch?v=dQWATsLa30g Sensors (v.5e) 18 18 .Self Balanced robot using complementary filter https://www.youtube.

com/WebLib/Omron%20Web%20Data/D6B.digikey.pdf  Detect tilting 35 ~ 65 degrees in right-andleft inclination Sensors (v.5e) 19 .Tilt Sensor by OMRON http://rocky.

5e) 20 .Force/pressure/strain Force-sensitive resistor (FSR) Strain gauge Flexion Air pressure Sensors (v.

interlinkelectronics.pdf  FSR402 Sensors (v.Force Sensing Resistors http://www.5e) 21 .com/library/media/papers/pdf/fsrguide.

com/watch?v=LQ21lXr6egs Sensors (v.Force Sensing Resistor Demo  http://www.youtube.5e) 22 .

5e) 23 .Application for a walking robot  Walking robot Sensors (v.

Application of force sensing resistance sensors to balance a walking robot  Balancing Neutral position Floor tilled left upper leg bend right Floor tilled right upper leg bend left Four sensors under the foot Sensors (v.5e) 24 .

5e) 25 .Four Force sensors under the foot D Sensors (v.

2  Suggest how do you covert resistance into measurement data  Discuss how do you make a walking robot which can balance itself using the force feedback sensors.5e) 26 .Exercise 2. Sensors (v.

robotshop.com/watch?v=2STTNYNF4lk http://www.org/wiki/Nao_(robot)  http://www.wikipedia.jpg Sensors (v.5e) 27 .The Nao robot uses force feedback at its feet http://en.com/Images/xbig/fr/robot-humanoide-nao-edition-academique-v3plus-aldebaran.youtube.

org/wiki/Strain_gauge Sensors (v.5e) 28 . https://en. force is applied to the other end. The resistance of the gauge will change with the force. One end of the rod is fixed.wikipedia.Strain Gauge : Force sensors http://www.meas-spec.com/myMeas/default/index.asp  Piezoelectric crystal: produces a voltage that is proportional to the force applied  Strain gauge: cemented on a rod.

the change of the length of the strain gauge is L.Single element strain gauge (sensitive to temperature change. )  Originally the length of the strain gauge is L. L  length of the gauge R L R  unstrained gauge resistance V0  Vb  Sensors (v. and the resistance is R when there is no load.5e) 29 . and the corresponding change of the resistance is R Vb Gauge=R+R R V0 R R Strain gauge rod Load W R R   R    R   G L     Vb    Vb    Vb   2 R 2 R   R 4 R  2  R 4 R 4 L         R L for G and G  strain gauge factor. When  W is applied to the rod.

 All gauges have unstrained resistance R.Four-element (Wheatstone bridge) strain gauge sensor. t1 t2 Vb t1=R+R rod b2=R-R V0 b1 b2 b1=R-R t2=R+ R load R  R R  R   2 R   L    V  V    b b G L   R  R  R  R R  R  R  R   2R    V0  Vb  Sensors (v.5e) 30 .  Advantages : Four times more sensitive than single gauge system. not sensitive to temperature change.

t1=R+R b2=R-R V0 t2=R+ R Vb t1 rod b1 b1=R-R t2 b2 load R  R R  R   2 R   L    V  V    b b G L   R  R  R  R R  R  R  R   2R    V0  Vb  Sensors (v.Exercise 2.3  If you don’t know G.5e) 31 . how can you find it out?  Discuss why this system is relatively stable when temperature changes.

5e) http://www.  30-40 KΩ (90°) http://www.jameco.flexpoint.com/wcsstore/Jameco/Products/ProdDS/150551.Flexion (bend) sensors  resistance:  10 KΩ (0°).com/ 32 .PDF Sensors (v.

com/watch?v=m4E5SP7HCnk&feature=related Sensors (v.youtube.Felixon resistance Demo  http://www.5e) 33 .

5e) 34 .Air pressure sensor  Measure up to 150 psi (pressure per square inch ). Sensors (v.

5e) 35 .Position sensors  Infra-red range sensor  Linear and Rotary position sensors Sensors (v.

Infra-red Range detectors by SHARP (4 to 30cm) http://www.acroname.5e) Distance to reflected object (cm) 36 . Analog voltage Sensors (v.  The distance corresponds to the triangle formed. A small linear CCD array receives reflected light.com/robotics/info/articles/sharp/sharp.html  An emitter sends out light pulses.

IR radar using the Sharp range detector  http://www.com/watch?v=tStBLAiQaC8&feature=related Sensors (v.5e) 37 .youtube.

Exercise 2.5e) 38 .youtube.4  Discuss how to make the IR radar system as shown in http://www.com/wa tch? v=tStBLAiQaC8&feature=r elated  Give two applications of the Rotary and Linear sensors Sensors (v.

from[1]  Rotary Linear  Optical shaft encoder Sensors (v.5e) 39 .Position sensors.

Magnetic rotary encoder (http://www.com/UserFiles/acrobat/UKEnglish/L-9517-9147.renishaw.5e) 40 .pdf)  non touch sensing Sensors (v.

org/wiki/Rotary_encoder)  The light received (on or off) will tell the 3 light receivers rotation angle) Light paths Rotation shaft 3 light emitters Crank shaft sensor Sensors (v.youtube.Optical rotary encoder (http://en.5e) 41 http://www.wikipedia.com/watch?v=RuIislTGOwA .

Temperature and humidity  Temperature  humidity Sensors (v.5e) 42 .

com/pf/LM/LM135.Temperature sensors LM135/235/335 features(from NS) http://www.5e) 43 .national.html  Directly calibrated in °Kelvin        1°C initial accuracy available Operates from 400 µA to 5 mA Less than 1 Ohm dynamic impedance Easily calibrated Wide operating temperature range 200°C over range Low cost Sensors (v.

ADC0820 or ADC0801)  Sensors (v.Application note (connecting to an ADC e.5e) 44 .g.

com/WebLib/BC%20Components/Web%20Data/2322%20691%2090001.digikey.Capacitive Atmospheric Humidity Sensor http://rocky.pdf  BCcomponents 2322 691 90001 10-90%RH Dc Sensors (v.5e) 45 .

a humidity sensor. and V+ = 1Volt.Exercise 2. 46 Sensors (v.  Using the LM35 sensor.5e) .5  Suggest methods to calibrate: a temperature sensor. Suggest how to convert connect this output to a computer.

5e) 47 .Leaf Sensor Alerts When Plants Are Thirsty  http://www.com/watch?v=VM4X_fqPPco Sensors (v.youtube.

and 2 MW respectively).ti.js p Light-to-voltage optical sensors. Sensors (v. TSL252 LIGHT-TO-VOLTAGE OPTICAL SENSORS http://focus. TSL251.com/general/docs/scproducts. 8 MW.  The output voltage is directly proportional to the light intensity on the photodiode.5e) 48 .TSL250. each combining a photodiode and an amplifier (feedback resistor = 16 MW.

480/pdvp5001.org/wiki/Photoresistor .pdf resistor (LDR) 49 https://en.Cadmium Sulfoselenide (CdS) Photoconductive Photocells and light-dependent resistor (LDR) Light sensing using CdS light-dependent Sensors (v.5e) http://faculty.wikipedia.edu/aelbirt/16.uml.

Hall effect Sensors for sensing
magnetic flux“B field”, see:


Sensors (v.5e)


Application on Magnetic levitation 磁懸浮

Exercise 2.6: Discuss how to implement this.

Magnetic levitation Train Model


frog levitation

Sensors (v.5e)


Hall effect sensors and brushless DC
 Brushless DC motor


 Is it using Hall effect sensor? Don't known.


Sensors (v.5e)


youtube.5e) 53 .com/watch?v=Mf44bWQr3jc Sensors (v.ladyada.net/learn/diykinect/ http://www.youtube.Novel sensors  Kinect http://www.com/watch?v=nvvQJxgykcU http://www.

Many KINECT DIY projects  http://www.5e) 54 .com/watch?v=3V-TGXFZbbA&feature=related Sensors (v.youtube.youtube.com/watch?v=Brpu30vjCa4&feature=related http://www.

5e) 55 .Control systems Example: A temperature control system Sensors (v.

Control example: Temperature control system computer  Water tank Temp. amp. Sample & Hold Pulse Width modulation & solid state relay Sensors (v. Sensor Heater Digital control circuit Instrum.5e) Timer A/D CPU D/A 56 .

Algorithm for on-off-control:  Loop forever: If (Tfrom_sensor > Treq required temperature)  then (heater off )  else (heater on). Overshoot Treq Steady state error Undershoot Temp On-off control result Time Sensors (v.5e) 57 .Temperature control method 1: ON-Off (bang-bang) control (poor)  Easy to implement. bad control result -.contains overshoot undershot.

Kd.Kp. differential.5e) 58 . integral  } //G.Treq Tw  then Tw =e*G*{Kp+Kd*[d(e)/dt] +Ki*e dt }  else Proportional. e=T .Ki can be adjusted by user Tw Sensors (v.Temperature control method 2 : Proportional-integraldifferential (PID) temperature control (good)  Init. (set required temperature Treq)  Loop forever{   get temperature T from sensor.

Parallel PID block diagram Ki Sensors (v.html Kd Kp Figure 1 .com/question1212-03.controlviews.5e) 59 .PID block diagram  http://www.

PID control using pulse width modulation PWM  Tw (depends on e ) Time Fixed period and fixed number of pulses Temperature Treq On-off control: oscillates and unstable PID control result of method 2 Time Sensors (v.5e) 60 .

Integration and Derivation in PID control? Sensors (v.5e) 61 .Exercise 2.  What are the functions of Proportional.7  Why bang-bang control is bad.

Summary  Studied the characteristics of various sensors  and their applications Sensors (v.5e) 62 .

8: A magnetic sensor is used to detect the magnetic flux density (in K Gauss) of an environment. and the flux density changes at a rate of not more than 10 K Gauss per second.7  Why bang-bang control is bad. and when there is no magnetic flux the resistance is 2K. Sensors (v. and the power supply used for this system is 5 Volt.  What are the functions of Proportional. The resistance of the sensor is proportional to the flux density detected with a gradient of 4 KΩ per K Gauss. The system uses an Analogue-to-Digital Converter (ADC) to convert the magnetic flux density into digital data.Exercise 2.5e) 63 . Integration and Derivation in PID control?  Exercise 2. The range of the magnetic flux density in the environment is between 0 and 5 K Gauss. The smallest change in flux density detectable is required to be 5 Gauss.

8 (continue)   Draw the circuit diagram of the bridge circuit and the operational amplifier circuit needed to transform the flux density detected to an output voltage. Sensors (v. Draw the circuit of your scheme and explain with the help of formulas of how the system can be freed from the effect of temperature change. Discuss how you can use two or more sensors to reduce the effect of temperature change. When the flux density is 0 the output is 0 Volt. The output voltage is proportional to the flux density.Exercise 2. when the flux density is 5 K Gauss the output is 5 Volts.5e) 64 . It is found that the temperature of the environment affects the resistance of the magnetic sensor at a rate of RT (in KΩ per degree Celsius).

data analysis and control prentice hall.wikipedia.A laboratory approach using the microcomputer for instrumentation. Protopapas. Prentice hall  [3] CUHK_FYP report HML0602.References  [1] S.E.edu/group/ctm  [5] http://en. Interfacing -.umich. KHW0703  [4] http://www.5e) 65 .engin. Microcomputer hardware design.A. Derenzo.org/wiki/PID_controller Sensors (v.  [2] D.