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.

Construction

The Breadboard

The Schematic

The Build

Credits and References

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

LEAP is just 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.

Projects are often inspired by things found wild on the net, or ideas from the many great electronics podcasts and YouTube channels. Feel free to borrow liberally, and if you spot any issues do let me know (or send a PR!). See the individual projects for credits where due.

For a while I have also included various scale modelling projects here too, but I've now split those off into a new repository. Check out LittleModelArt if you are looking for the modelling projects!

Project Gallery Notebook LittleCodingKata LittleModelArt More on my blog