PHY 235 Robotics Workshop Day 5 Distance Sensing Using The Ultrasonic Ping Sensor.

Slides:



Advertisements
Similar presentations
IR Communication Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
Advertisements

Add and Use a Sensor & Autonomous For FIRST Robotics
IR Control Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
Sonar and Localization LMICSE Workshop June , 2005 Alma College.
Some computer fundamentals and jargon Memory: Basic element is a bit – value = 0 or 1 Collection of “n” bits is a “byte” Collection of several bytes is.
PHY 235 Robotics Workshop Day 6 DC Motors, H-Bridge Board, Simple Lego/Boe Bot.
Navigating the BOE-BOT
PHY 235 Robotics Workshop Day 3 IR Distance Sensing.
PING))) Ultrasonic Distance Sensor living with the lab ultrasonic pressure waves from PING))) speaker The PING))) sensor emits short bursts of sound and.
Robotics Lego NXT Mindstorms.
Designs and Implementation Ring Detector circuit Design: Ring Detector circuit Design:
Basics of Sensors. A sensor is a device which is used to sense the surroundings of it & gives some useful information about it. This information is used.
1 Ultrasonic Distance Sensor. 2 How it Works The distance sensor emits short bursts of sound and listens for this sound to echo off of nearby objects.
Sensors Material taken from Robotics with the Boe-Bot.
Embedded Programming and Robotics Lesson 10 Ultrasonic Range Finder Range Finder1.
Working with Arduino: Lesson #1: Getting Acquainted with the Kit EGN1007.
Ultrasonic Sensor Made By: 1.Hadeer Radwan 2.Alaa Mustafa 3.Amany Amr.
Applied Control Systems Robotics & Robotic Control
Sensors Material taken from Robotics with the Boe-Bot.
Physics 235 Robotics Workshop January 2007 Course Instructor: Tom Huber.
Program ultrasonic range sensor in autonomous mode
Programming Concepts Part B Ping Hsu. Functions A function is a way to organize the program so that: – frequently used sets of instructions or – a set.
PING))) Ultrasonic Distance Sensor living with the lab ultrasonic pressure waves from PING))) speaker The PING))) sensor emits short bursts of sound and.
A Bot With a Brain Using infrared obstacle detection circuits to create an autonomous robot that will navigate itself through an obstacle course. Bailey.
Computer Sensing and Control How is binary related to what we are trying to accomplish in electronics? The PC GadgetMaster II uses binary to communicate.
Programming Concepts (Part B) ENGR 10 Introduction to Engineering 1 Hsu/Youssefi.
Robotics Engineering Basic Maneuvers. Getting the Boe-Bot to Move One of the first tasks we need to do is to get our bots moving.One of the first tasks.
Maze Challenge Maze Challenge activity > TeachEngineering.org
How far does light travel in a year…?
Sensors Material taken from Robotics with the Boe-Bot.
Ultrasound L.O.: How can ultrasound be used to make images of unborn babies? What advantages does ultrasound imaging have over x-rays? How can ultrasound.
Material taken from Robotics with the Boe-Bot
1 Lecture on Lab 6 Lab 7 Lab 8. 2 Lab 6: Open Loop Controller As you learned in lab 5, there are two kinds of control systems: open loop and closed loop.
IR Communication Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
Negative Power or Negative Rotation makes robot go backwards. But if both are negative, the robot will go forward! Move Steering Block.
IR Communication Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
By Eric Greene RMS / I. S. 192 Q. Smart Start Question How would you get the robot to flirt with disaster by touching the edge of the “table” as many.
Robotics NXT-G: variables, file Rotation sensor Lab: Use buttons to hit specific ball. Homework: Postings. Start planning mapping the room.
Sonar Sensor Project Polaroid Sonar Sensor Details of the Project
PHY 235 Robotics Workshop Day 2 ZX-24a Microcontroller, Servo Review, and I/O.
PHY 235 Robotics Workshop Day 4 Robotic Behaviors, Light Sensing, Voltage Dividers, LCD-MOD.
RTLS. LOCATING / POSITIONING SYSTEMS A positioning system is a mechanism for determining the location of an object in space Interplanetary systems Global.
Using IR Chapters 7 & 8 of Robotics with the Boe-Bot.
1 RoboticsPresents KaaShiv InfoTech For Inplant Training / Internship, please download the "Inplant training registration form" from our website
PHY 235 Robotics Workshop Day 8 IO, Multi-tasking Sample Start Program Team Projects.
EV3 Software EV3 Robot Workshop
TechKnowTone Contents: Sensor Features Sensor Connections Sample Sketch Questions …Sensor Features… Arduino Coding – Distance Sensors.
ROBOTC Software EV3 Robot Workshop
Robot Project by Ahmad Shtaiyat Supervised by Dr. Salem Al-Agtash.
AAPT workshop W03 July 26, 2014 Saint Cloud State University, MN, USA
Istituto Tecnico Industriale A.Monaco EURLAB Object Detection Object Detection by Ultrasonic How to install and program a ultra sonic sensor with Arduino.
Istituto Tecnico Industriale A.Monaco EURLAB Object Detection Object Detection by Ultrasonic How to install and program a ultra sonic sensor with Arduino.
Forward Until Near Stop when near a wall.
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Introduction to Servos
ULTRASONIC DISTANCE METER USING 8051
IR Communication Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
Ultrasonic Distance Sensor
How an Ultrasonic Range Finder works
IR Control Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
Sensors For Robotics Robotics Academy All Rights Reserved.
Vex Ultrasonic Sensor (US) Interfacing and Programming
LEGO Robotics Ultrasonic Sensor
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Internet-of-Things (IoT)
Ultrasonic Distance Sensor
Compiled from various Internet sources Presented by Mr. Hatfield
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
CTY SAR FCPS Alexander Velikanov
Ultrasonic Distance Sensor
Presentation transcript:

PHY 235 Robotics Workshop Day 5 Distance Sensing Using The Ultrasonic Ping Sensor

Distance Detecting In a previous class session we used an Infrared light source, along with an infrared detector, to determine if an object was blocking the Boe-bot. The infrared detector could be thought of as a crude measurer of distance. In this class session we will look at another (more accurate) way of determining distance – by using high frequency sound waves (ultrasound).

The Ping Sensor The Ping))) sensor measures distance. Range: 3 cms to 3.3 m. Highly Accurate (to within 1 or 2 cm)

How does it work? 1.The ZX-24a sends out a short pulse to the Ping to tell it to start execution. 2.Ping waits a short time, (so ZX-24a can generate a pulseIn command). 3.Ping sends a HIGH (1) signal to ZX-24a, then sounds a short burst of 40Khz sound towards an object.

How does it work? 4.When Ping receives an echo, sends a LOW to ZX-24a. 5.ZX-24a stores the time between HIGH and LOW signals as a measure of distance.

Ultrasound

Activity 1 Locate the Ping Ultrasound sensor. (Your instructor will distribute) Find three Jumper wires. Build this circuit

Activity 1 - Code The Ping))) sensor needs a start pulse from the ZX-24a to start its measurement. A pulse to P15 that lasts 10 μs and goes from 0->1 is given by pulseOut (15, 5, 1)

Activity 1 - Code After the start pulse is sent, we change pin15 to an input pin and use a pulseIn command to store the duration of the Ping))) sensor's echo pulse. pulseIn(p15, 1, time) The pulseIn command stores in the variable time the round trip time for the Ping))) sensor's chirp to get to the object, reflect, and return.

PulseIn PulseIn(pin, level, var) From the help page: “ This routine waits for the input pin to be in the idle state (the opposite of that specified by the level parameter), waits for it to change to the specified logic level and then measures the time that it stays at that level. The pulse width is stored in the specified variable and has units of seconds with a default resolution of approximately 1.085µs”

Activity 1 Here is code for testing the Ping sensor: const p15 as byte = 20 dim time as single Sub Main() do call putpin(p15, 0) ' set p15 as output pin, output = 0 call pulseout(p15, 5, 1) ' send a 10 microsec start pulse on p15 call putpin(p15, 2) ' set p15 as input pin call pulsein(p15, 1, time) 'record time to transition from 0->1->0 debug.print " time="; time loop End Sub

Activity 1 Recall how the PING sends its return pulse. The pulseIn command allows us to capture this return pulse.

Activity 1 Test this program by measuring the timing values of a few close-up objects. For close-up measurements, the Ping))) sensor only needs to be 8 to 10 cm above a flat surface. However, if you are measuring objects that are more than a half a meter away, you may need to elevate your Ping))) sensor to prevent echoes from the floor (or table) registering as detected objects.

Activity 1 – Calibrating Ping How does the number recorded in the time variable related to actual distance? pulseIn measures time in units of seconds Thus, the time taken for the sound wave to go from the ping to an object and back again is = time However, we need to divide this value by 2, to find the time it takes for the sound wave to reach the object.

Activity 1 – Calibrating Ping Now, Sound travels 1 cm in about μs. So, the distance to the object should be about Distance = time/(2* ) Use your Boe-bot and a ruler to verify that this formula is approximately correct.

Activity 1 – Metric Ping const p15 as byte = 20 dim time as single dim cm as single Sub Main() do call putpin(p15, 0) ' set p15 as output pin, output = 0 call pulseout(p15, 5, 1) ' send a 10 microsec pulse on p15 call putpin(p15, 2) ' set p15 as input pin call pulsein(p15, 1, time) 'record time to transition from 1->0 cm = time / (2.0* ) debug.print "cm ="; cm loop End Sub

Ping Restrictions The Ping sensor cannot reliably detect objects that are: Too close Too far Too small At too great an angle

Activity 2 You are to create a 3-prong wire harness for the Ping sensor so that it can be mobile with respect to the Boe- bot. You will need to do some soldering for this task. Your instructor will demonstrate. Next you are to create a platform for the Ping sensor that is made from a small PC board and attach this to the side of the Boe-bot with screws and nuts. Again, your instructor will demonstrate.

Activity 2 Next, use your new Ping sensor board to create a program that will allow the Boe-bot to follow along a wall, at a specified distance from the wall (+- a small error amount). For example, the Boe-bot should be able to move parallel to a wall at a distance of 10cm (+- 2 cm) from the wall at all times. (See next slide) If you finish early, modify your program so that the Boe-bot can navigate corners. That is, it should be able to reach a corner, turn, and continue wall following. (You may need to add other sensors to do this).

Activity 2 10cm8cm12cm