Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Lab 02 - Ultrasound Distance Sensor Using Tinker CAD Arduino

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

Lab 02 -Ultrasound distance sensor using Tinker CAD Arduino

Name of student (Batch No / Roll No: Vidit Kumar Jain(H2 / PH21)

Performance of Journal Total Remarks Instructor


Experiment Submission Marks Sign

Aim: To Interface following sensors such as Temperature or Ultrasonic or Gas sensors with
Raspberry-Pi/Beagle board/ TinkerCADArduino etc. and display readings on console.

Journal content- Theory and frequently asked questions and experiment


 List and state various sensors used in IoT systems
 What are the other types distance measurement sensors?
 Describe the details of HC-SR04 distance sensor
 Prepare Tinker CAD sketch and explain it
 Write an arduino program to measeure distance using HCSR04 sensor
 Conclusions

Student may start editiong journal from here as per above listed journal content points……
1.List and state various sensors used in IoT systems

 Temperature Sensor
 Pressure Sensor
 Proximity Sensor
 Accelerometer and Gyroscope Sensor
 IR Sensor
 Optical Sensor
 Gas Sensor
 Smoke Sensor
 Ultrasonic Sensor
 Water quality Sensor
 Level Sensor
 Image Sensor
 Gyroscope Sensor
 Humidity Sensor
 Optic Sensor
 Motion detector Sensor
 Chemical Sensor

Temperature sensors- By definition, “A device, used to measure amount of


heat energy that allows to detect a physical change in temperature from a
particular source and converts the data for a device or user, is known as a
Temperature Sensor.”
Proximity sensor- A device that detects the presence or absence of a nearby
object, or properties of that object, and converts it into signal which can be
easily read by user or a simple electronic instrument without getting in contact
with them.

Pressure sensor - A pressure sensor is a device that senses pressure and


converts it into an electric signal. Here, the amount depends upon the level of
pressure applied.

Water quality sensor - Water quality sensors are used to detect the water
quality and Ion monitoring primarily in water distribution systems.
Chemical sensor - Chemical sensors are applied in a number of different
industries. Their goal is to indicate changes in liquid or to find out air chemical
changes. They play an important role in bigger cities, where it is necessary to
track changes and protect the population.

Gas sensor - Gas sensors are similar to the chemical ones, but are specifically
used to monitor changes of the air quality and detect the presence of various
gases. Like chemical sensors, they are used in numerous industries such as
manufacturing, agriculture and health and used for air quality monitoring,
detection of toxic or combustible gas, hazardous gas monitoring in coal mines,
oil & gas industries, chemical laboratory research, manufacturing – paints,
plastics, rubber, pharmaceutical & petrochemical etc.

Smoke sensor - A smoke sensor is a device that senses smoke (airborne


particulates & gases), and it’s level.

IR sensors - An infrared sensor is a sensor which is used to sense certain


characteristics of its surroundings by either emitting or detecting infrared
radiation. It is also capable of measuring the heat being emitted by the objects.

Level sensors - A sensor which is used to determine the level or amount of


fluids, liquids or other substances that flow in an open or closed system is called
Level sensor.

Image sensors - Image sensors are instruments which are used to convert
optical images into electronic signals for displaying or storing files
electronically.

Motion detection sensors- A motion detector is an electronic device which is


used to detect the physical movement (motion) in a given area and it transforms
motion into an electric signal; motion of any object or motion of human beings
Gyroscope sensors - A sensor or device which is used to measure the angular
rate or angular velocity is known as Gyro sensors, Angular velocity is simply
defined as a measurement of speed of rotation around an axis. It is a device used
primarily for navigation and measurement of angular and rotational velocity in
3-axis directions. The most important application is monitoring the orientation
of an object.

Humidity sensors - Humidity is defined as the amount of water vapour in an


atmosphere of air or other gases. The most commonly used terms are “Relative
Humidity (RH)

Optical sensors - A sensor which measures the physical quantity of light rays
and convert it into electrical signal which can be easily readable by user or an
electronic instrument/device is called optical sensor.

2.What are the other types distance measurement sensors?

Ultrasonic Sensor,IR distance sensors, LIDAR Sensors, LED Time-Of-Flight


Distance Sensors

3.Describe the details of HC-SR04 distance sensor


HC-SR04 Sensor Features

 Operating voltage: +5V


 Theoretical  Measuring Distance: 2cm to 450cm
 Practical Measuring Distance: 2cm to 80cm
 Accuracy: 3mm
 Measuring angle covered: <15°
 Operating Current: <15mA
 Operating Frequency: 40Hz

HC-SR04 Ultrasonic Sensor - Working


As shown above the HC-SR04 Ultrasonic (US) sensor is a 4 pin module, whose
pin names are Vcc, Trigger, Echo and Ground respectively. This sensor is a very
popular sensor used in many applications where measuring distance or sensing
objects are required. The module has two eyes like projects in the front which
forms the Ultrasonic transmitter and Receiver. The sensor works with the simple
high school formula that
Distance = Speed × Time
The Ultrasonic transmitter transmits an ultrasonic wave, this wave travels in air
and when it gets objected by any material it gets reflected back toward the sensor
this reflected wave is observed by the Ultrasonic receiver module as shown in the
picture below

Now, to calculate the distance using the above formulae, we should know the
Speed and time. Since we are using the Ultrasonic wave we know the universal
speed of US wave at room conditions which is 330m/s. The circuitry inbuilt on the
module will calculate the time taken for the US wave to come back and turns on
the echo pin high for that same particular amount of time, this way we can also
know the time taken. Now simply calculate the distance using a microcontroller or
microprocessor.

Applications

 Used to avoid and detect obstacles with robots like biped robot, obstacle
avoider robot, path finding robot etc.
 Used to measure the distance within a wide range of 2cm to 400cm
 Can be used to map the objects surrounding the sensor by rotating it
 Depth of certain places like wells, pits etc can be measured since the waves
can penetrate through water

4.Prepare Tinker CAD sketch and explain it

In the TinkerCAD, we have taken a Ardiuno Uno and ultrasonic sensor, we have
connected ground,vcc of ultrasonic sensor to ground,vcc of ardiunouno
respectively. We have attached trigger at 11 and echo at 12.

Distance = duration*0.034/2
Here we are dividing by 2 because the distance covered by it is twice: going
to the object and coming back from the object.

5.Write an arduino program to measeure distance using HCSR04 sensor

// Name: Vidit Kumar Jain

// Roll no.: PH21

// Batch: H2

int cm = 0;

int inches = 0;

long readUltrasonicDistance(int triggerPin, int echoPin)

pinMode(triggerPin, OUTPUT); // Clear the trigger

digitalWrite(triggerPin, LOW);

delayMicroseconds(2);

// Sets the trigger pin to HIGH state for 10 microseconds

digitalWrite(triggerPin, HIGH);

delayMicroseconds(10);

digitalWrite(triggerPin, LOW);

pinMode(echoPin, INPUT);
// Reads the echo pin, and returns the sound wave travel time in microseconds

return pulseIn(echoPin, HIGH);

void setup()

Serial.begin(9600);

void loop()

cm = 0.01723 * readUltrasonicDistance(13, 12);

inches = (cm / 2.54);

Serial.print(cm);

Serial.println("cm");

Serial.print(inches);

Serial.print("in");

delay(10); // Delay a little bit to improve simulation performance

6.Conclusions

With the help of TinkerCAD, we have performed an experiment in which we


have used ultrasonic sensor to calculate the distance of object from the sensor
on Ardiunouno.

You might also like