

The US-016 ultrasonic sensor, manufactured by Arduino (Part ID: US-016), is a highly reliable and accurate distance measuring device. It operates by emitting ultrasonic sound waves and calculating the time it takes for the echo to return after hitting an object. This time measurement is then used to determine the distance to the object based on the speed of sound.








The US-016 ultrasonic sensor is designed for precision and ease of use. Below are its key technical details:
| Parameter | Specification |
|---|---|
| Operating Voltage | 5V DC |
| Operating Current | ≤ 3 mA |
| Measuring Range | 2 cm to 350 cm |
| Accuracy | ± 0.3 cm |
| Operating Frequency | 40 kHz |
| Output Signal | PWM (Pulse Width Modulation) |
| Trigger Input Signal | 10 µs TTL pulse |
| Echo Output Signal | PWM signal, proportional to distance |
| Operating Temperature | -20°C to 70°C |
| Dimensions | 45 mm x 20 mm x 15 mm |
The US-016 sensor has four pins, as described in the table below:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply pin. Connect to 5V DC. |
| 2 | Trig | Trigger pin. Send a 10 µs TTL pulse to initiate distance measurement. |
| 3 | Echo | Echo pin. Outputs a PWM signal proportional to the measured distance. |
| 4 | GND | Ground pin. Connect to the ground of the power supply. |
Below is an example of how to use the US-016 ultrasonic sensor with an Arduino UNO:
// Define pin connections
const int trigPin = 9; // Trigger pin connected to digital pin 9
const int echoPin = 10; // Echo pin connected to digital pin 10
void setup() {
pinMode(trigPin, OUTPUT); // Set the trigger pin as an output
pinMode(echoPin, INPUT); // Set the echo pin as an input
Serial.begin(9600); // Initialize serial communication at 9600 baud
}
void loop() {
// Send a 10 µs pulse to the trigger pin
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Measure the duration of the echo pulse
long duration = pulseIn(echoPin, HIGH);
// Calculate the distance in cm
float distance = (duration * 0.0343) / 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
}
No Output or Incorrect Readings
Unstable or Fluctuating Measurements
Sensor Not Detecting Objects
Slow Response Time
Q: Can the US-016 measure distances through transparent materials like glass?
A: No, the US-016 ultrasonic sensor cannot measure distances through transparent materials, as ultrasonic waves do not pass through them effectively.
Q: What is the maximum angle of detection for the US-016?
A: The US-016 has a detection angle of approximately 15 degrees. Ensure objects are within this angle for accurate measurements.
Q: Can I use the US-016 with a 3.3V microcontroller?
A: The US-016 requires a 5V power supply for proper operation. If using a 3.3V microcontroller, a level shifter is recommended for the Trig and Echo pins.