• moekoe

ATtiny LED Spot or Strip Dimmer

Updated: Sep 10, 2019

Simple LED dimmer for 12V LED spots inside my van

For the "living room" inside my van - well, it comes with only one room - I designed this simple LED spot dimmer which is based on an ATtiny84 microcontroller. It consists of two main functionalities: the first one - of course - is to dimm the connected led spot while the encoder is turned and the other is that you can save the current brightness into the ATtiny's eeprom. I programmed it like this, because the input voltage of the controller PCB will be switched by an external switch and when you turn it back on again, the LED will fade to the last saved brightness.

Parts you will need

All parts for two dimmer PCBs
  • PCB

  • ATtiny84 microcontroller

  • EC11 rotary encoder

  • 78M05 5V voltage regulator

  • IRLML2502 n-channel mosfet

  • resistors 0603 (10k, 1k)

  • capacitors 0603 (10n, 100n)

  • capacitors cr54 100µ

  • LEDs 0805

  • 2x3 2mm pinheader

  • 2-pin screw terminal

The circuit consists of a few subcircuits only.


First one is used to get a stable 5v power source for the ATtiny. It consits of an 78M05 voltage regulator, two capacitors and a big e-cap to fix the voltage ripple from my van's battery.

Second one is for the rotary encoder with its filter to get readable states for encoder output A and B. The button (middle press) is just pulled high with a 10k resistor and gets low on button press.

Third one is for the LED output just beside the screw terminal. It consists of a n-channel mosfet IRLML2502 and a pull-down resistor and a gate resistor to the input of the ATtiny..

Last but not least is the subcircuit around the ATtiny, e.g. the status LED, the power LED and some pull-up resistors for the I2C interface as well as the RESET pin of the controller.


Actually, the interior of my van is a running project of mine. How the dimmer looks like in the van will be added in a couple of days/weeks. Nevertheless, the functionalities can be seen in action on my Instagram page.


273 views
Follow me
Moritz König

Electronic enthusiast,

Maker, Electrical engineering student, Creating things with electronics, PCBs, 3DPrinting, lasercutting and all I found in the garage

© 2019 by Moritz König