Timeline for Use photocell as digital input
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 11, 2016 at 10:40 | history | edited | William Roy | CC BY-SA 3.0 |
deleted 53 characters in body
|
Sep 7, 2016 at 9:12 | comment | added | Edgar Bonet |
You wrote: "Your voltage divider should observe this thresholds". No, it should not. If it does, then the pin is guaranteed to read HIGH when you expect it to read HIGH (good), but it will also read HIGH across a significant range of voltages where you expect it to read LOW (bad).
|
|
Sep 7, 2016 at 8:04 | comment | added | Gerben | I'd suggest using a potentiometer, so you can tweak at which light level the pin goes high/low. | |
Sep 6, 2016 at 21:07 | vote | accept | B L | ||
Sep 7, 2016 at 15:39 | |||||
Sep 6, 2016 at 20:52 | history | edited | William Roy | CC BY-SA 3.0 |
added 42 characters in body
|
Sep 6, 2016 at 20:45 | comment | added | Edgar Bonet |
The numbers you quote are not the voltage thresholds: they are the lowest voltages where the pin is guaranteed to be read as high. On the Uno, more than 3 V is HIGH , less than 1.5 V is LOW , anything in between is not guaranteed. The "typical" thresholds are 2.6 V for the LOW → HIGH transition and 2.1 V for HIGH → LOW . These are different thresholds because of the hysteresis introduced by the Schmitt trigger at the inputs.
|
|
Sep 6, 2016 at 20:24 | history | answered | William Roy | CC BY-SA 3.0 |