Javatpoint Logo
Javatpoint Logo

Arduino Ultrasonic Range finder

In previous topic of Arduino Ultrasonic Distance Sensor, we have used a four-terminal Ultrasonic sensor.

Here, we will use a three-terminal Ultrasonic sensor, which is shown below:

Arduino Ultrasonic Range finder

It has three terminal GND (Ground), 5V, and SIG (signal). The process and the function of this sensor is similar to the Ultrasonic Distance Sensor.

The frequency waves travel through the air and strike the object on its path. The waves bounce back from the object and reach back to the module.

The Ultrasonic Range sensor pings the obstacles or objects with the ultrasound.

It detects the range from 3 cm or 4m or 400 cm.

The example of such a sensor is:

SEN136B5B

It is a sensor from SeedStudio. We need to switch the state between HIGH and LOW to notice the output.

Let's start the project.

Hardware Required

The components required to create the project are listed below:

  • Arduino UNO R3 board (We can also use any Arduino board)
  • Jump wires
  • Ultrasonic sensor
  • Breadboard

Structure of the project

The structure of the project is shown below:

Arduino Ultrasonic Range finder

Procedure

The steps to connect the Ultrasonic sensor to the board are listed below:

  • Connect 5V pin of the sensor to 5V of the Arduino board.
  • Connect the GND pin of the sensor to the GND of the Arduino board.
  • Connect the SIG pin of the sensor to pin 8 of the Arduino board.

Sketch

Consider the below code:

Steps to upload the code to the project

The steps are listed below:

  • Open the Arduino IDE.
  • Select the type of board from Tools -> Board -> Arduino UNO.
  • Select the port from Tools -> Port -> COM.
  • Upload the sketch to the connection diagram.

Connection Diagram

The connection diagram is shown below:

Arduino Ultrasonic Range finder

Output

The output on the serial monitor will appear as:

Arduino Ultrasonic Range finder
Next Topictemperature sensor





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA