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

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

Project Source on GitHub Return to the LEAP Catalog
About LEAP

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.

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 pull-request.

NOTE: For a while I included various scale modelling projects here too, but I've now split them off into a new repository: check out LittleModelArt if you are looking for these projects.

Project Gallery view the projects as an image gallery Notebook reference materials and other notes Follow the Blog follow projects and notes as they are published in your favourite feed reader