1. Introducere și Pesteview
The ELEGOO HC-SR04 Ultrasonic Module is a device designed for non-contact distance measurement. It operates by emitting ultrasonic sound waves and measuring the time it takes for the echo to return, thereby calculating the distance to an object. This module is suitable for various applications requiring distance sensing, such as obstacle avoidance in robotics and level sensing.
This manual provides detailed instructions for the setup, operation, and maintenance of your HC-SR04 Ultrasonic Module.

2. Caracteristicile produsului
- Non-contact distance measurement using ultrasonic technology.
- Integrated ultrasonic transmitter, receiver, and control circuit.
- Measures distances from 3 cm to 450 cm.
- High ranging accuracy of up to 3 mm.
- Low quiescent current consumption (less than 2mA).
- Wide effectual angle of less than 15 degrees.
- Compatible with various microcontrollers like Arduino UNO, MEGA, and Nano.
3. Conținutul pachetului
Fiecare pachet conține următoarele articole:
- 5 x ELEGOO HC-SR04 Ultrasonic Modules
- Connecting jumper wires (quantity may vary, typically enough for basic connections)

4. Informații de siguranță
Avertizare:
- Keep this product away from children under 3 years old due to small parts.
- Asigurați-vă că volumul corespunzătortage supply (5V DC) to prevent damage to the module or connected devices.
- Handle with care to avoid electrostatic discharge, which can harm electronic components.
5. Configurare
The HC-SR04 module has four pins: VCC, Trig, Echo, and GND. Follow these steps for basic connection to a microcontroller (e.g., Arduino):
- Connect VCC: Connect the VCC pin of the HC-SR04 module to the 5V output pin of your microcontroller.
- Connect GND: Connect the GND pin of the HC-SR04 module to the GND pin of your microcontroller.
- Connect Trig: Connect the Trig (Trigger) pin of the HC-SR04 module to a digital output pin on your microcontroller (e.g., Arduino Pin 9). This pin sends the ultrasonic pulse.
- Connect Echo: Connect the Echo pin of the HC-SR04 module to a digital input pin on your microcontroller (e.g., Arduino Pin 10). This pin receives the reflected ultrasonic pulse.
Nota: If connecting to a 3.3V microcontroller (like Raspberry Pi), a voltage divider circuit is required for the Echo pin to prevent damage, as the HC-SR04's Echo pin outputs 5V.

6. Principii de funcționare
The HC-SR04 module operates on the principle of sonar. Here's how it works:
- The microcontroller sends a short pulse (e.g., 10 microseconds) to the Trig pin.
- This pulse causes the ultrasonic transmitter to emit a burst of 8 cycles of 40 kHz ultrasonic sound waves.
- These sound waves travel through the air. If they encounter an object, they reflect off its surface.
- The reflected sound waves (echo) are detected by the ultrasonic receiver.
- The Ecou pin goes HIGH for the duration that the sound waves travel from the transmitter, reflect off the object, and return to the receiver.
- The microcontroller measures the duration of this HIGH pulse on the Echo pin.
- The distance is calculated using the formula:
Distance = (Time of Flight * Speed of Sound) / 2
(Divided by 2 because the sound travels to the object and back).

7. Funcționare
To operate the HC-SR04 module, you will need to write code for your microcontroller. Below is a conceptual exampchiul pentru Arduino:
7.1. Arduino Code Example (Conceptual)
// Define pins
const int trigPin = 9;
const int echoPin = 10;
void setup() {
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
Serial.begin(9600); // Initialize serial communication
}
void loop() {
// Clear the trigPin by setting it LOW for 2 microseconds
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
// Set the trigPin HIGH for 10 microseconds to send a pulse
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Measure the duration of the pulse on the echoPin
long duration = pulseIn(echoPin, HIGH);
// Calculate the distance (speed of sound in air is approximately 343 meters/second or 0.0343 cm/microsecond)
// Distance = (duration * 0.0343) / 2; // in cm
// Or, more commonly, duration / 58 for cm, or duration / 148 for inches
float distanceCm = duration / 58.0;
// Print the distance to the Serial Monitor
Serial.print("Distance: ");
Serial.print(distanceCm);
Serial.println(" cm");
delay(1000); // Wait for 1 second before the next measurement
}
Upload this code to your Arduino board. Open the Serial Monitor in the Arduino IDE to view the distance readings.
7.2. Aplicații
The HC-SR04 module is versatile and can be used in:
- Robotics for obstacle detection and navigation.
- Automated systems for level sensing (e.g., water tank levels).
- Security systems for proximity sensing.
- Interactive art installations.

8. Întreținere
The HC-SR04 Ultrasonic Module requires minimal maintenance. Follow these guidelines to ensure its longevity and accurate performance:
- Păstra curat: Ensure the ultrasonic transducers (the two "eyes" on the module) are free from dust, dirt, or moisture. Use a soft, dry cloth to gently clean them if necessary.
- Evitați daunele fizice: Protect the module from impacts or excessive force, which can damage the transducers or the circuit board.
- Depozitare adecvată: When not in use, store the modules in an anti-static bag in a dry environment to prevent electrostatic discharge and moisture damage.
- Sursă de alimentare stabilă: Always provide a stable 5V DC power supply. Fluctuations can affect performance or damage the module.
9. Depanare
| Problemă | Cauza posibila | Soluţie |
|---|---|---|
| No readings or erratic readings |
|
|
| Modulul nu pornește |
|
|
| Citiri inexacte ale distanței |
|
|
10. Specificații
| Parametru | Valoare |
|---|---|
| Numărul de model | EL-SM-001 |
| Vol. De operaretage | 5V DC |
| Curent de repaus | Mai puțin de 2mA |
| Unghiul efectiv | Mai puțin de 15° |
| Distanta de distanta | 3 cm - 450 cm |
| Rezoluţie | 0.3 cm |
| Dimensiunile produsului | 0.59 x 1.77 x 1.18 inci (aprox. 1.5 x 4.5 x 3 cm) |
| Greutate | 0.32 uncii (aproximativ 9 grame) |

11. Garanție și asistență
Pentru informații despre garanție și asistență tehnică, vă rugăm să consultați pagina oficială ELEGOO. website-ul web sau contactați direct serviciul lor de asistență pentru clienți. Detaliile sunt de obicei furnizate pe ambalajul produsului sau pe eticheta producătorului. website-ul.
Manufacturer: ELEGOO
Pentru asistență suplimentară, vizitați: www.elegoo.com