Fork me on GitHub

Project Notes

#010 LightOrNot

Reads a photocell/light-dependent resistor and adjusts the blink rate of an LED accordingly.

The Build

Notes

The LDR and 10k resistor act as a voltage divider. The sequence and resistor selection depends on the LDR.

I haven’t been able to find the specific datasheet for the LDR I am using yet, but it runs to over 10k when dark, and resistance reduces with more light. Note that some LDRs work the other way around (increase resistance with more light).

So in the circuit used here, the A0 reading measures the voltage drop across the 10k resistor, so this will approach 1023 in strong light, and approach 0 in darkness. So the faster the LED blinks, the “darker” the measurement.

I could swap the 10k resistor and the LDR to switch the readings scale: i.e. approach 1023 when dark, and approach 0 when light.

The Breadboard Schematic

Credits and references

About LEAP#10 SensorsArduino
Project Source on GitHub Return to the LEAP Catalog

This page is a web-friendly rendering of my project notes shared in the LEAP GitHub repository.

LEAP is my personal collection of electronics projects, usually involving an Arduino or other microprocessor in one way or another. Some are full-blown projects, while many are trivial breadboard experiments, intended to learn and explore something interesting (IMHO!).

The projects are usually inspired by things found wild on the net, or ideas from the sources such as:

Feel free to borrow liberally, and if you spot any issues do let me know. See the individual projects for credits where due. There are even now a few projects contributed by others - send your own over in a pull request if you would also like to add to this collection.