You are on page 1of 6

DIGITAL METER

CONSTRUCTION WITH
ARDUINO

What is an ultrasonic sensor? An ultrasonic sensor is a tool that measures


the distance to an
object using ultrasonic sound waves. An ultrasonic sensor uses a
transducer to send and
receive ultrasonic pulses that transmit back information about the
proximity of an object.
High frequency sound waves are reflected from the boundaries to produce
different echo
patterns.
How Ultrasonic Sensors Work Ultrasonic sound vibrates on a frekans on
the human hearing
range. Transducers are microphones used to receive and transmit
ultrasonic sound. Our
ultrasonic sensors, like the others, use a single transducer to send a pulse
and receive an echo.
The sensor identifies the distance to a target by measuring the time interval
between the
sending and receiving of the ultrasonic pulse.

NECESSARY MATERIALS
Arduino Nano
16 × 2 LCD I2C Display
Ultrasonic Sensor
9v Jack Cable
Mini Breadboard
3D Printing Parts (download)
Why Ultrasonic Sensor? Ultrasonics is reliable in any lighting
environment and can be used

inside or outside. Ultrasonic sensors can accomplish avoiding collisions


for a robot and

moving too often without being too fast. Ultrasonic applications are widely
used and can be

reliably applied in cereal warehouse detection applications, water level


sensors, drone

applications and detection tools in your local powered restaurant or bank.


Ultrasonic

telemeters are often used as devices that detect a collision.


Scheme showing the links of our Project
Deviation Codes

#include <NewPing.h>

#include <LiquidCrystal_I2C.h>

#include <Wire.h>

LiquidCrystal_I2C lcd(0x3f, 16, 2);

#define TRIGGER_PIN 13 // Trig pin

#define ECHO_PIN 12 // Echo pin

#define MAX_DISTANCE 400 //

NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE);

void setup() {

lcd.begin();

lcd.backlight();

lcd.print("distance:");

}
void loop() {

delay(50);

lcd.setCursor(0,1);

lcd.print(sonar.ping_cm() );

lcd.print(" cm");

}
<pre>

You might also like