You are on page 1of 4

60001170042 Prasad Mohite BE Elex

Experiment No.3

Photoresistor application
Aim- ​To develop street light based on photoresistors.

Apparatus- ​Tinkercad online simulation tool

Theory- ​A photoresistor (also known as a light-dependent resistor, LDR, or photo-conductive cell) is


a passive component that decreases resistance with respect to receiving luminosity (light) on the
component's sensitive surface. The resistance of a photoresistor decreases with increase in incident
light intensity; in other words, it exhibits photoconductivity. A photoresistor can be applied in light
sensitive detector circuits and light-activated and dark-activated switching circuits acting as a
resistance semiconductor. In the dark, a photoresistor can have a resistance as high as several
megaohms (MΩ), while in the light, a photoresistor can have a resistance as low as a few hundred
ohms. If incident light on a photoresistor exceeds a certain frequency, photons absorbed by the
semiconductor give bound electrons enough energy to jump into the conduction band. The resulting
free electrons (and their hole partners) conduct electricity, thereby lowering resistance. The
resistance range and sensitivity of a photoresistor can substantially differ among dissimilar devices.
Moreover, unique photoresistors may react substantially differently to photons within certain
wavelength bands.

Application of photoresistor
1. Street Light

LED is on
60001170042 Prasad Mohite BE Elex

LED is off
Code-

// variables:
int sensorValue = 0; // the sensor value
int sensorMin = 1023; // minimum sensor value
int sensorMax = 0; // maximum sensor value

void setup() {
pinMode(9, OUTPUT);
digitalWrite(9, HIGH);
}

void loop() {
if (sensorValue > sensorMax) {
sensorMax = sensorValue;
}
if (sensorValue < sensorMin) {
sensorMin = sensorValue;
}
}
digitalWrite(9, LOW);
}

sensorValue = analogRead(sensorPin);
sensorValue = map(sensorValue, sensorMin, sensorMax, 0, 255);
sensorValue = constrain(sensorValue, 0, 255);
analogWrite(ledPin, sensorValue);
}
60001170042 Prasad Mohite BE Elex

2. To control the speed of dc motor.

3. Tone pitch

Code
int sensorReading = 0;
void setup()
{
pinMode(A0, INPUT);
Serial.begin(9600);
60001170042 Prasad Mohite BE Elex

pinMode(9, OUTPUT);
}

void loop()
{
sensorReading = analogRead(A0);
Serial.println(sensorReading);
tone(9, 440 * pow(2.0, (constrain(int(map(sensorReading, 0, 1023, 36, 84)), 35, 127) - 57) / 12.0),
1000);
delay(10);
}

Conclusion- ​Thus we have studied the working of photoresistors. Also for different applications
circuits like street light, speed control of dc motor, tone pitch variation we have simulated the
result.

You might also like