Ultrasonic Distance Sensor HC-SR04

Infrared IR Sensor for Line Follower Robot

SKU: MW-HC-SR04
promocoes

First Purchase Coupon

Is this your first purchase? Take advantage of our campaign now!

MICROWIRE5

Original price was: 3,90 €.Current price is: 3,51 €.

In stock

In stock

...
camion

24H Express Shipping

diamante

Guaranteed Products

entrega

+6000 References in Stock

devolucion

Returns 14 days

Description

The HC-SR04 Ultrasonic Distance Sensor was developed to perfect robotics and electronics projects, it is ideal for accurately calculating the distance of objects. This module has a ready-made circuit with emitter and receiver coupled and 4 pins (VCC, Trigger, ECHO, GND) for the measurement.

The HC-SR04 is a Distance Sensor consisting of an emitter and a receiver, capable of measuring distances from ~2cm to ~4m, with an accuracy of approximately 3mm. This sensor emits ultrasonic signals that reflect off the object to be hit and return to the sensor, indicating the distance from the target.

The speed of the ultrasonic signal emitted by the Sensor HC-SR04 It corresponds to the speed of sound, which is approximately 340 m/s, so if the sensor is at x distance from the object, the signal will travel a distance equivalent to 2x, that is, the wave is sent by the sensor and bounced off the obstacle, so it travels 2 times the distance sought.

For better organization, you can attach this sensor to this distance sensor holder, making it easier to prototype your project.

Characteristics:
• Power supply: 5V DC;
• Operating Current: 2mA;
• Angle of effect: 15°;
• Range.: 2cm~4m;
• Accuracy.: 3mm;
• Connection modes: VCC, trig (T), echo (R) and GND;
• Ideal for use on Arduino, PIC and other microcontrollers;
• Datasheet SGM324.

Use:

Ultrasonic Distance Sensor HC-SR04

Sample Code:

Library used: https://github.com/ErickSimoes/Ultrasonic

Program: Connect the HC-SR04 Ultrasonic Sensor to the Arduino

 

Loads the ultrasonic sensor library

<#include Ultrasonic.h>

 

Sets the pins for the trigger and echo

#define pino_trigger 4

#define pino_echo 5

 

Initializes the sensor to the pins defined above

Ultrasonic ultrasonic(pino_trigger, pino_echo);

 

void setup()

{

Serial.begin(9600);

Serial.println(“Reading sensor data…”);

}

 

void loop()

{

Reads sensor information, in cm and in.

float cmMsec, inMsec;

cmMsec = ultrasonic.distanceRead(CM);

inMsec = ultrasonic.distanceRead(INC);

 

Displays information on the serial monitor

Serial.print(“Distance in cm: “);

Serial.print(cmMsec);

Serial.print(” – Distance in inches: “);

Serial.println(inMsec);

delay(1000);

}

Is your equipment having problems?
We replace screens and batteries, increase memory and much more. 🛠️
Trust our experience to restore the functionality of your equipment 👌🏼
Simulate the Repair Cost Now!

Specifications

Product Reviews

0 reviews
0
0
0
0
0

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.