Ultrasonic Distance Sensor HC-SR04 - EXUS

Board specifications:

  • Supply voltage: 5V supplied via the pin headers

  • Quiescent current: < 2mA

  • Rated operating current: 15mA

  • Reception angle (Effectual angle): < 15°

  • Measurement range: 2cm – 400cm

  • Resolution: 0.3cm

  • Measurement angle: 30°

  • Input pulse width: 10us

  • Dimensions: 45mm x 20mm x 15mm
€4.08 pcs
Tax included

Product Details

The HC-SR04 ultrasonic sensor allows non-contact distance measurement in the range of 2-400 cm with a precision of 0.3 cm. The module contains ultrasonic transmitters, a receiver, and a control circuit. The operating principle is as follows:

  • An active high-level pulse with a duration of at least 10 us is used.
  • The module sends a signal with a frequency of 40 kHz
  • The reflected signal is received, and the distance to the object is calculated by subtracting the transmission time from the reception time of the signal.

Test Code:

int trigPin = 11; // Trigger

int echoPin = 12; // Echo

long duration, cm, inches;

void setup() {

Serial.begin (9600);

pinMode(trigPin, OUTPUT);

pinMode(echoPin, INPUT);

}

void loop() {

digitalWrite(trigPin, LOW);

delayMicroseconds(5);

digitalWrite(trigPin, HIGH);

delayMicroseconds(10);

digitalWrite(trigPin, LOW);

pinMode(echoPin, INPUT);

duration = pulseIn(echoPin, HIGH);

cm = (duration/2) / 29.1; // Divide by 29.1 or multiply by 0.0343

inches = (duration/2) / 74; // Divide by 74 or multiply by 0.0135

Serial.print(inches);

Serial.print("in, ");

Serial.print(cm);

Serial.print("cm");

Serial.println();

delay(250);

}

Comments (0)
No customer reviews for the moment.