INTERFACING PHOTORESISTOR WITH BHARAT -PI

by madhankarthick in Circuits > Sensors

12 Views, 0 Favorites, 0 Comments

INTERFACING PHOTORESISTOR WITH BHARAT -PI

OIP (10).jpeg

Photoresistors are analog sensors that can measure light. They are light dependent resistors that change resistance with the amount of light that hits the sensors.

Photoresistors are perfect for making light controlled switches. One common application of photoresistors is to control 5 volts relays to switch on a light bulb when it gets dark. They are also used to track daylight in weather stations and environmental monitoring systems.

How Photoresistors Works?

Photoresistor-Electrodes-and-Resistive-Material-300x186.jpg

Photoresistors have two separate electrodes on the sensing element. The semiconductive material increases in conductivity when more light hits it. When the conductivity increases, the resistance decreases. Therefore the resistance of a photoresistor decreases with increasing light intensity. Conversely, the resistance of a photoresistor increases with decreasing light intensity.

Characteristics

wavelength-detectivity.jpg

Types of photoresistors and working mechanisms

Based on the materials used, photo resistors can be divided into two types: intrinsic and extrinsic. Intrinsic photoresistors use undoped materials such as silicon or germanium. Photons that fall on the device excite electrons from the valence band to the conduction band. This creates more free electrons in the material that are available to carry current, and therefore less resistance. Extrinsic photoresistors are made of materials doped with impurities, also called dopants. The dopants create a new energy band above the existing valence band, populated by electrons. These electrons need less energy to make the transition to the conduction band thanks to the smaller energy gap. The result is a device sensitive to different wavelengths of light. Regardless, both types will exhibit a decrease in resistance when illuminated. The higher the light intensity, the larger the resistance drop is. Therefore, the resistance of LDRs is an inverse, nonlinear function of light intensity.

Wavelength dependency

The sensitivity of a photoresistor varies with the light wavelength. If the wavelength is outside a certain range, it will not affect the resistance of the device at all. It can be said that the LDR is not sensitive in that range of light wavelengths. Different materials have different unique spectral response curves of wavelength versus sensitivity. Extrinsic light dependent resistors are generally designed for longer wavelengths of light, with a tendency towards the infrared (IR). When working in the IR range, care must be taken to avoid heat buildup, which could affect measurements by changing the resistance of the device due to thermal effects. The figure shown here represents the spectral response of photoconductive detectors made of different materials, with the operating temperature expressed in K and written in the parentheses.

How to Use a Photoresistor?

1435224477.jpg

Let's see how a photoresistor react in light. Build the circuit above and notice how led brightness change.The resistance value becomes smaller when there is much light in the room. So in the dark the led remains off because the resistance has become very big.


Materials Required?

Artboard-1-e1686767346235.jpg
wires.jpg
KY018_Photoresistive_1.jpg
220_ohm-1024x964.jpg
  1. ·      Bharat-pi (board)
  2. ·      Jumper wires
  3. ·      Aurdinno-ide
  4. ·      Photo Resistor
  5. ·      Resistor(220 ohm)

Interfacing Photo Resistor WITH BHARAT -PI

F.jpg
wewe.jpg
WhatsApp Image 2023-09-08 at 15.18.16.jpg
WhatsApp Image 2023-09-08 at 15.18.17.jpg

Connections:

1.   Gnd pin – GND

2.   Vcc – 5V

3.   Led pin – pin 14

4.   Photo resistor pin – pin 15

CODE

1649279368-Ent-2022Python.jpeg

const int ldrPin =15;   

const int ledPin = 14;    

void setup() {

 pinMode(ledPin, OUTPUT);

 Serial.begin(115200);

}

void loop() {

 int ldrValue = analogRead(ldrPin);

 if (ldrValue < 4000) { 

   analogWrite(ledPin, LOW);

   Serial.println("LED OFF");

 }

else {

   analogWrite(ledPin, HIGH);

   Serial.println("LED ON");

 }

 delay(1000); 

}

code avilable at git hub: https://github.com/Madhankarthick/interfacing-photoresistor-with-bharat-pi/blob/6147d6c081a6845ff2081c43ef648dc01b25c72d/photo%20resistor.txt

Downloads

Applications

sub-buzz-13102-1500301127-1.jpg
OIP (10).jpeg
tUfPWLZD8ma9VDU4LZJXqX-1200-80.jpg

·       Light meters in cameras

·       Light sensors in robotic projects

·       Clock radios

·       Reduction in gain of dynamic compressors

·       Infrared detectors in infrared astronomy

·       Street lighting for automatic ON and OFF

·       Alarm clocks

Video

Interfacing photoresistor with bharat pi