Sale!

HC-SR04 Ultrasonic Distance Sensor Module / Test Board

Original price was: 9,47 €.Current price is: 6,86 €. Excluding VAT

Ultrasonic Distance Measurement Module / HC-SR04 Test Board / Serial Output / Digital Telemeter with Tube Display

2 in stock (can be backordered)

Domande su questo prodotto? Scrivi a Lana su WhatsApp

Category:

🎬 The product on video

Description

What it is

The HC-SR04 module is a digital rangefinder that measures distances using ultrasonic sound waves. This device provides an accurate reading of the distance between the module and surrounding objects, making it useful for various robotics and automation projects.

Features

  • Distance measurement using ultrasonic sound waves
  • Test card compatible with Arduino and ESP
  • Serial output for data communication

What it is for

The HC-SR04 module is ideal for projects requiring precise distance measurement, such as anti-slip systems for stairs or ramps, presence sensors, and robotics. It is compatible with Arduino and ESP.

Tutorial: How to use HC-SR04 Distance Measurement Module

The HC-SR04 module is a digital rangefinder that allows precise distance measurement using sound waves. It is ideal for home automation, robotics, and security systems projects.

What you need

  • Arduino uno or compatible
  • USB cable
  • jumper connectors

Steps

  1. Connect the HC-SR04 module to the Arduino using the jumper connectors. Check the datasheet for the correct pin positions.
  2. Load the provided Arduino sketch from the source code.
  3. Open the Arduino serial monitor and verify that distance measurements in centimeters are displayed.
  4. If the tube display is present, connect it to the HC-SR04 module following the datasheet diagrams.
  5. Configure the display to show the distance values received from the HC-SR04 module.
  6. Verify that the serial output and/or tube display correctly display the distance measurements.
  7. If necessary, add a software or hardware interrupt to adjust the measurement frequency.
  8. Test the module in various environments and conditions to verify its accuracy.

Example code

void setup() {
Serial.begin(9600);
}

void loop() {
long duration, distance;
digitalWrite(trigPin, LOW);
delayMicroseconds(2); // Trasmetti un impulso di alta durata per attivare il modulo
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = (duration / 2) * 0.034; // Converti la durata in distanza
Serial.print("Distance: ");
Serial.println(distance);
delay(500); // Ritardo di 500 ms prima della prossima lettura
}

Mini project

Create a slip-resistant system for stairs or ramps using the HC-SR04 module. The system alerts when an object is at a certain distance from the stairs.

Common mistakes

  • Incorrect pin connection
  • Trigger pulses too short
  • Insufficient module sensitivity for the environment

Recommended accessories

  • Arduino Uno R3 – ARD0011762
  • Jumper connector kit – ARD0011763
  • 16×2 Character LCD Tube Display – ARD0011764

Frequently asked questions

What is the precision of the HC-SR04 module?
Precision can vary between 0.3 and 5% in optimal conditions.

Can the module work with other microcontrollers besides Arduino?
Yes, but it may be necessary to modify the sketch or hardware to adapt it to the new microcontroller.

Reviews

There are no reviews yet.

Be the first to review “HC-SR04 Ultrasonic Distance Sensor Module / Test Board”

Your email address will not be published. Required fields are marked *