I'm thinking of using an LDR for a night light, which uses an attiny25/45 etc to limit its LED on time to 5 hours (sleeping the other 19) for low power consumption. Battery is 3.7v (18650, protected)
The circuits I've seen and tested use a voltage divider setup as in Design 1. However, my test on the arduino, when I went from 5v to 3.3v, the reading of the voltage changes.
I believe I need a constant voltage coming in before the LDR, and then I can measure the voltage properly. Design 2 uses a zener diode that clamps the voltage at 2.4v and then goes to the LDR.
Is this the correct way to design this? Since I haven't seen this design used in any examples, wondering if I missed something before I test.
The circuits I've seen and tested use a voltage divider setup as in Design 1. However, my test on the arduino, when I went from 5v to 3.3v, the reading of the voltage changes.
I believe I need a constant voltage coming in before the LDR, and then I can measure the voltage properly. Design 2 uses a zener diode that clamps the voltage at 2.4v and then goes to the LDR.
Is this the correct way to design this? Since I haven't seen this design used in any examples, wondering if I missed something before I test.
Last edited: