X-mas Tree


As it is Christmas time and I wanted to do a simple, cheap and fun project, which works as a development board at the same time, I created this X-mas tree.


The project features an USB capable PIC16F1549 µC with:

  • USB FS device
  • 48 MHz internal Oscillator
  • 2 PWM modules
  • 10-bit ADC with Voltage Reference
  • Integrated Temperature Indicator Module

The LEDs are connected to the 2 PWM outputs via N-mos drivers. A Potentiometer is connected to one ADC channel for controlling the brightness of the LEDs or possibly the speed or variation of animations. Different modes of the X-mass tree can be switched by pressing a push button.

Schematic / Layout


The schematic shows that the µC is directly connected to USB. This is definitely bad practice, as the µC has no ESD protection. In several other projects I used a SOT23-6 USB ESD protection diode array and sometimes two additional serial resistors.

A 500mA Fuse F1 was added to protect the PC or power supply in case of a short circuit our failure. This will be an important step, as the X-mas tree will be used for a soldering workshop for working students and  anybody interested in electronics hardware or embedded software at my new job at NavVis in Munich (therefore the NavVis logo on the PCB).

The Layout is designed for two different levels of soldering skills. It features a TSSOP IC, a SMD USB connector and some 0603 resistors and capacitors for the skilled and through hole LEDs for soldering beginners.

Ordering the PCBs is quite cheap as all the 5 parts of the X-mas tree are on one 10×10 cm panel and can be bought from DirtyPCB for just 15USD.


Software update

For using the tree as a simple software development board it must be possible to use it without an InSystemProgrammer like the PICkit3. As the µC already uses an USB connection to the PC it makes sense to use a Bootloader for updating the program code. The code area is only 8K (words) and a full USB stack for the Bootloader takes up already 50% of it. Nonetheless it fits and there is still enough space for some blinky LED code ;).

Here is some code for controlling the Tree:

GitHub XmasTree

6 Kommentare

  1. Pingback: PCB X-mas tree - Electronics-Lab
  2. Pingback: KarmaCraft
  3. Brian Clark · Januar 15, 2017

    Can you put the hex file online Thank you.


  4. Niclas Henrichs · Dezember 25, 2017

    Hallo, ich habe diesen Baum als Geschenk erhalten und bräuchte bitte ein Codebeispiel um den Baum ansprechen zu können. Vielen Dank und schöne Feiertage


    • connycola · Dezember 25, 2017

      Ich kann am Mittwoch Beispiel Code dazu Posten. Schonmal viel Spaß damit 😃🎄


      • MatthiasW · Januar 4, 2018

        code ist jetzt auf GitHub. Ist ein einfaches Python Programm. Du brauchst HidApi dafür (bekommst du über pip). Du kannst XmasTree.py direkt benutzen oder als class wie z.B. im blink.py https://github.com/ConnyCola/XmasTree


Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:


Du kommentierst mit Deinem WordPress.com-Konto. Abmelden /  Ändern )

Google Foto

Du kommentierst mit Deinem Google-Konto. Abmelden /  Ändern )


Du kommentierst mit Deinem Twitter-Konto. Abmelden /  Ändern )


Du kommentierst mit Deinem Facebook-Konto. Abmelden /  Ändern )

Verbinde mit %s