Program ultrasonic range sensor in autonomous mode

Slides:



Advertisements
Similar presentations
1 Signals, Circuits, and Computers John Athanasiou Part B Spring 2010.
Advertisements

LabView Basics.
Sensors.
Automation and Robotics
VEX and Robot C Chris Patterson Presented by Modified by J. Andazola.
Vex Robotics Introduction to Sensors. introduction to sensors Sensors assist robots in seeing and feeling the physical world through which they travel.
VEX Robotics Platform and ROBOTC Software
Programing Concept Ken Youssefi/Ping HsuIntroduction to Engineering – E10 1 ENGR 10 Introduction to Engineering (Part A)
Available at: – Program Optical Quad Encoders in Autonomous Mode Program optical quad encoders in autonomous mode.
An Intro to Robots and Computer Programming
Introduction to Sensors
Available at: – Program Potentiometer in Autonomous Mode Program potentiometer in autonomous mode.
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.
Testbed: Exercises.
Xtreme Robot Olympiad Programming with Sensors Dr. Peter Laz Associate Professor Department of Engineering University of Denver.
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.
Introduction to the Basic Parts of LEGO’s NXT Robotics
The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Class 2.
ROBOTC for VEX On-Site Professional Development
Available at: – Operate the Tumbler using a Jumper Pin Operate the Tumbler using the jumper pin.
Weston Schreiber & Joshua Gabrielse Robotics Summer Training Programming #1: EasyC Basics.
Programming Concepts (Part B) ENGR 10 Introduction to Engineering 1 Hsu/Youssefi.
Available at: Lesson 3.6 – Program Line Follower in Autonomous Mode Program Line Follower in Autonomous Mode.
EV3 Workshop Oct 3, 2015 Instructor: Chris Cartwright
VEX Robotics Design System Sensors A Brief Overview
Available at: Lesson 3.5 – Program Light Sensor in Autonomous Mode Program Light Sensor in Autonomous Mode.
Real-Time Data through Data Hubs. Begin by adding a basic Move block, 5 rotations 75% power.
Negative Power or Negative Rotation makes robot go backwards. But if both are negative, the robot will go forward! Move Steering Block.
Sentry System Multiple Sensors
Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions.
PHY 235 Robotics Workshop Day 5 Distance Sensing Using The Ultrasonic Ping Sensor.
The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Class3/Lab 2.
Available at: – Program Functions to Accept Values Program Functions to Accept Values.
Programming - Motion Intro to Robotics. Motors and Sensors Setup The first thing we need to do is tell ROBOTC that we have motors on our robot. Choose.
Available at: – Program Functions for VEX Robots Program Functions for VEX Robots.
VEX and Robot C Chris Patterson Frisco ISD CTE Center Presented by.
Obstacle Detection. In the previous program the robot moves forward and then checks for something in the way. As we observed it only checks for things.
Vex Robotics program three: using motors and sensors together.
Casne.ncl.ac.uk Taking care of the CrumbleBot Please do NOT stress the robot's motors 1.Do NOT push the robot 2.Do NOT hold the.
Mechanical Components and Programming Ken Youssefi Introduction to Engineering – E10 1.
MEH108 - Intro. To Engineering Applications KOU Electronics and Communications Engineering.
Lego Mindstorm Robots 9797 kit.  Students will learn how to identify how to detect a change in a condition.  Students will learn where and how to identify.
Forward Until Near Stop when near a wall.
ROBOTC for VEX Online Professional Development. Homework Questions Thoughts? Questions?
Project Overview  Introduction  Clawbot Build  Design Modification  Design Development  Programming  Sensors  Advanced Sensors  Open design challenges.
Basic Programming: Until Commands. The Problem with Wait States Motor Speed is affected by battery power. –If the battery is fully charged, the motors.
Python Programming Module 4 Sensors and Loops Python Programming, 2/e1.
ROBOTC for CORTEX Teacher Training © 2011 Project Lead The Way, Inc. Automation and Robotics VEX.
Robotics Education & Competition Foundation
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Programming & Sensors.
NXT Mindstorms Kit Programming
VEX IQ Curriculum Smart Machines Lesson 09 Lesson Materials:
Exploring Computer Science Lesson 6-5
ROBOTC for VEX Online Professional Development
ROBOTC for VEX On-Site Professional Development
Ultrasonic Distance Sensor
ROBOTC for VEX Online Professional Development
Project Overview Introduction Clawbot Build Design Modification
Vex Ultrasonic Sensor (US) Interfacing and Programming
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Sensors Training.
Automation and Robotics
Obstacle Detection Ultrasonic Sensor.
Introductory Presentation
Storing Values as Variables
Robotics Programming Using Shaft Encoders
Obstacle Detection.
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Ultrasonic Distance Sensor
Presentation transcript:

Program ultrasonic range sensor in autonomous mode

Program ultrasonic range sensor in autonomous mode Performance Objective: Given the components of a VEX robotics design system program an ultrasonic range sensor in autonomous mode to have the robot travel forward until it is 12 inches from the wall. Enabling Objectives: explain the purpose of an ultrasonic range sensor explain how an ultrasonic range sensor operates draw a flow chart for using an ultrasonic range sensor program an ultrasonic range sensor

Ultrasonic range sensor An ultrasonic range sensor enables a robot to detect obstacles in its path by utilizing the propagation of high-frequency sound waves The sensor emits a sound wave, which bounces off a reflective surface and returns to the sensor Then, using the amount of time it takes for the wave to return to the sensor, the distance to the object can be computed The distance is returned as a distance in inches

Sound waves The beam pattern coming from the ultrasonic sensor looks like the images to the right

Sound waves The sensitivity of the sensor depends on the objects’ surfaces that are detected by the emitted sound waves For example, a reflective surface may produce a different reading than a non-reflective surface

Verifying the sensor Plug the sensor into two digital ports Vex Ultrasonic Sensors are labeled with reference to the sensor, so the input cable coming from the sensor should be connected as a digital output on the robot controller Open easyC and download the Ultrasonic test file Move the robot and notice the change in value of the sensor

Program the ultrasonic ranger sensor The Start command tells the ultrasonic sensor to start recording sound waves The Get command allows you to store the feedback from the sensor into a variable The Stop command tells the ultrasonic sensor to stop recording

Program the ultrasonic ranger sensor Program a VEX robot equipped with an ultrasonic range sensor to move forward until the robot is 12 inches from a wall Draw the flow chart of a program that can complete the above task

Program the ultrasonic ranger sensor Open a new competition project and configure the microcontroller for the ultrasonic ranger finder Add a variable for the ultrasonic range sensor Insert an appropriate driving mode block into the operator tab

Program the ultrasonic ranger sensor Insert a block to start the ultrasonic range sensor Insert a block to get the ultrasonic variable value NOTE: The wire from the sensor labeled output is the interrupt port in the program, and the wire labeled input on the sensor is the output port in the program

Program the ultrasonic ranger sensor Insert a while loop to run while the ultrasonic sensor is greater than 16 In the while loop get the ultrasonic variable value again Insert the appropriate motor blocks to make the robot move forward NOTE: Because of processing speed in the microcontroller, you must add four inches to the distance you want the robot to stop when the motors are running at full speed (to stop the robot at 12 inches, the sensor must read until 16 inches)

Program the ultrasonic ranger sensor After the while loop insert blocks to stop the motors, if you do not stop the motors they will continue to run even if the sensor is no longer greater than the value in the if statement

Test time Download your code and test it to see if the robot stops 12 inches from the wall If it does, show your instructor! If the robot does not stop correctly, go back through the lesson and double check your code For more technical information on the ultrasonic range sensor visit: http://www.vexforum.com/wiki/index.php/Ultrasonic_Range_Finder