Interfacing HC-SR04 Ultrasonic sensor with evive

ultrasonic sensor working
About This Tutorial
In this tutorial we will interface HC-SR04 Ultrasonic sensor with evive and we will calculate distance between ultrasonic sensor and obstacle form which ultrasound waves are reflected
Tutorial Info

Components Required

ImageComponentQuantityAvailable in Kit
evive1
USB A-B Cable1
Male to Female Jumper Cable 10cm1
  • None
Ultrasonic Sensor1

Introduction

An Ultrasonic sensor is a device that can measure the distance to an object by using sound waves.it measures distance by sending out sound wave at a specific frequency and listening to that sound wave to bounce back.

Working

Ultrasonic sound vibrates at a frequency above the range of human hearing. Transducers are the microphones used to receive and send ultrasonic sound. HC-SR04 and like other ultrasonic sensor module use a single transducer to send a pulse and to receive the echo. The sensor determines the distance to the target by measuring time lapse between sending and receiveing of the ultrasonic pulses.

 

 Distance calculation

It is known that sound travels through air at a speed of 344 meters/seconds approximately, you can take a time taken by the sound wave to return and multiply it by 344 meters to get total round-trip distance of the sound wave, round-trip time means total distance traveled by the wave i.e two times the distance between HC-SR04 ultrasonic sensor module and object from which ultrasonic wave reflected. To find the distance to object simply divide round-trip time by 22, you can calculate the distance to object by using a simple formula which is given below.

 

 Pin description

The HC-RS04 Ultrasonic sensor module has 4 pins, two pins for power supply and one pin for sending out ultrasonic sound waves and one pin for receiving ultrasonic sound waves.

  • VCC
  • GND
  • TRIG (for sending ultrasonic sound waves)
  • ECHO (for receiving ultrasonic sound waves)

Circuit diagram

 

Place the HC-RS04 ultrasonic sensor module on the evive board such that the connecting wires or component of the evive board do not block the path of the ultrasonic sensor 

  • Connect VCC of HC-SR04 module to VCC of evive board 
  • Connect GND of HC-SR04 module to GND of evive board
  • Connect TRIG pin of HC-SR04 module to pin number 9 of evive board
  • Connect ECHO pin of HC-SR04 module to pin number 10 of evive board

Arduino code

Expected result

This helped
This didn't help
Share this Tutorial
Share on facebook
Facebook
Share on twitter
Twitter
Share on google
Google+
Share on pinterest
Pinterest
Share on reddit
Reddit
Share on print
Print
Related Projects & Tutorials
How to use evive’s Slide Switch
This tutorial discusses different types of switches based on their pole and throw, what are slide switches, and a simple Arduino IDE sketch to display the state of evive's slide switch on the TFT screen.
All articles loaded
No more articles to load
Featured Projects
Robotic-Arm-Bartender
DIY Robotic Arm Bartender

This project will show you how to make your own robotic arm bartender that will make you a star host!

All articles loaded
No more articles to load
Close Menu
×

Cart