0% found this document useful (0 votes)
6 views

Experiment 5 LDR (1)

The document explains the principles and functionality of a Light Dependent Resistor (LDR) and its application with Arduino for measuring light intensity. It details the working mechanism of the LDR, circuit connections, and provides code examples for interfacing the LDR with Arduino to create an automatic street light controller. Additionally, it includes self-assessment questions related to the concepts discussed.

Uploaded by

2420030593
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Experiment 5 LDR (1)

The document explains the principles and functionality of a Light Dependent Resistor (LDR) and its application with Arduino for measuring light intensity. It details the working mechanism of the LDR, circuit connections, and provides code examples for interfacing the LDR with Arduino to create an automatic street light controller. Additionally, it includes self-assessment questions related to the concepts discussed.

Uploaded by

2420030593
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Experiment 5 :

Interfacing LDR with Arduino


Light Dependent Resistor
• A Light Dependent Resistor (LDR) is a type of resistor whose resistance
changes depending on the amount of light it is exposed to.

• It is also known as a photo resistor, photocell, photoconductor.

• It is made of a semiconductor material that is sensitive to light, such as


cadmium sulfide or lead sulfide.

• The resistance of an LDR decreases as the intensity of light falling on it


increases.

• In other words, the LDR becomes more conductive when exposed to


light. Conversely, when the light intensity decreases, the resistance of the
LDR increases, making it less conductive.
How Does a LDR sensor
• Work
The flow of current in any metal is actually
caused by the flow of electrons.

• On the basis of the number of electrons that can


flow through metals, they are categorized as
insulator, conductor, and semiconductor.

• One property of semiconductors is


photoconductivity i.e, the material becomes
more conducting due to the absorption of
electromagnetic radiations such as normal visible
light and ultraviolet light, etc..

• This creates flow electrons and holes.


How Does a LDR sensor
Work
• LDR is a type of resistor made of a semiconductor material, such as
cadmium sulfide (CdS) or lead sulfide (PbS), that is sensitive to light.

• For a semiconductor(assume LDR) this energy gap can be overcome by


using a suitable intensity of light i.e, photons or photon-energy.

• The number of electrons and holes generated depends on the intensity


of light, and this affects the electrical conductivity of the material.

• In an LDR, when light falls on the semiconductor material, more


electrons are released, resulting in an increase in conductivity and a
decrease in resistance.
Graphical representation of working principle
Symbolic Representation
Aim
● The main objective of this experiment is

1. To interface LDR with Arduino UNO, read LDR data


and print on the Serial Monitor

2. To design a automatic street light controller using


LDR sensor and Arduino UNO
Circuit Connections: Objective 5(a)
Value Convertions
Value Convertions

1 .905 − log10 𝐸 Where


𝑅 2(𝑖𝑛 𝑘 Ω)=10 E  illuminance in lux
R2 LDR Resistance in k

𝑅2
3 .81 −2 log 10 ( )
1000
𝐸 (𝑖𝑛 𝑙𝑢𝑥)=10
S.No Vo (in digital) LDR Resistor (R2 in Ω) Illuminance (E in lux)
Objective A
float v0 = 0;
float R1 = 10000;
float R2;
float E;
void setup()
{
Serial.begin(9600);
}
void loop()
{
v0 = analogRead(A1);
R2 = R1 * (1023.0 / v0 - 1.0);
E = pow(10, (3.81 - 2 * log10(R2 / 1000)));
Serial.print("Resistance:");
Serial.print(R2);
Serial.println(" Ohms");
Serial.print("Voltage:");
Serial.print(v0);
Serial.println(" Volts");
Serial.print("Light Intensity:");
Serial.print(E);
Serial.println(" lux");
delay(1000);
}
Circuit Connections: Objective 5(b)
Circuit Connections: Objective 5(B)

Dark  MΩ
Normal Light  KΩ
Bright Light  Ω
OBJECTIVE B
float v0 = 0;
float R1 = 10000;
float R2;
float E;
void setup()
{
Serial.begin(9600);
pinMode(13, OUTPUT);
}
void loop()
{
v0 = analogRead(A1);
R2 = R1 * (1023.0 / v0 - 1.0);
E = pow(10, (3.81 - 2 * log10(R2 / 1000)));
Serial.print("Resistance:");
Serial.print(R2);
Serial.println(" Ohms");
Serial.print("Voltage:");
Serial.print(v0);
Serial.println(" Volts");
Serial.print("Light Intensity:");
Serial.print(E);
Serial.println(" lux");
delay(1000);
if (E > 5)
{
digitalWrite(13, HIGH);
}
else
{
digitalWrite(13, LOW);
}
}
Self Assessment Questions

1. What is voltage divider circuit?

2. What is the Principle of LDR sensor?

3. List out the pin in LDR Sensor module?

4. What is the Difference between Analog and Digital Sensor?

5. Is that LDR is Analog or Digital Sensor?


THANK YOU

Team – Fundamentals of IoT &


Sensors

You might also like