This LED is controlled byArduino. According to the experiment you will find when the light is strong, the LED will off. When the light is weak the LED will on. Do you feel strangewhy this happen without light sensor? Now let me tell you the answer.
Check the connection diagram:
As we know the LED will shine when poweredon.
So will it generate voltage when we use illuminateLED? After experiment it is Yes, the LED also has photovoltaic effect. Anordinary white LED will generate generates tens of millivolts of voltage at4.7M resistance if exposed to slightly strong light (For high-power LEDs, thevoltage generated is even higher).
When the load is 4.7M, the measurementresults of several LED photovoltaic effects in the room near the window:
Thanks PCBWay support, you can redeem Arduinoand bread board in their gift shop.
1, white LED:
2, green LED:
3, red LED
Here, Arduino take advantage of the featureof the LED for self-control. When there is no light, the LED doesn’t generate photovoltaiccurrent or the current is small. And the circuit controls its connection. Whenexposed to light, the generated photovoltaic current is large and the circuitcontrols its extinguishing. The control sensitivity threshold is set by theprogram.
LED goes out during normal lighting
LED shine after block light
The code:
int temp=10;
void setup()
{
analogReference(INTERNAL);
}
void loop()
{
pinMode( A0, INPUT);
//delayMicroseconds( 10);
if(analogRead(A0) < temp )
{
pinMode(A0, OUTPUT);
digitalWrite( A0, HIGH );
temp=15;
delay(1);
}
elsetemp=10;
}
Comments