Skip to the content
2 layers100 × 100 mmDesklight panel, the printed circuit board in 3D

ATTiny10 powered WS2812 RGB LED strip: hard- and firmware design

Size
100 × 100 mm
Copper layers
2
Thickness
1.6 mm
Parts
256
Nets
10
Pads
672
Tracks, vias
928, 32
Pours
48
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
27 Jan 2017
Updated
13 Sep 2025

Overview

Desklight panel is an open-source printed circuit board by dpiegdon, from the dpiegdon/tiny-ws2812-desklight repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 100 × 100 mm with 256 parts on 10 nets, routed with 928 tracks and 32 vias.

It is built around the ATTINY10-TSH. Its parts include 64 capacitors, 48 resistors, 48 connectors, 16 ICs and 16 switches. It belongs with the lEDs and displays boards and the AVR (ATmega, ATtiny) boards of this library.

Main components

1

README

README.md

ATTiny10-powered WS2812 desklight

Controller firmware and hardware for a very simple desklight that has a button and a digital encoder for color/brightness selection.

Controls a strip of WS2812 RGB LEDs which could e.g. be mounted at the bottom edge of your desktop monitor facing down towards the desk surface.

PCB v1.0 bottom side photo

(Above: bottom side of v1.0 PCB)

Authors

David R. Piegdon dgit@piegdon.de

License

All files in this repository are released unter the GNU General Public License Version 3 or later. This includes the schematic, the routed PCB and the firmware as well as the documentation and accompanying materials. See the file COPYING for more information.

Device interface

The rotary encoder has a button and can be rotated in both directions. The button cycles through different modes. In each mode you change a different variable by rotating the encoder:

  • Mode 1: change brightness

  • Mode 2: change color

  • Mode 3: change number of enabled LEDs

  • Mode 4: change starting position of enabled LEDs

Pressing the button for more than half a second resets all values to their defaults.

Firmware

You probably have to use a recent AVR-GCC Version for compilation. Version 5.4.0 is good, 7.3.0 yields even better results. As the ATTiny10 is very space-constrained, older gcc versions may not optimize well enough to meet the space-constrains with the current feature set.

If you want to change the number of lights in the firmware, please do so in ws2812.h. If you know what you are doing, you can also change the assignment to light_count in the firmware files (in ws2812_init(), calca_init(), if you don't want to recompile.)

Note that with the current master branch firmware you can use up to 126 LEDs. The actual constraint is something like lightcount <= max_value(int8_t)-1.

Firmware Changelog

v1.0

Supports four modes (brightness/color/enable-count/start-pos), should support 63 LEDs. Required GCC 7.3.0 or similar to fit size-constraints.

v1.1

Improved binary size. Now supports building with GCC 5.4.0.

v1.2

Support up to 126 LEDs.

v1.3

Fixed rotary dial directions to be consistent across modes.

v1.4

Fixed WS2812 timings to properly work with all LEDs. Allow LIGHT_COUNT to be overriden via CXXFLAGS.

master

(no more changes)

Hardware

You can find a Kicad-based schematic in the hardware directory.

The firmware is written for an Atmel ATTiny10. The latest version does not use the ADC anymore, so an ATTiny9 should do fine, too.

Connect a 5V 1500mA (or better 2000mA) power supply for a strip with 34 LEDs.

Hardware Errata

v1.0

Version 1.0 of hardware is fully functional and works perfectly fine. However, a few changes might be useful when doing another revision:

  • Schematic: Remove comment on questionable 1K resistor value. 1K resistors between uC and encoder are ok. Comment in schematic was already removed shortly after tag v1.0, as already can be seen in released PDF schematic of v1.0.

  • Schematic/BOM: Create a BOM. Well, maybe just specify the kind of rotary encoder. (Look for EC11 digital encoder on your favourite cheap chinese parts supplier)

  • PCB: Increase drill size for power lines on P2 and P3, so power cables can be soldered directly to PCB easily.

  • PCB: Mark RESET pin of TPI so it can be found easily when re-flashing a uC.

  • PCB: Mark TPI interface as "TPI".

Parts

256
QtyValueFootprintReferences
481kResistors_SMD:R_0603_HandSolderingR1, R1, R1, R1, R1, R1, R1, R1, R1, R1, R1, R1, R1, R1, R1, R1 +32
48CCapacitors_SMD:C_0603_HandSolderingC1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1, C1 +32
16100nCapacitors_SMD:C_0603_HandSolderingC4, C4, C4, C4, C4, C4, C4, C4, C4, C4, C4, C4, C4, C4, C4, C4
16ATTINY10-TSTO_SOT_Packages_SMD:SOT-23-6_HandsolderingIC1, IC1, IC1, IC1, IC1, IC1, IC1, IC1, IC1, IC1, IC1, IC1, IC1, IC1, IC1, IC1
16AVR_TPIPin_Headers:Pin_Header_Straight_2x03_Pitch2.54mmP1, P1, P1, P1, P1, P1, P1, P1, P1, P1, P1, P1, P1, P1, P1, P1
16Pwr5V1500mAPin_Headers:Pin_Header_Straight_1x02_Pitch2.54mmP2, P2, P2, P2, P2, P2, P2, P2, P2, P2, P2, P2, P2, P2, P2, P2
16Rotary_Encoder_Switchprojectspecifics:Encoder_PEC11RSW1, SW1, SW1, SW1, SW1, SW1, SW1, SW1, SW1, SW1, SW1, SW1, SW1, SW1, SW1, SW1
16WS2812_CONPin_Headers:Pin_Header_Straight_1x03_Pitch2.54mmP3, P3, P3, P3, P3, P3, P3, P3, P3, P3, P3, P3, P3, P3, P3, P3

The 192 most common of 256 parts.

More from dpiegdon/tiny-ws2812-desklight

1
  • 2 layers25 × 25 mmDesklight, the printed circuit board in 3D

    Desklight

    dpiegdon/tiny-ws2812-desklight

    ATTiny10 powered WS2812 RGB LED strip: hard- and firmware design

    16 parts10GPL-3.0

Similar boards

  • 2 layers200 × 100 mmRegalodilara, the printed circuit board in 3D

    Regalodilara

    valerionew/very-good-uc-doggos

    A special graduation present for a special friend. Six microcontrollers in one devboard

    91 parts50
  • 2 layers7.4 × 12.2 mmSMOL, the printed circuit board in 3D

    SMOL

    heyspacebuck/SMOL

    Slot-in Manipulator of Output Levels

    19 parts16BSD-3-Clause
  • 2 layers13 × 10.2 mmNoise guy, the printed circuit board in 3D

    Noise guy

    kinoshita-lab/noise-guy

    noise generator made by ATTiny10

    16 parts10MIT
  • 2 layers65 × 56 mmElPiHat, the printed circuit board in 3D

    ElPiHat

    HB9UF/ElPiHat

    EchoLink Hat for Raspberry Pi

    82 parts6
  • 2 layers11.4 × 9.1 mmPMIC, the printed circuit board in 3D

    PMIC

    whinis/AttinyPMIC

    Using an Attiny10 as a push button On/Off controller

    4 parts6Unlicense
  • 2 layers24.6 × 11.1 mmPWM+fan stop, the printed circuit board in 3D

    PWM+fan stop

    yvoronkin/FANSTOP

    In a small form factor, an extension of the fan control is implemented.

    24 parts2CERN-OHL-S-2.0
  • 2 layers134 × 83 mmIDBoard, the printed circuit board in 3D

    IDBoard

    andywm/DrawerID

    280 partsMIT

Questions

How big is the Desklight panel PCB?

It measures 100 × 100 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Desklight panel use?

256 parts, built around the ATTINY10-TSH. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Desklight panel KiCad files?

From the dpiegdon/tiny-ws2812-desklight repository on GitHub, at the commit this page was made from: the board is hardware/desklight_panel.kicad_pcb and its schematic hardware/desklight.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Desklight panel design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).