Project tutorial
PDDU(Portable Distance Display Unit)

PDDU(Portable Distance Display Unit)

The PDDU uses HCSR04 sonar sensor to measure distance and print it on an 16:2 lcd screen. Using a battery makes the device portable.

  • 15 views
  • 0 comments
  • 0 respects

Components and supplies

Apps and online services

About this project

Electronic, distance-measuring equipements replace conventional tape-based manual measurement. These types of equipements are used in various applications from household architecture, surveying, carpentry, masonary etc, to submarines, planes, cars etc. The PDDU [Portable Distance Display Unit] is a battery operated, simple to use, tape-less distance meter, which measures upto 4 meters. PDDU is constructed using Arduino-uno, 16:2 LCD display, and the HC-SR04 sonar sensor. The sturdy casing is built using metal parts, from Mechanix. [Thanks to https://www.zephyrtoys.com/] The job of tape for distance measurement is taken over by sound waves!

Code

PDDU codeC/C++
Upload code onto arduino ide and upload again on arduino uno
#include<LiquidCrystal.h>
const int rs=12, en=11, d4=5, d5=4, d6=3, d7=2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
#include<HCSR04.h>
const int Triggerpin=8;
const int EchoPin=9;
long Duration=0;
void setup() {
  lcd.begin(16,2);
  pinMode(Triggerpin,OUTPUT);
  pinMode(EchoPin,INPUT);
}
void loop() {
  lcd.noDisplay();
  lcd.setCursor(0,0);
  digitalWrite(Triggerpin,LOW);
  delayMicroseconds(2);
  digitalWrite(Triggerpin,HIGH);
  delayMicroseconds(10);
  digitalWrite(Triggerpin,LOW);
  Duration=pulseIn(EchoPin,HIGH);
  long Distance_cm=Distance(Duration);
  lcd.print("Distance= ");
  lcd.setCursor(10,0);
  lcd.print(Distance_cm);
  lcd.print("cm");
  lcd.display();
  delay(1000);
  lcd.noDisplay();
  lcd.setCursor(0,1);
  digitalWrite(Triggerpin,LOW);
  delayMicroseconds(2);
  digitalWrite(Triggerpin,HIGH);
  delayMicroseconds(10);
  digitalWrite(Triggerpin,LOW);
  Duration=pulseIn(EchoPin,HIGH);
  long Distancem_m=Distancem(Duration);
  lcd.print("Distance= ");
  lcd.setCursor(10,1);
  lcd.print(Distancem_m);
  lcd.print("m");
  lcd.display();
  delay(3000);
  lcd.clear();
  }
long Distance(long time){
  long DistanceCalc;
  DistanceCalc=((time*0.0343)/2);
  return DistanceCalc; }
long Distancem(long time){
  long DistancemCalc;
  DistancemCalc=((time/2915.452)/2);
  return DistancemCalc;
}

Schematics

PDDU circuit diagram and schematic
This is wiring and schematic used to creat PDDU wiring
proj_pddu_XIzQksyWxc.fzz
PDDU circuit diagram
use the ciruit diagram for wiring
Proj pddu bbpic cgl8ids8y3
PDDU schematic
PDDU schematic
Proj pddu schematicpic olrxv8xgnd

Comments

Similar projects you might like

Simple Ultrasonic Distance Measurer With LCD Display

Project showcase by onatto22

  • 16,973 views
  • 6 comments
  • 38 respects

DIY Distance Meter with Arduino and a Nokia 5110 Display

Project tutorial by Nick Koumaris

  • 10,444 views
  • 0 comments
  • 22 respects

Arduino DTH22 Humidity Temperature With LCD I2C 16x2 Display

Project tutorial by Team GiftedMedia

  • 59,963 views
  • 23 comments
  • 69 respects

GPS Location Display With GPS And TFT Display Shields

Project tutorial by Boian Mitov

  • 19,735 views
  • 7 comments
  • 39 respects

DHT11 Humidity + Temperature Sensor with 16x2 LCD display

Project showcase by onatto22

  • 36,684 views
  • 8 comments
  • 49 respects

GPS Datalogger, Spatial Analysis, and Azure IoT Hub.

Project tutorial by Shawn Cruise

  • 24,869 views
  • 4 comments
  • 91 respects
Add projectSign up / Login