Skip to Content

HC-SR0 Ultrasonic Distance Sensor Module

https://circuitsnepal.odoo.com/web/image/product.template/44/image_1920?unique=552695d

 The HC-SR04 Ultrasonic Distance Sensor Module is a compact and cost-effective device for non-contact distance measurement. It operates by transmitting ultrasonic pulses and measuring the time taken for the echo to return, allowing for precise distance readings. This module is ideal for a wide range of applications requiring accurate distance sensing.

0.00 ₨ 0.0 NPR 0.00 ₨

0.00 ₨

Not Available For Sale

This combination does not exist.

Free Delivery is available on orders worth Rs.2000 or more!

Terms and Conditions

Shipping: 2-3 Business Days

Product Description:


Product Specifications

SpecificationValue
Measuring Range2cm - 400cm
Accuracy±3mm
Power Supply5V DC
Operating Current15mA
Output SignalTTL level (0V/5V)
Measurement Angle<15 degrees
Dimensions45mm x 20mm x 15mm (approx.)
Weight2g (approx.)

Features

  • Non-contact measurement for safe and reliable operation  
  • High accuracy and precision |
  • Wide measuring range  
  • Low power consumption  
  • Simple to use and integrate
  • Compact and lightweight design

Applications

  • Robotics and obstacle avoidance  
  • Automated guided vehicles (AGVs)
  • Level measurement
  • Parking assistance systems
  • Presence detection  
  • DIY projects and experiments

Pinout and Usage

PinFunctionConnection
VCCPower SupplyConnect to +5V power source
GNDGroundConnect to ground
TrigTriggerConnect to a digital output pin of your microcontroller (e.g., Arduino Digital Pin 13). A short pulse (10us) on this pin initiates the measurement.
EchoEchoConnect to a digital input pin of your microcontroller (e.g., Arduino Digital Pin 12). This pin receives the echo pulse from the target object.

How to Use the HC-SR04 Ultrasonic Distance Sensor Module

  1. Wiring: Connect the module to your microcontroller as per the pinout table.
  2. Triggering: Send a short pulse (10us) to the Trig pin to initiate the measurement.
  3. Echo Reception: Read the duration of the echo pulse on the Echo pin.  
  4. Distance Calculation: Calculate the distance to the object using the formula: Distance = (Duration / 2) * Speed of Sound (Speed of Sound in air is approximately 343 m/s at 20°C).

Example (Arduino)

C++

const int trigPin = 13; // Trig pin connected to Arduino Digital Pin 13
const int echoPin = 12; // Echo pin connected to Arduino Digital Pin 12

// Speed of sound in cm/uS
const float speedOfSound = 0.0343;

void setup() {
  pinMode(trigPin, OUTPUT); 
  pinMode(echoPin, INPUT);
  Serial.begin(9600);
}

void loop() {
  // Trigger the sensor
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);

  // Read the duration of the echo pulse
  long duration = pulseIn(echoPin, HIGH);

  // Calculate the distance
  float distance = duration * speedOfSound / 2;

  // Print the distance to the serial monitor
  Serial.print("Distance: ");
  Serial.print(distance);
  Serial.println(" cm");

  delay(100); // Wait for 100ms before the next measurement
}

Note:

  • The specific library functions and usage will vary depending on the microcontroller and the library you are using.
  • Refer to the library documentation and examples for detailed usage instructions.

Design features


Our design features offer a range of tools to create visually stunning websites. Utilize WYSIWYG editors, drag-and-drop building blocks, and Bootstrap-based templates for effortless customization. With professional themes and an intuitive system, you can design with ease and precision, ensuring a polished, responsive result.



Building blocks system

Create pages from scratch by dragging and dropping customizable building blocks. This system simplifies web design, making it accessible to all skill levels. Combine headers, images, and text sections to build cohesive layouts quickly and efficiently.



Bootstrap-Based Templates

Design Odoo templates easily with clean HTML and Bootstrap CSS. These templates offer a responsive, mobile-first design, making them simple to customize and perfect for any web project, from corporate sites to personal blogs.



Our latest content

Check out what's new in our company !

Your Dynamic Snippet will be displayed here... This message is displayed because you did not provide both a filter and a template to use.