MaxSonar EZ0 Ultrasonics Sensor With Arduino

I will show you how we can program/use the MaxSonar EZ0 sensor With Arduino.

projectImage

Things used in this project

Hardware components

HARDWARE LIST
1 Arduino UNO
1 Digilent Pmod MAXSONAR
1 DFRobot I2C 16x2 Arduino LCD Display Module
1 Male/Female Jumper Wires

Software apps and online services

Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)

Story

 

I will show you how we can program/use the MaxSonar EZ0 sensor With Arduino.

 

The EZ0 Sonar detects objects from 0-inches to 254-inches (6.45-meters) and provides sonar range information from 6-inches out to 254-inches with 1-inch resolution. Objects from 0-inches to 6-inches typically range as 6- inches

 

For More Details:- https://techeonics.com/?p=355

 

This sensor Has 3 Output formats To interface with:-

 

1 ) Analog interface.

 

2) Pulse width Modulation "PW".

 

3) Serial Interface.

projectImage

Material:-

 

1) Arduino Board " I used Arduino UNO".

 

2) Ultrasonic MaxSonar EZ0.

 

3) 16*2 LCD With I2C Module

 

4)Wires and BreadBoard.

 

Interface The Sensor

 

We will use the 'PW' pin on the sensor to interface with ArduinoPulse width "PW" Is the way to communicate with this sensor.This pin outputs a pulse-width representation of range.The distance can be calculated using the scale factor of 147uS per inch.So using Pulse in to calculate the distance.

projectImage

MaxSonar EZ0 With Arduino & LCD

 

Connections

 

VCC = 5VGND = GNDSDA = A4SCL = A5

projectImage

Analog & Serial Interface of Maxsonar

 

Analog Interface

 

The Analog Interface is the easiest way to communicate with this sensor, there is a directly proportional between Distance and Output voltage. Outputs analog voltage with a scaling factor of (Vcc/512) per inch.For example, a voltage supply of 5V yields ~9.8mV/inch, a voltage supply of 3.3 V yields ~6.4mV/inch.The analog output voltage is not accurate rather than PW And serial. so I prefer to use PW or serial

 

Serial Interface

 

For the Serial interface method, we will use the SoftwareSerial library to write the code for this sensor, And we will Connect D4 With BW, Leave it open, or hold it low for serial output on the TX output.The output is an ASCII capital “R” which equal 0x52, followed by three ASCII character digits representing the range in inches up to a maximum of 255, followed by a carriage return (ASCII 13 or 0x0D)

 

For More Details:- https://techeonics.com/?p=355

Schematics

MaxSonar wih Arduino

projectImage

MaxSonar wih Arduino & LCD

projectImage

The article was first published in hackster, September 25, 2021

cr: https://www.hackster.io/423565/maxsonar-ez0-ultrasonics-sensor-with-arduino-613878

author: Gaurav Kumar, TECHEONICS

License
All Rights
Reserved
licensBg
0