Previous
Arduino Nano R3 ATmega328P Microcontroller Board – Dream RC Bangladesh

Arduino Nano R3

Original price was: 450.00৳ .Current price is: 369.00৳ .
Next

IR Infrared Sensor

Original price was: 80.00৳ .Current price is: 59.00৳ .
IR Infrared Obstacle Sensor Module for Arduino – Dream RC Bangladesh

Ultrasonic Sonar Sensor

Original price was: 120.00৳ .Current price is: 89.00৳ .

The HC-SR04 Ultrasonic Sensor uses sonar to measure distance accurately between 2cm and 400cm. Ideal for obstacle detection in robotics and automation. Available at the best price in Bangladesh from Dream RC.


🚚 Delivery & Shipping Information

📦 Inside Dhaka:     →    69 BDT  ( 24 Hours )

📦 Outside Dhaka:  →  129 BDT  ( 24 – 72 hours )


🛡️ Carefully Packed To Ensure Safe Delivery

⚡ Fast Order Processing & Quick Dispatch

✅  COD Available →  Pay After Receiving Your Parcel

74 in stock
Add to Wishlist
Add to Wishlist
Trust Badge Image

Description

The HC-SR04 Ultrasonic Distance Sensor is a popular and affordable sensor module used in robotics and automation systems to detect objects and measure distance using ultrasonic waves.

It works by emitting a high-frequency sound pulse and measuring the time it takes to reflect back. With a wide detection range and easy-to-use 4-pin interface, it integrates perfectly with Arduino, Raspberry Pi, and other microcontroller platforms.

🔍 What This Sensor Is & What It Does

The HC-SR04 Ultrasonic Sensor measures distance using sound waves.
It sends out an ultrasonic pulse and measures how long it takes to bounce back.
Perfect for:

  • ✅Obstacle detection

  • ✅Robotics & car avoidance

  • ✅Smart dustbin

  • ✅Water tank level

  • ✅Security motion detection

  • ✅Autonomous robots

  • ✅Parking assist

  • ✅Industrial distance sensing

Whether you’re building a line-following robot, obstacle-avoiding car, or smart parking system — this is the go-to sensor. Get it now from Dream RC, Bangladesh’s trusted robotics supplier.


⚙️ Product Features & Specifications

🔧 Feature📌 Details
🌊 Measurement MethodUltrasonic (Sonar Echo)
📏 Measuring Range2 cm – 400 cm
🎯 Accuracy±3 mm
📐 Measuring Angle< 15°
🔌 Operating Voltage5V DC
⚡ Operating Current15 mA typical
💬 Output SignalDigital (Trigger & Echo)
📡 Trigger Pulse Input10µs TTL pulse
⏱️ Response Time< 30 ms
🔗 Interface PinsVCC, Trig, Echo, GND
📐 Dimensions45 mm x 20 mm x 15 mm
⚖️ WeightApprox. 10g
💻 CompatibilityArduino, ESP32, Raspberry Pi, STM32, etc.

Power Requirements

RequirementDetails
Operating Voltage5V DC
Current Consumption15mA (typical)
Trigger Pin Logic5V
Echo Pin OutputAny Digital Pin
Max Range400 cm
Min Range2 cm

📦 Package Includes

  • 1 x HC-SR04 Ultrasonic Distance Sensor Module


🔌 Wiring Diagram (Arduino UNO)

HC-SR04 → Arduino UNO

Ultrasonic / Sonar Sensor Arduino Connection Diagram Dream RC
Ultrasonic Sensor / Sonar Sensor Connection Diagram With Arduino Uno Dream RC

 

HC-SR04 PinConnect To
VCC5V
TRIGD13
ECHOD12
GNDGND

💻 Arduino Sample Code (Beginner-Friendly)

Ultrasonic Sensor / Sonar Sensor Sample / Demo Code For Arduino, ESP 32 & ESP 8266

// Dream RC (dream-rc.com) - Ultrasonic Sensor Code

#define TRIG 13    // TRIG pin (ESP8266: D5, ESP32: 4)
#define ECHO 12    // ECHO pin (ESP8266: D6, ESP32: 5)

void setup() {
  Serial.begin(9600);   // #(ESP recommended: 115200)
  pinMode(TRIG, OUTPUT);
  pinMode(ECHO, INPUT);
}

void loop() {
  digitalWrite(TRIG, LOW);
  delayMicroseconds(2);
  
  digitalWrite(TRIG, HIGH);
  delayMicroseconds(10);
  digitalWrite(TRIG, LOW);
  
  long duration = pulseIn(ECHO, HIGH);
  float distance = duration * 0.034 / 2;    // Convert Time to CM

  Serial.print("Distance: ");
  Serial.print(distance);
  Serial.println(" cm");

  delay(500);   // Add Delay To The Parogram
}

📌Library Dependencies

No external libraries required.
The HC-SR04 uses only built-in Arduino functions:

  • ✅digitalWrite()

  • ✅digitalRead()

  • ✅pulseIn()

  • ✅delayMicroseconds()


📤 Sample Serial Output

Distance: 24 cm
Distance: 25 cm
Distance: 24 cm
Distance: 23 cm
Meaning:
  • Values fluctuate ±1 cm — normal

  • “0 cm” = no object or weak echo

  • Large numbers = too far or wrong wiring


🎯 Accuracy Table

DistanceExpected Accuracy
2–50 cm± 0.3 cm
50–200 cm± 1 cm
200–400 cm± 3 cm
Soft objects (cloth/foam)Poor / No reading
Sunlight / OutdoorAccuracy reduces

🔧 Troubleshooting Guide

✔ Always getting 0❓

  • ❌Object too soft (cloth, sponge)

  • ❌Wrong wiring TRIG/ECHO

  • ❌Using 3.3V instead of 5V

  • ❌Bad USB power

✔ Random unstable readings

  • ✅Use short wires (<20cm)

  • ✅Add capacitor (10–100 µF) across VCC–GND

  • ❌Avoid vibration from motors

✔ ESP32/ESP8266 not working

  • ✅Echo must be reduced to 3.3V

  • ✅Use 10k + 5k voltage divider

✔ Always shows same value

  • ✅TRIG not receiving 10µs pulse

  • ✅Code running too fast (add delay)


🧩 Compatibility Table

BoardCompatible?Notes
Arduino UNOWorks perfectly
Arduino MegaSame pins
Arduino Nano5V logic
ESP8266Works perfectly
ESP32Works perfectly
Raspberry Pi⚠️Requires level shifting
STM32Works directly

💡 Popular Project Ideas

  • ✅Smart Dustbin

  • ✅Water Tank Level Monitor

  • ✅Obstacle Avoiding Robot

  • ✅Parking Distance System

  • ✅Motion Trigger Alarm

  • ✅Automatic Door Opener

  • ✅Smart Blind Stick

  • ✅RC Collision Prevention System


FAQ (Frequently Asked Questions)

1. What is the range of HC-SR04?

✅2 cm to 400 cm.

2. Can HC-SR04 work outdoors?

✅Yes, but sunlight and wind reduce accuracy.

3. Why does HC-SR04 show unstable values?

⚠️Long wires, vibration, low power, or soft materials.

4. Can I use it with ESP32 or ESP8266?

✅Yes — but Echo pin needs 5V → 3.3V voltage divider.

5. Can ultrasonic sensors detect water?

✅Yes, if the water surface is still (not splashing).


🚚 Dream RC is giving you the best deal in Bangladesh – high quality at the lowest price!


💬 What is the Ultrasonic Sonar Sensor price in BD (Bangladesh) & why buy from us?

The Ultrasonic Sonar Sensor current price in Bangladesh is 89 BDT.
From us – Dream RC, you can get Ultrasonic Sonar Sensor at the most affordable price with the lowest delivery charges & fast shipment all over Bangladesh.

Shopping cart

0
image/svg+xml

No products in the cart.

Continue Shopping