Ultrasons

Viewed products

SRF05 - Ultrasonic Range Finder View larger

HC-SR04 - Ultrasonic Range Finder

BE15000034

New product

HC-SR04

 

More details

5,54 € tax incl.

Add to wishlist

More info


  Module main technical parameters:
  1.Working Voltage : 5V(DC)
  2.Static current: Less than 2mA.
  3.Output signal: Electric frequency signal, high level 5V, low level 0V.
  4.Sensor angle: Not more than 15 degrees.
  5.Detection distance: 2cm-450cm.
  6.High precision: Up to 0.3cm
  7.Input trigger signal: 10us TTL impulse
  8.Echo signal : output TTL PWL signal

  Mode of connection:

  1.VCC

  2.trig(T)

  3.echo(R)

  4.GND

Use method:

Supply module with 5V, the output will be 5V while obstacle in range, or  0V if not.The out pin of this module is used as a switching output when  anti-theft module, and without the feet when ranging modules.

Note : the module should be inserted in the circuit before been power,  which avoid producing high level of misoperation;if not, then power  again.

Module Working Principle:

1.Adopt IO trigger through supplying at least 10us sequence of high  level signal.

2.The module automatically send eight 40khz square wave and  automatically detect whether receive the returning pulse signal.

3.If there is signals returning, through outputting high level and the  time of high level continuing is the time of that from the ultrasonic  transmitting to receiving. Test distance = (high level time * sound  velocity (340M/S) / 2. 

Download:

Library

Code:

#include <NewPing.h>

#define TRIGGER_PIN 7
#define ECHO_PIN 6
#define MAX_DISTANCE 200

NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE);

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

void loop() {
delay(50);
int uS = sonar.ping();
Serial.print("Ping: ");
Serial.print(uS / US_ROUNDTRIP_CM);
Serial.println("cm");
}  

Accessories

Customers who bought this product also bought: