

The US100 Ultrasonic Sensor, manufactured by Arduino and Raspberry, is a versatile distance-measuring device that uses ultrasonic waves to determine the distance between the sensor and an object. By emitting sound waves and calculating the time it takes for the echo to return, the US100 provides accurate distance measurements in a wide range of applications.








The US100 Ultrasonic Sensor is designed for precision and ease of use. Below are its key technical details:
| Parameter | Specification |
|---|---|
| Operating Voltage | 2.4V to 5.5V |
| Operating Current | ≤ 2.0 mA |
| Measuring Range | 2 cm to 450 cm |
| Accuracy | ± 0.3 cm |
| Operating Temperature | -20°C to 70°C |
| Communication Interface | UART (9600 bps) or Trigger/Echo Pins |
| Trigger Pulse Width | ≥ 10 µs |
| Echo Pulse Output | Width proportional to distance |
The US100 sensor has four pins, as described in the table below:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply pin (2.4V to 5.5V). Connect to the 5V pin of your microcontroller. |
| 2 | Trig/TX | Trigger pin for initiating ultrasonic pulses or TX pin for UART communication. |
| 3 | Echo/RX | Echo pin for receiving reflected signals or RX pin for UART communication. |
| 4 | GND | Ground pin. Connect to the ground of your circuit. |
The US100 Ultrasonic Sensor can operate in two modes: Trigger/Echo Mode and UART Mode. Below are instructions for using the sensor in both modes.
Wiring:
VCC pin to the 5V pin of your microcontroller. GND pin to the ground. Trig pin to a digital output pin on your microcontroller. Echo pin to a digital input pin on your microcontroller.Operation:
Trig pin to initiate a measurement. Echo pin HIGH for a duration proportional to the distance. Echo pin to calculate the distance.Distance Calculation:
Use the formula:
[
\text{Distance (cm)} = \frac{\text{Echo Pulse Width (µs)}}{58}
]
Arduino Example Code:
// Define pins for the US100 sensor
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 trigger pin as output
pinMode(echoPin, INPUT); // Set echo pin as input
Serial.begin(9600); // Initialize serial communication
}
void loop() {
// Send a 10 µs HIGH pulse to the trigger pin
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Measure the duration of the HIGH signal on the echo pin
long duration = pulseIn(echoPin, HIGH);
// Calculate the distance in cm
float distance = duration / 58.0;
// 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
}
Wiring:
VCC and GND pins as described above. Trig/TX pin to the RX pin of your microcontroller. Echo/RX pin to the TX pin of your microcontroller.Operation:
Arduino Example Code:
#include <SoftwareSerial.h>
// Define RX and TX pins for SoftwareSerial
SoftwareSerial us100(10, 11); // RX = pin 10, TX = pin 11
void setup() {
Serial.begin(9600); // Initialize Serial Monitor
us100.begin(9600); // Initialize US100 UART communication
}
void loop() {
us100.write(0x55); // Send measurement command to US100
delay(100); // Wait for the response
if (us100.available() >= 2) { // Check if data is available
int highByte = us100.read(); // Read high byte of distance
int lowByte = us100.read(); // Read low byte of distance
int distance = (highByte << 8) + lowByte; // Combine bytes
Serial.print("Distance: ");
Serial.print(distance);
Serial.println(" cm");
}
delay(500); // Wait for 500 ms before the next measurement
}
VCC and GND pins to stabilize the power supply.No Response from the Sensor
Trig and Echo pins are connected to the correct microcontroller pins.Inaccurate Distance Measurements
Interference Between Multiple Sensors
UART Communication Issues
Trig/TX and Echo/RX pins are correctly connected to the microcontroller's RX and TX pins.Can the US100 measure distances below 2 cm?
No, the minimum measurable distance is 2 cm. Objects closer than this may not be detected accurately.
What is the maximum range of the US100?
The sensor can measure distances up to 450 cm under ideal conditions.
Can the US100 operate outdoors?
Yes, but ensure the sensor is protected from direct exposure to rain or extreme environmental conditions.
Is the US100 compatible with Raspberry Pi?
Yes, the US100 can be used with Raspberry Pi via GPIO pins or UART communication.