ATtiny84 Night Light System Optimization
Budget: £20 – £250 GBP
Project Title: Smart Night Light with Motion, Light Sensor, Button, and Remote Control
Overview:
I’m building a handheld night light powered by an ATtiny84 microcontroller and a 3.7 V Li-ion rechargeable battery. The night light uses a 20-LED WS2812B strip and must respond to ambient light (via an LDR), motion (via PIR sensor), and user input (via both a button and an IR remote control).
The basic LED control works partially, but I’m running into timing and stability issues with the ATtiny84 + WS2812B combination. I need help getting the LEDs working reliably, integrating the sensor logic, and ensuring that both the button and remote control can cycle through colour modes.
Hardware Setup
Power: Single-cell 3.7 V Li-ion battery (must be supported in final design)
Microcontroller: ATtiny84A (programmed via Arduino Uno as ISP)
LEDs: WS2812B LED strip (normally 5 V but need to work from 3.7 V battery system — may require optimisation)
Sensors & Controls:
PIR sensor (motion detection)
LDR (ambient light detection)
Push button (manual mode switch)
IR receiver module (remote control input — required)
Support components:
10 µF capacitor across LED strip power
Shared ground between all components
Required Features
Automatic mode (night light)
If it’s dark (LDR) and motion is detected (PIR), the LEDs trigger a “thunderstorm” effect (lightning flashes).
After storm, all LEDs fade in together, stay lit briefly, then fade out.
Manual override (button)
Button cycles through static colour modes (red, green, blue, warm white, rainbow, etc.).
Remote control (required)
IR remote must cycle through the same colour options as the button.
Remote input should work reliably regardless of whether automatic mode is active.
Battery operation
Entire system must run from a small 3.7 V Li-ion cell.
Need reliable power delivery for the LEDs and MCU.
Efficiency and low idle current are important.
Current Status
Basic LED strip test works (LEDs can be lit).
However, colour changes, flashing, and effects are unreliable or not working.
ATtiny84 output pin stays at a constant high voltage when effects are attempted.
Suspect issue is WS2812B timing on ATtiny84 (library or CPU clock).
What I Need Help With
Getting stable WS2812B control from the ATtiny84 on a 3.7 V supply (or advising if a different MCU is better suited).
Integrating PIR + LDR sensor logic for the thunderstorm + fade sequence.
Implementing button + IR remote colour-cycle controls.
Designing the system to run safely and efficiently from a Li-ion cell.
Deliverables: Working Arduino sketch, wiring clarification, and notes so I can tweak colours/timings later.
Ideal Skills
Strong Arduino/ATtiny experience
Familiarity with WS2812B timing requirements
Comfortable with low-voltage operation of LEDs and microcontrollers
Experience integrating multiple inputs (sensors, button, IR remote)
Knowledge of Li-ion battery power management (boost converters, regulators, etc.
Overview:
I’m building a handheld night light powered by an ATtiny84 microcontroller and a 3.7 V Li-ion rechargeable battery. The night light uses a 20-LED WS2812B strip and must respond to ambient light (via an LDR), motion (via PIR sensor), and user input (via both a button and an IR remote control).
The basic LED control works partially, but I’m running into timing and stability issues with the ATtiny84 + WS2812B combination. I need help getting the LEDs working reliably, integrating the sensor logic, and ensuring that both the button and remote control can cycle through colour modes.
Hardware Setup
Power: Single-cell 3.7 V Li-ion battery (must be supported in final design)
Microcontroller: ATtiny84A (programmed via Arduino Uno as ISP)
LEDs: WS2812B LED strip (normally 5 V but need to work from 3.7 V battery system — may require optimisation)
Sensors & Controls:
PIR sensor (motion detection)
LDR (ambient light detection)
Push button (manual mode switch)
IR receiver module (remote control input — required)
Support components:
10 µF capacitor across LED strip power
Shared ground between all components
Required Features
Automatic mode (night light)
If it’s dark (LDR) and motion is detected (PIR), the LEDs trigger a “thunderstorm” effect (lightning flashes).
After storm, all LEDs fade in together, stay lit briefly, then fade out.
Manual override (button)
Button cycles through static colour modes (red, green, blue, warm white, rainbow, etc.).
Remote control (required)
IR remote must cycle through the same colour options as the button.
Remote input should work reliably regardless of whether automatic mode is active.
Battery operation
Entire system must run from a small 3.7 V Li-ion cell.
Need reliable power delivery for the LEDs and MCU.
Efficiency and low idle current are important.
Current Status
Basic LED strip test works (LEDs can be lit).
However, colour changes, flashing, and effects are unreliable or not working.
ATtiny84 output pin stays at a constant high voltage when effects are attempted.
Suspect issue is WS2812B timing on ATtiny84 (library or CPU clock).
What I Need Help With
Getting stable WS2812B control from the ATtiny84 on a 3.7 V supply (or advising if a different MCU is better suited).
Integrating PIR + LDR sensor logic for the thunderstorm + fade sequence.
Implementing button + IR remote colour-cycle controls.
Designing the system to run safely and efficiently from a Li-ion cell.
Deliverables: Working Arduino sketch, wiring clarification, and notes so I can tweak colours/timings later.
Ideal Skills
Strong Arduino/ATtiny experience
Familiarity with WS2812B timing requirements
Comfortable with low-voltage operation of LEDs and microcontrollers
Experience integrating multiple inputs (sensors, button, IR remote)
Knowledge of Li-ion battery power management (boost converters, regulators, etc.