Sensors
Automatic night light
Beginner20 min
A light that turns itself on when the room gets dark, using a light-dependent resistor.
What you get
An LED lighting up below a brightness threshold, adjustable and free of flicker.
Parts (simulated)
- Arduino UNO board
- Light sensor (LDR)
- 10 kΩ resistor
- 5 mm LED
- 220 Ω resistor
Nothing to buy: every component here is simulated in the browser.
Project steps
- 01Wire the LDR as a divider into the analog input.
- 02Read the raw value and print it on the serial monitor.
- 03Pick a trigger threshold from the measurements.
- 04Add hysteresis so the LED doesn't flicker at the threshold.
What you learn
- Voltage divider
- Analog-to-digital conversion
- Threshold and hysteresis
Other projects
- ⌚ Smartwatch
Build a complete watch: OLED screen, DS3231 real-time clock, navigation buttons, then the printed board that goes with it.
- 📺 Mini colour TV (SPI TFT)
The finish line of a 10-project display series: from a single pixel to a colour panel driven over SPI.
- 📻 Digital PMR446 walkie-talkie
A full radio link on the PMR446 band: modulation, channel, noise, demodulation and quality measurement.
- 📱 4G/LTE cellular phone
Understand how a phone attaches to a cell: OFDM modulation, mobility, echoes and useful throughput.