Photo resistor using Arduino Micro controller   


Definition:
"A photoresistor  is a passive component that decreases resistance with respect to receiving luminosity (light) on the component's sensitive surface".
Description:

Checking the yield of a light-needy resistor, or photograph resistor, permits the Arduino to realize how light or dim it is. At the point when the light falls under a specific level, the Arduino turns on several LED. 

Checking the yield of a light-reliant resistor, or photograph resistor, permits the Arduino to realize how light or dim it is. At the point when the light falls under a specific level, the Arduino turns on several LED. 

A light-needy resistor, or photograph resistor, is a sensor whose obstruction diminishes as the measure of light falling on it increments. At the point when it is dim, the opposition of a photograph resistor might be as high as a couple Mω. At the point when it is light, in any case, the obstruction of a photograph resistor might be as low as a couple hundred ohms. 

Experiment using Arduino Micro Controller:

In this examination, we will associate a photograph resistor to an Arduino simple information and read the incentive with the analogRead() work. Contingent upon the worth the Arduino peruses, the program will at that point set pin 3 HIGH or LOW to kill on or turn the LED night lights. The limit esteem is 150. At the point when the simple worth read is under 150, the Arduino will turn the LED on. At the point when the simple worth it peruses is under 150, the Arduino will kill the LED.

Circuit and Code:

peepgrams.com

peepgrams.com

peepgrams.com

peepgrams.com



Code:
int sensorRead=0;

void setup()
{
  pinMode(9, OUTPUT);
  pinMode(A0, INPUT);
  Serial.begin(9600);
}

void loop()
{
  sensorRead=analogRead(A0);
  Serial.println(sensorRead);
  
  analogWrite(9,map(sensorRead,0,1023,0,255));
  
  delay(500);
              
}

5 Comments

  1. Seem Interesting to explore some knowledge of photo resistor. I'm can understand the working of code but interested to learn the actual thing happening here.

    ReplyDelete
    Replies
    1. sure! its as simple as it looks will explain it during Lab Session IA.

      Delete
  2. Sir
    It's Muhammad Azeem,
    Sir Everything on your website is well maintained and Frinedly user interface
    even i can find desired topic very easliy.

    ReplyDelete
  3. Sir, How can we connect & control electronic appliances by PC or Smartphone?

    ReplyDelete
  4. https://www.peepgrams.com/2020/06/iot-internet-of-things-how-they-work.html

    ReplyDelete

Post a Comment

Previous Post Next Post