Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
4 views
light intensity and ultrasonic distance sensor
jhihi
Uploaded by
Arjun Reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save light intensity and ultrasonic distance sensor For Later
Download
Save
Save light intensity and ultrasonic distance sensor For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
4 views
light intensity and ultrasonic distance sensor
jhihi
Uploaded by
Arjun Reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save light intensity and ultrasonic distance sensor For Later
Carousel Previous
Carousel Next
Save
Save light intensity and ultrasonic distance sensor For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 4
Search
Fullscreen
Controllers 4.11.3. Arduino LDR Arduino LDR (Light Dependent Resistor) project uses the photoresistor to light an LED. The LED will light up whenever there is dark or no light over the sensor. It is defined as a light- controlled resistor, which is also called as LDR. It is a variable resistor that controls the resistance in accordance with the received light intensity. It means, the resistance decreases as intensity of light increases. Example: Connect an LDR to show dark and light when the light falls on the sensor. Hardware required: ‘The components required for the project are listed below: ; > vvvyv > Connection diagram: ‘The connection diagram of the project is shown in Figure 4.17. 1x Red LED 1x 220.0 Resistor ! 1 * 10 kQ Ohm Resistor Arduino UNO R3 board Jump wires 1 = Photoresistor De Pw 2200 10 PwMySs 011 PmwMost D12miso) \/ ep prarscx} GROConnection steps: The connection of the above project is discussed below: > Step 1: The postive leg of the LED is connected in series with the resistor to pin number 12 of the Arduino board, > Step 2: The negative leg ofthe LED is connected tothe Ground, Re ‘Step 3: One edge of the photoresstr is connected to the SV pin on the Arduino board, Step 4: A 10 k0 resistor is attached in series with the other edge of the photoresi ries with the other edge of ores and connected to the GND, meteors > Step 5: The edge of the photoresisor is connected to the analog pin AO, Arduino code ‘The Arduino code forthe above circuits shown below: const int LEDpin « 12) const int photoPIN = A0; void setup() // Anitializing the serial communication: Serial.begin(9600) ; pinMode(photoPIN, INPUT) ; pinMode(LEDpin, OUTPUT) ; y void leopt) { // read the sensor: Amt seneorstatue = analogRead(photoPIN) ; 7/ now, it will check the reading or status of the sensor is < 200 77 3f it is, LED will be HIGH Af (wensorstatus <200) { digitalWrite(LEDpin, HIGH); // LED is on Serial.printn(* LED is ON, status of sensor 4 DARK"); 2 au ( digitalWrite(LitDpin, LOW): gerial.printin(® © Res "The output on the serial monitor will appear as follows LED de ON, statua of sensor is DARK LED Le ON, atatua of LED te ON, status of 4.11.4, Arduino Ultrasonic Distance Sensor "The Ultrasonic sensor of 1C-SROM is used to measure the distance of the object using SONAR, It emits the Ultrasound at a frequency of 40 A7fs oF 40000 Hf, the Frequency travels through the air and strikes the object on its path. The rays bounce back from the object and reach back tothe module, The four terminals of the HC-SRO4 are VCC, TRIG, ECHO, and GND, The voltge supply or VCC is +5V. The ECHO and TRIG terminals can be connected to any ofthe digal VO pins on the specific Arduino boord, > The Ultrasonic sensors work best for medium ranges, > The resolution is 0.3em, > The medium ranges of the sensor are 10cm to 3m, It works best a this duration, > The maximum range the sensor may detect is 4.5m, (@) Working of ultrasonic sensor: Please refer to the working principle of ultrasonic sensor described in Chapter 1.12.13 0 Page 1.92, (6) Structure of ultrasonic sensor: ‘The structure of HC-SRO4 is shown in Figure 4.18 Figure 418 HC-SRO4 Ultrasonic sensor module (¢) Ultrasone sensor timing diagram: ‘To measure the distance using an ultrasonic sensor, the following steps are involved: > The TRIG pin is set to HIGH for a short period (typically about 3 ys to 100 ps). > As-soon as the ‘TRIG pin is sot to LOW, the ultrasonic sensor sends out sound pulses and sets the ECHO pin to HIGH,2 When the sensor receives the reflected pulses it sets the ECHO pin to LOW. » The time duration for which the ECHO pin remains HIGH is measured The timing diagram of the ultrasonic sensor HC-SRO4 is shown in Figure 4.19 Trg pin Ons Wager pulse Pusses trom _] t____ ‘module "Eight 40kHz sound wave generated fom HG-SRO# ECHO pin Time taken by pulse to leave and return back Pipure 4.19 Timing diagram of the HC-SR04 ultrasonic sensor module Frample: Creating the Arduino ultrasonic sensor to measure distance, Nortwure required: ‘i components required to ereate the project are listed below: 1» UNO R3 board (Any Arduino board) > AK > Jump wires > Ultrasonic sensor HC-SRO4 > Breadboard Principles IL will send out the burst of 8 be further received ‘output The TRIG (triggered) pin needs to be set to HIGH f ‘ele called the sonic burst, whieh will travel at the sound speed, It ‘ythe FCHO pin, The time traveted by the sound wave is considered the ECHO pit ‘he pulsetng) funtion will be used t0 read the time fromm the output ofthe ECHO pin. I vill wait tor the spectied pin to go LIIGH and LOW. ‘The funetion would retara the ting at et, ‘The TRIG pin is set LOW for 4 microseconds and th "ning willbe cakwlated in microseconds Procedures len HIGH for 15 mieroseconds. The The steps to connect the Utrasonie sensor to the board are listed below! he VCE pin of the HHCSROM is conned tothe $V oF the Arduino board (0 provite Power, LT > ‘The GND pin ofthe HC-SROM fs connected 0 the GND of the Arduino board for completing the circuit and grounding, > The TRIG pin ofthe IIC-SRO4 is conneeted to pin 6 of the Arduino board to initiate the ultrasonic pulse transmission, > Tho ECHO pin af the HC=SRO4 is connected to pin $ of the Ard any! measure the returning vltrasonie pulse. Arduino code: ‘The Arduino code for the above circuit is sho define KcHopin 9 // it defines the ECHO pin of the sensor to pin 9 of Arduino Hdofine TRIGpin 8 defined, long duration; // variable for the duration of sound wave travel int distance; // variable for the distance meaaurement up) yo board to receive below: // The variable has been void { pinNode(TRrGpin, OUTPUT); // It seta the ECHO pin as ourpUT pinMode(BCHopin, INPUT); // It sete the TRIG pin as INPUT Serial.begin(9600); // Serial Communication at the rate of 9600 bps Serial.printIn ("Test of the Ultrasonic Roa"), // Tt will appear on Serial Monitor rial.printin ("with the Arduino UNO R3 board); nor HC- } votd loop( ) ( (7 Av Liver wets the TRIG pin at LOW for 2 microaeconds digitalWrite(TRIGpin, LOW) ; delayticroseconds (4) ; \ |oe met TRI sly at MN tan aN WA vameeonetn Mat eatve Lee Critaetiy, LANDY etayNtoeommenita th) MOT Cadma Ha (rerapin, LOW) FEAL WENT yoo Che KeMO ppt and WELL vetinnny the Vine duration = puta 47 dint (CHOPIN, TAH) » ve tormuta, Matance » duration®(0.034/2)) // (apoed tn inieroneeonde) 47 Speod oF wound wave (140 W/u) divided by 2 (torward and backward bomnee) ¢/ To display the distance on Serial Monitor Serial.print (*Dietance: *); eal print (distance) ; ehal.peintin(® emt); divtance ) ‘Steps to uptoad che code ro the projects ‘The steps are listed below: > The Arduino IDE is opened, > The type of boar is selected by navigating to Toots —+ Board —+ Arduino UNO. > ‘The port is selevted by navigating to Tools =+ Port =+ COM, > The sketch is uploaded to the connection diagram, Connection diagram: ‘The connection diagram is shown in Figure 4.20, Result: //pecitied unit of ‘The output on the serial monitor will appear as follows: Distance: Distance: 110 em Distance: 110 cm Distance: 110 em Distance: 110 em Oem vt Ly Ld 3a fers bo Utlrasonie sonsor fersrs own Hic-sro4 Jane | — erst apa of Figure 420 Arduino UNO connected to an HCSRO ultrasonic sensor 4a . Arduino Ultrasonic Range Finder {Im the Arduino Ultrasonie Distance Sensor setup, a threesterminal Ultrasonic sensor will ‘be utilized, depicted below: {ths thees terminal GND (Ground), $V, and SIG (signal), The process and the function ofthis sensor is similar othe Ultrasonic Distance Sensor. The frequency waves travel through ‘he alr and trike the object om its path. The waves bounce back from the abject and reach back to the module Figure 4.21 Utrasonie distance sensor ' ‘he Utrasonie Range sensor pings the obstacles or objects with the ultrasound Ut detects {he range fom 3 em or 400 em, The example a such a sensor i: SENIGDSN, Iti tsenany
You might also like
Ultrasonic Sensor Project Report
PDF
80% (5)
Ultrasonic Sensor Project Report
8 pages
Lecture 28 To 30 - Unit 4 - ECE249 - Introduction To Arduino and Sensors
PDF
No ratings yet
Lecture 28 To 30 - Unit 4 - ECE249 - Introduction To Arduino and Sensors
38 pages
Ultrosonic Code
PDF
No ratings yet
Ultrosonic Code
4 pages
MUCLecture 2023 12937193
PDF
No ratings yet
MUCLecture 2023 12937193
11 pages
Arduino IR&US
PDF
No ratings yet
Arduino IR&US
5 pages
iot_exp2
PDF
No ratings yet
iot_exp2
7 pages
Ultrsonic Sensor
PDF
No ratings yet
Ultrsonic Sensor
7 pages
Tempareture
PDF
No ratings yet
Tempareture
5 pages
iotproject
PDF
No ratings yet
iotproject
6 pages
HC-SR04 Ultrasonic Arduino Guide
PDF
No ratings yet
HC-SR04 Ultrasonic Arduino Guide
9 pages
lab7 SR04 - Lập trình nhúng
PDF
No ratings yet
lab7 SR04 - Lập trình nhúng
10 pages
Complete Guide For Ultrasonic Sensor HC-SR04 With Arduino: Description
PDF
100% (1)
Complete Guide For Ultrasonic Sensor HC-SR04 With Arduino: Description
10 pages
Distance Measurement
PDF
No ratings yet
Distance Measurement
3 pages
Ultrasonic Sensor HC-SR04 and Arduino Tutorial
PDF
100% (4)
Ultrasonic Sensor HC-SR04 and Arduino Tutorial
5 pages
How HC-SR04 Ultrasonic Sensor Works & Interface It With Arduino
PDF
No ratings yet
How HC-SR04 Ultrasonic Sensor Works & Interface It With Arduino
11 pages
Detectting Motion With PIR Sensor
PDF
No ratings yet
Detectting Motion With PIR Sensor
51 pages
Distance Measuring Instrument-1
PDF
100% (2)
Distance Measuring Instrument-1
25 pages
Sensor
PDF
100% (2)
Sensor
21 pages
Activity 5 - Ultrasonic
PDF
No ratings yet
Activity 5 - Ultrasonic
2 pages
Umar 2 Practical
PDF
No ratings yet
Umar 2 Practical
4 pages
How To Detect Objects With HC-SR04 Ultrasonic Sensor, Arduino and Millis - Into Robotics
PDF
No ratings yet
How To Detect Objects With HC-SR04 Ultrasonic Sensor, Arduino and Millis - Into Robotics
1 page
Job5 Iot Rani Mu'Arifah
PDF
No ratings yet
Job5 Iot Rani Mu'Arifah
9 pages
Final Notes For Ultrasonic Sensor
PDF
No ratings yet
Final Notes For Ultrasonic Sensor
13 pages
Beee Lab
PDF
No ratings yet
Beee Lab
4 pages
Exp 4
PDF
No ratings yet
Exp 4
3 pages
Complete Guide For Ultrasonic Sensor HC
PDF
No ratings yet
Complete Guide For Ultrasonic Sensor HC
6 pages
Arduino with HC
PDF
No ratings yet
Arduino with HC
5 pages
Arduino Ultrasonic Sensor (HC-SR04 or HY-SRF05)
PDF
No ratings yet
Arduino Ultrasonic Sensor (HC-SR04 or HY-SRF05)
2 pages
PW2 (06det20f1004 - 06det20f1055 - 06det20f1082) PDF
PDF
No ratings yet
PW2 (06det20f1004 - 06det20f1055 - 06det20f1082) PDF
15 pages
Ultrasonic Sensor With Arduino
PDF
No ratings yet
Ultrasonic Sensor With Arduino
7 pages
IoT Unit 2
PDF
No ratings yet
IoT Unit 2
73 pages
تحكم تجربة 5 ⬇️
PDF
No ratings yet
تحكم تجربة 5 ⬇️
4 pages
Ultrasonic Sensor Object Detection System Project Report
PDF
No ratings yet
Ultrasonic Sensor Object Detection System Project Report
10 pages
UNIT II & III
PDF
No ratings yet
UNIT II & III
60 pages
Exp. No.: 4 Date: Arduino Based Ultrasonic Distance Sensor AIM
PDF
No ratings yet
Exp. No.: 4 Date: Arduino Based Ultrasonic Distance Sensor AIM
8 pages
Ultrasonic Distance Sensor Arduino Tinkercad
PDF
No ratings yet
Ultrasonic Distance Sensor Arduino Tinkercad
9 pages
Ultrasonic Range Finder: Step 1: Parts List
PDF
No ratings yet
Ultrasonic Range Finder: Step 1: Parts List
10 pages
Assignment 01 Objective: Blinking 2 LED in A Time Interval
PDF
No ratings yet
Assignment 01 Objective: Blinking 2 LED in A Time Interval
20 pages
Final Output Elective Intina Ronald
PDF
No ratings yet
Final Output Elective Intina Ronald
6 pages
Arduino with LCD
PDF
No ratings yet
Arduino with LCD
2 pages
SR 04 Ultrasonic 1
PDF
No ratings yet
SR 04 Ultrasonic 1
12 pages
3 - Ultrasonic Ranging Sensor
PDF
No ratings yet
3 - Ultrasonic Ranging Sensor
3 pages
Sonar Distance Meter Report,ELECTRICAL AND ELECTRONICS WORKSHOP
PDF
No ratings yet
Sonar Distance Meter Report,ELECTRICAL AND ELECTRONICS WORKSHOP
8 pages
lab 6
PDF
No ratings yet
lab 6
9 pages
Experiment-2: Aim:Calculate The Distance To An Object With The Help of An Ultrasonic Sensor and Procedure
PDF
No ratings yet
Experiment-2: Aim:Calculate The Distance To An Object With The Help of An Ultrasonic Sensor and Procedure
5 pages
تقرير الخامسة
PDF
No ratings yet
تقرير الخامسة
10 pages
Lab 2 Ee 463
PDF
No ratings yet
Lab 2 Ee 463
12 pages
Ultrasonic Distance Sensor
PDF
No ratings yet
Ultrasonic Distance Sensor
10 pages
Control of Ultrasonic Sensor With Arduino 1
PDF
No ratings yet
Control of Ultrasonic Sensor With Arduino 1
7 pages
Ashu 2.1 IOT
PDF
No ratings yet
Ashu 2.1 IOT
4 pages
COA REPORT Ocji
PDF
No ratings yet
COA REPORT Ocji
8 pages
Puru 4 IOT
PDF
No ratings yet
Puru 4 IOT
5 pages
IoTA Lab Submissions
PDF
No ratings yet
IoTA Lab Submissions
40 pages
Worksheet 4 IOT
PDF
No ratings yet
Worksheet 4 IOT
5 pages
Arduino-Step by Step
PDF
No ratings yet
Arduino-Step by Step
22 pages
Dec50122 Embedded Robotics - Pw3 (Procedure)
PDF
No ratings yet
Dec50122 Embedded Robotics - Pw3 (Procedure)
5 pages