Working of HC-SR04 Ultrasonic Sensor with Arduino UNO…

ultrasonic-sensorIt’s rather interesting, to work with HC-SRO4 Ultrasonic Sensor. Sounds very interesting!! The technology used here is quite simple and clear for which users can easily purchase products and work accordingly. This ultrasonic distance sensor provides steady and accurate distance measurements within the range of 2cm to a whooping 450cm. It has a focus of less than 15 degrees and an accuracy of about 2mm. We’ll be presenting its description in few simple steps which will help you in assembling it with arduino and in gaining knowledge about concept used here.

The Ultrasonic sound waves has an extremely high pitch that humans cannot hear and is also free from external noises from passive or active sources. This particular sensor transmits an ultrasonic sound that has a frequency of about 40 kHz. The sensor has two main parts- transducer that creates an ultrasonic sound wave while the other part listens to its echo. Basically, it’s being used in robotic applications for object escaping awareness and prevention from falling or crashing. It’s not specific to robotics moreover it is also used for water level sensing, as a parking sensor and also for interactive display on computer screens.

ultrasonic-sensor-hc-sr04

 

Components Required for Interfacing of HC-SR04 Ultrasonic Sensor with Arduino:

  • Arduino Uno R3.(BUY NOW)
  • One HC-SR04 ultrasonic sensor.(BUY NOW)
  • One green LED.
  • One red LED.
  • Two 560 ohm resistors(green, red, brown and gold).
  • Eight male to male hook up wires.
  • Serial monitor or a scale measuring centimeters.
  • Half breadboard.(BUY NOW)

How can we connect Components with HC-SR05 Ultrasonic Sensor:

  • Attach your HC-SR04 and LED’S to your Breadboard
  • Connect ground pins to your LED’s and the sensor.
  • Attach green LED to pin 3 and red LED to pin 2 on the Arduino.
  • Now apply 5v to the Sensor.
  • Attach the trig pin and echo pin of sensor to pin 13 and 12 on the Arduino
  • Finally connect the arduino to your computer, copy code and upload it.

connections-of-ultrasonic-sensor-with-arduino-uno

Code for HC-SR04 Ultrasonic Sensor interfacing with Arduino UNO:

**This is Sample Code..Changes required according to your Projects..