Intent
One knob, no digital anything: sweeps smoothly from absolute darkness up through a very dim glow — just enough to make out the shape of a person in an otherwise pitch-black room — with the fine control concentrated where it's actually useful, at the low end.
How it works
- A potentiometer feeds the ATtiny85's ADC. Firmware maps that reading through a gamma/power curve (
output = input^2.8) instead of linearly — eyes perceive brightness roughly logarithmically, so a straight linear map wastes the first ~20% of the knob's travel doing nothing. - PWM output drives the LED through a switching transistor, fast enough (~500Hz) that there's no visible flicker at any brightness.
- Powered over USB-C, not batteries — the power source changed twice during design (battery → 3×AA → USB-C, the last one a direct request, not a fix). No on/off switch; power just follows the USB plug.
Hardware
| Part | Role |
|---|---|
| ATtiny85V | Low-voltage variant, runs comfortably off USB's 4.75–5.25V range |
| 10kΩ linear potentiometer | The brightness knob |
| 2N3904 NPN transistor | Switches LED current — swapped in from an original 2N7000 MOSFET plan |
| USB-C breakout (VBUS/GND) | Power — replaced a 2×AA/3×AA battery plan entirely |
| 0.1µF ceramic cap | Decoupling, added during an electronics review |
Total cost, excluding the ISP programmer used to flash it: well under $10.
Status & next steps
- Breadboard prototype
- Program and test the gamma curve against real low-light perception, tune GAMMA
- Solder to perfboard / permanent build
- Housing and diffusion (frosted enclosure or diffuser over the LED)