Arduino + HC-SR04

by guschabal in Circuits > Arduino

1874 Views, 10 Favorites, 0 Comments

Arduino + HC-SR04

DSC_0019.JPG

Arduino + HC-SR04

assembling

Video

Arduino + HC-SR04

This projects consists to use the HC-SR04 sensor with Arduino.

This sensor can be used to measure distances or overcome obstacles.

How this happend?

Well, one transducer send a ultrasonic signal , an the other waits for captured the signal when return.

Let's get started!

Required Hardware

DSC_0002.jpg
DSC_0009.jpg
DSC_0010.jpg
DSC_0029.jpg
DSC_0031.jpg

  1. Arduino
  2. Sensor HC-SR04
  3. Wires
  4. Breadboard
  5. Rule

Circuit

img_program_sensor_hcsr041.PNG
DSC_0013.jpg
DSC_0012.jpg
DSC_0005.jpg
DSC_0017.jpg

This same diagram created with Fritzing was as connect all circuit.

The sensor consists of 4 pins:

  1. "VCC" connected to the output of 5V.
  2. "Trig" connected to digital pin board responsible for sending the ultrasonic pulse.
  3. "Echo" to the digital input pin to receive the echo said pulse.
  4. "GND" grounded.

Code

DSC_0021.JPG
img_program_sensor_hcsr042.PNG

The code has the explanation how the signal is obtained.

DSC_0011.jpg