The document provides instructions for using an ultrasonic distance sensor from Adafruit. It explains that the sensor works by emitting ultrasonic sound pulses and measuring the time it takes for the pulses to bounce back, allowing it to determine the distance of objects. It notes the sensor connects to the Arduino with connections to 5V, GND, and AN pins. The document advises reading the datasheet for more details on using the sensor and preventing interference when multiple sensors are used.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
33 views1 page
Ultrasonic Sensor Tutorial
The document provides instructions for using an ultrasonic distance sensor from Adafruit. It explains that the sensor works by emitting ultrasonic sound pulses and measuring the time it takes for the pulses to bounce back, allowing it to determine the distance of objects. It notes the sensor connects to the Arduino with connections to 5V, GND, and AN pins. The document advises reading the datasheet for more details on using the sensor and preventing interference when multiple sensors are used.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1
ENGRI 1820
ELCA Fall 2015
How to use Ultrasonic Sensor
The ultrasonic distance sensor provided is from adafruit (https://www.adafruit.com/products/980). There are several types on adafruit, not sure which one you have, but the interface should be the same. You should have soldered headers onto the sensor to interface with it. You can see what pins mean what in the picture to the lower right and in the little slip that came with the sensor. Theres a lot there, but you only need to care about 5V, GND, and AN. Connect 5V to 5V, GND to GND, and AN to an analog input pin on the Arduino. Use Serial.println() in your code and serial monitor to find out what values the Arduino is getting from the sensor as an object gets closer and further Inside the casing is a little speaker that emits ultrasonic (high frequency) sound, and a microphone. Theres some electronics inside to change the output voltage based on the time it takes for an ultrasonic pulse to bounce back. Because of how sound can reflect off objects, this type of sensor can mess up a lot when trying to get precise distance measurements. Thankfully, this project should not require anything too precise. Read the datasheet for the sensor, you can find it on the Adafruit site I linked before. It has good information about the sensor, like how to prevent multiple sensors from interfering with one another, and have nothing be near it when it starts up to allow it to calibrate properly.