Introduction: Arduino Based Range Finder / Depth Measuring Device
Hi guys,
Let's make a Range Finder using Arduino board.
This Range Finder can measure the distance of objects from it, or the depth of well, or any such purposes can be served.
Let's check out my DIY video on how to make it for more detailed experience.
(The sponsors of the video is JLCPCB, a PCB manufacturing company, where I got my PCB design manufactured. you can find them here: www.jlcpcb.com . You may make a PCB board, or use a dot board or bread board depending on your preferences.)
Step 1: Things You Need
1. Ultrasonic Sonar
2. Arduino board
3. 16X2 LCD+I2C display
4. Jumperwires etc
5. Enclosure
Step 2: Connections
1. Ultrasonic Sonar
It has 4 pins.
Connect with Arduino as mentioned below:
i. VCC - 5V
ii. Trig pin - Arduino digital pin 5
iii. Echo pin - Arduino digital pin 4
iv. GND - Ground Pin
2. LCD display + I2C module connection with Arduino:
VCC - Arduino 5V pin
GND - Arduino ground pin
SDA - Analog Pin A4 of Arduino nano (if you are using some other arduino board, the pin may change. Google it in such a case).
SCL- Analog Pin A5 of Arduino nano (if you are using some other arduino board, the pin may change. Google it in such a case).
Step 3: Error Fixing and Code
Please find the coding in below link:
https://drive.google.com/file/d/12XVBgRUTQYUen4VLn...
Note:
Some people may have issues with the I2C + LCD display. It is because of the different versions of the I2C module.
In my case, I have used a library and set up the stuffs for I2C module. The library link is given:
https://drive.google.com/file/d/1JCOHEuDHK0iSFhXP...
Also refer the video for error fixing your I2C module:
Note:
Even some new I2C versions may not support the library. In such case, you have to first find our the related library, and fix your I2C+LCD display to working. Then you have to modify the I2C part of my coding. that would require some skills, But can be done successfully!!!
Step 4: Coding Upload and Demonstration
If you have followed all the steps, now you are all set.
You can fix the setup in an enclosure (refer my video if need any clarification).
Once you powered the Arduino, then your device is now a Range Finder.
You can measure the distance of objects, depth of wells and so on!
Good Luck!!!