Yes, that circuit would not have a problem with the LDR potential divider.
Have pin say 7 as an OUTPUT pin and make it go HIGH to read the LDR and LOW to power it down.
Its not recommended with higher current devices as the output pins are only rated for low currents.
Ok it looks working the voltage is 3.75V when ON and 0V when OFF. I use 10k Ohm.
Do you think I need to integrate a NPN transistor for my 1s of measurement?
Thank you guys.
Hi,
Please post a diagram of how you have the LDR and resistor connected to the controller?
Sorry what does that mean?
With the pin HIGH, what are the voltages at the pin and at A0, with respect to gnd?
With the pin LOW, what are the voltages at the pin and at A0, with respect to gnd?
Please be a bit more descriptive with your answer.
That's a good explanation of some tests that you made, but the results seem normal. Did you have some issue or question about it? If you don't believe that the circuit is turning off the current to the LDR circuit, why not use your DMM to measure it (in series with the 10k resistor).
Hi,
Thanks for the explanation.
Tip, When measuring voltages, measure with respect to gnd.
Your results were puzzling because you were using 5V as your reference.