The Ultrasonic US-015 is a distance measuring sensor that uses ultrasonic waves to detect the distance to an object. It emits a sound wave and measures the time it takes for the echo to return, allowing it to calculate the distance based on the speed of sound. This sensor is widely used in robotics, automation, and obstacle detection systems due to its accuracy, reliability, and ease of use.
The Ultrasonic US-015 sensor has the following key technical details:
Parameter | Value |
---|---|
Operating Voltage | 5V DC |
Operating Current | ≤ 8 mA |
Measuring Range | 2 cm to 400 cm |
Measuring Accuracy | ±0.3 cm |
Operating Frequency | 40 kHz |
Trigger Input Signal | 10 µs TTL pulse |
Echo Output Signal | TTL level signal proportional to distance |
Dimensions | 45 mm x 20 mm x 15 mm |
The US-015 sensor has four pins, as described in the table below:
Pin | Name | Description |
---|---|---|
1 | VCC | Power supply pin (5V DC) |
2 | Trig | Trigger pin: Sends a 10 µs pulse to initiate measurement |
3 | Echo | Echo pin: Outputs a pulse width proportional to distance |
4 | GND | Ground connection |
Below is an example code to interface the Ultrasonic US-015 with an Arduino UNO:
// Define pins for the Ultrasonic US-015 sensor
const int trigPin = 9; // Trig pin connected to digital pin 9
const int echoPin = 10; // Echo pin connected to digital pin 10
void setup() {
pinMode(trigPin, OUTPUT); // Set Trig pin as output
pinMode(echoPin, INPUT); // Set Echo pin as input
Serial.begin(9600); // Initialize serial communication at 9600 baud
}
void loop() {
// Send a 10 µs HIGH pulse to the Trig pin
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Measure the duration of the HIGH pulse on the Echo pin
long duration = pulseIn(echoPin, HIGH);
// Calculate the distance in cm
float distance = (duration * 0.034) / 2;
// Print the distance to the Serial Monitor
Serial.print("Distance: ");
Serial.print(distance);
Serial.println(" cm");
delay(500); // Wait for 500 ms before the next measurement
}
pulseIn()
function measures the duration of the HIGH pulse on the Echo pin.No Output or Incorrect Readings
Fluctuating Distance Measurements
Sensor Not Detecting Objects
Echo Pin Always LOW
Can the US-015 measure distances below 2 cm?
What is the maximum range of the US-015?
Can the US-015 be used outdoors?
Is the US-015 compatible with 3.3V systems?
By following this documentation, users can effectively integrate the Ultrasonic US-015 sensor into their projects for accurate distance measurement.