Vex Ultrasonic Sensor Interfacing and Programming Guide

Slide Note
Embed
Share

Understand how to interface and program a Vex Ultrasonic Sensor, which utilizes high-frequency sound waves to measure distances. Learn the proper connections to the controller and explore the programming statements for initiating and reading sensor values. Delve into configuring the Cortex Controller and interpreting sensor data for obstacle detection.


Uploaded on Jul 11, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Vex Ultrasonic Sensor (US) Interfacing and Programming

  2. Ultrasonic Sensors Generally have a transmitter and receiver. d = (v)(t) Round-Trip Distance Transmits a high- frequency sound. d = (v)(t)/2 One-Way Distance Waits to receive echo. Calculates distance based on time it took to receive the echo. d = distance, v = speed of sound, t = time to receive echo 2

  3. The Vex Ultrasonic Sensor INPUT Sends ultrasonic wave Connect to digital output of the controller OUTPUT Receives the echo Connect to the input of the controller The labeling is a bit counter-intuitive! 3

  4. Connecting the sensor to the controller

  5. Ultrasonic Sensor Programming The following statement starts an ultrasonic sensor i.e., the sensor starts sending and recording the sound signals. Sensor connected to output port 6 through which it receives digital control signals from the controller. StartUltrasonic ( 5, 6 ) ; Sensor connected to input port 5 Select start Youssefi 5

  6. Ultrasonic Sensor The following statement is used to read a value from the sensor Range = GetUltrasonic ( 5 , 6 ); The sensor is connected to output port # 6 on the controller Variable into which the translated value is stored Input to Ultrasonic port #5 Select Get option Define variable Range Youssefi 6

  7. Cortex Controller Select Config to Change input port #6 to an output port Change port 6 from input to output by clicking on the circle Digital ports taken by the IRB Hsu/Youssefi 7

  8. Input to Ultrasonic sensor connected to output port 6 on controller Output from Ultrasonic sensor connected to input port 5 on controller Checking if the obstacle is near or far Hsu/Youssefi 8

Related