![Page 1: Distance Sensors Kyle Zhang Jeff Peil Kristian Kalaj](https://reader035.vdocument.in/reader035/viewer/2022062421/56649d0a5503460f949dc5d5/html5/thumbnails/1.jpg)
Distance Sensors
Kyle Zhang
Jeff Peil
Kristian Kalaj
![Page 2: Distance Sensors Kyle Zhang Jeff Peil Kristian Kalaj](https://reader035.vdocument.in/reader035/viewer/2022062421/56649d0a5503460f949dc5d5/html5/thumbnails/2.jpg)
Agenda
Ultrasonic Sensors• How They Work• Interfacing• Things to Be Careful About• Examples
IR Sensors• How They Work• Behavioral Problems• Examples
Ultrasonic vs. IR Sensors
![Page 3: Distance Sensors Kyle Zhang Jeff Peil Kristian Kalaj](https://reader035.vdocument.in/reader035/viewer/2022062421/56649d0a5503460f949dc5d5/html5/thumbnails/3.jpg)
How Ultrasonics Work
• Uses a transducer to convert electrical energy into higher frequency sound waves (ultrasonic)
• When the echo of the emitted waves returns, it converts the sound back into electrical energy and evaluates
http://www.education.rec.ri.cmu.edu/products/nxt_video_trainer2/resources/helpers/nxt_sensors/ultrasonic.html
![Page 4: Distance Sensors Kyle Zhang Jeff Peil Kristian Kalaj](https://reader035.vdocument.in/reader035/viewer/2022062421/56649d0a5503460f949dc5d5/html5/thumbnails/4.jpg)
How Ultrasonics Work (cont..)Calculates the time interval
between the sound wave being transmitted to when it is received
and outputs a matching pwm signal to an FPGA
Distance = (T * speed of sound) / 2
Speed of sound varies depending on environment
![Page 5: Distance Sensors Kyle Zhang Jeff Peil Kristian Kalaj](https://reader035.vdocument.in/reader035/viewer/2022062421/56649d0a5503460f949dc5d5/html5/thumbnails/5.jpg)
How We Used Ultrasonics In Lab
• A signal is raised high when the sound is sent
• The same signal is lowered when the sensor receives the echo of that sound
• Counted the # of clock cycles the signal was high to calculate distance
![Page 6: Distance Sensors Kyle Zhang Jeff Peil Kristian Kalaj](https://reader035.vdocument.in/reader035/viewer/2022062421/56649d0a5503460f949dc5d5/html5/thumbnails/6.jpg)
Another Way to Interface with Ultrasonics
• An ultrasonic sensor uses the IN/OUT port of an FPGA
• Requirements of a typical sensoro 5 volt power supply and ground
o One pin from the FPGA that has the ability to work as input and output (example: GPIO)
![Page 7: Distance Sensors Kyle Zhang Jeff Peil Kristian Kalaj](https://reader035.vdocument.in/reader035/viewer/2022062421/56649d0a5503460f949dc5d5/html5/thumbnails/7.jpg)
Things to Be Careful About
• Limited Rangeo ex: 28015-ND sensor is 20mm-3m
• Mechanical Echoo Must be filtered out for data to be
accurate
![Page 8: Distance Sensors Kyle Zhang Jeff Peil Kristian Kalaj](https://reader035.vdocument.in/reader035/viewer/2022062421/56649d0a5503460f949dc5d5/html5/thumbnails/8.jpg)
Things to Be Careful About (cont.)
• Since we are reflecting a sound wave, certain materials may not reflect as wello Density
o Sound absorption
• Shape of a surface may affect reflection/detectiono Sphere
o Angles
http://www.societyofrobots.com/member_tutorials/node/71
![Page 9: Distance Sensors Kyle Zhang Jeff Peil Kristian Kalaj](https://reader035.vdocument.in/reader035/viewer/2022062421/56649d0a5503460f949dc5d5/html5/thumbnails/9.jpg)
Examples of Ultrasonic Sensors
• RB-Dfr-11o Price: $14.50
o Range: 4 cm to 5m http://www.robotshop.com/media/files/pdf/datasheet-sen0001.pdf
• 28015-NDo Price: $29.99
o Range: 20 mm to 3 mhttp://www.digikey.com/product-detail/en/28015/28015-ND/1774419
• US-T50/R25o Price: $300
o Range: 0 - 50 cmhttp://www.wolfautomation.com/assets/15/US-T50R25.pdf
![Page 10: Distance Sensors Kyle Zhang Jeff Peil Kristian Kalaj](https://reader035.vdocument.in/reader035/viewer/2022062421/56649d0a5503460f949dc5d5/html5/thumbnails/10.jpg)
Ultrasonic Shortcomings
Deficiencies
Can be quite expensive (~$25)
Must be careful of what you are trying to
detect
Reflection, echoes, materials
Absorbent materials (ex: sponges) don’t
work well with Ultrasonic sensors Wave propagation
property
![Page 11: Distance Sensors Kyle Zhang Jeff Peil Kristian Kalaj](https://reader035.vdocument.in/reader035/viewer/2022062421/56649d0a5503460f949dc5d5/html5/thumbnails/11.jpg)
How IR Sensors Work
• Emits beam of infrared light, detects reflection
• Susceptible to quantity of light in environment
• Measures angle of reflection, not time
• Outputs an appropriate voltage to represent the distance, but not always
http://www.societyofrobots.com/member_tutorials/node/71
![Page 12: Distance Sensors Kyle Zhang Jeff Peil Kristian Kalaj](https://reader035.vdocument.in/reader035/viewer/2022062421/56649d0a5503460f949dc5d5/html5/thumbnails/12.jpg)
IR Behavior Problems
• Bad behavior for very close objects
• After ‘initial spike,’ non-linear behavior then linear behavior
https://engineering.purdue.edu/ece477/Webs/S11-Grp03/nb/myersar.html
![Page 13: Distance Sensors Kyle Zhang Jeff Peil Kristian Kalaj](https://reader035.vdocument.in/reader035/viewer/2022062421/56649d0a5503460f949dc5d5/html5/thumbnails/13.jpg)
How to Deal with Bad Behavior
• Make it stand in the corner!o But seriously……
o Reposition sensor to compensate
![Page 14: Distance Sensors Kyle Zhang Jeff Peil Kristian Kalaj](https://reader035.vdocument.in/reader035/viewer/2022062421/56649d0a5503460f949dc5d5/html5/thumbnails/14.jpg)
Types of IR Sensors
• Different Types
• Binary/Proximityo Outputs either high or low
o Cheap
o Good at detecting proximity/threshold
• Multiple Bit/Rangingo Output actual distance from sensor
Analog or digital format
o More expensive but still relatively cheap
![Page 15: Distance Sensors Kyle Zhang Jeff Peil Kristian Kalaj](https://reader035.vdocument.in/reader035/viewer/2022062421/56649d0a5503460f949dc5d5/html5/thumbnails/15.jpg)
Sharp IR Sensor Graph
![Page 16: Distance Sensors Kyle Zhang Jeff Peil Kristian Kalaj](https://reader035.vdocument.in/reader035/viewer/2022062421/56649d0a5503460f949dc5d5/html5/thumbnails/16.jpg)
Examples of IR Sensors• TSOP38238
o Price: $1.95
o Range: N/Ahttp://www.adafruit.com/products/157#Description
• SHARP GP2Y0A21YK0Fo Price: $11.75
o Range: 10cm - 80cmhttp://www.robotshop.com/en/sharp-gp2y0a21yk0f-ir-range-sensor.html
• SHARP GP2Y0A02YKo Price: $15.95
o Range: 20 cm-150 cmhttp://www.adafruit.com/products/1031?gclid=CKemybT7t7oCFeYWMgod1XgAHQ
![Page 17: Distance Sensors Kyle Zhang Jeff Peil Kristian Kalaj](https://reader035.vdocument.in/reader035/viewer/2022062421/56649d0a5503460f949dc5d5/html5/thumbnails/17.jpg)
IR Pros and Cons
• Pros○ Cheap○ Outputs voltage based on distance○ Precise detection of objects
○ Cons○ Outputs voltage based on distance
■ Non-linear behavior○ Susceptible to light influences
![Page 18: Distance Sensors Kyle Zhang Jeff Peil Kristian Kalaj](https://reader035.vdocument.in/reader035/viewer/2022062421/56649d0a5503460f949dc5d5/html5/thumbnails/18.jpg)
Conclusion Ultrasonic vs. IR
• Use Ultrasonics when:o You care about
distance accuracy
o There will be light influences
o You have money to spend
• Use IRs when:o You want to detect
movement or thresholds
o You are on a budget
o You need precision in what you are detecting
![Page 19: Distance Sensors Kyle Zhang Jeff Peil Kristian Kalaj](https://reader035.vdocument.in/reader035/viewer/2022062421/56649d0a5503460f949dc5d5/html5/thumbnails/19.jpg)
Further Reading
• Infrared vs. Ultrasonico http://www.societyofrobots.com/member_tutorials/n
ode/71
• Parallax Sensor and General Ultrasonic Usage Tipso http://dc254.4shared.com/doc/fiS_Vzyu/preview.htm
• IR Tutorialso http://www.intorobotics.com/use-infraredir-sensors-t
utorials/
![Page 20: Distance Sensors Kyle Zhang Jeff Peil Kristian Kalaj](https://reader035.vdocument.in/reader035/viewer/2022062421/56649d0a5503460f949dc5d5/html5/thumbnails/20.jpg)
Questions?