Skip to content

πŸŽ„ PCB and code for a wifi enabled christmas tree as a PCB πŸŽ„

License

Notifications You must be signed in to change notification settings

Subtixx/ChristmasTreeESP32

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

50 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


Logo

ChristmasTreeESP32

A PCB Christmas tree using an ESP32 and 12 RGB LEDs

Table of Contents
  1. About The Project
  2. Why have I created this?
  3. PCB Preview
  4. Webpage Preview
  5. Android App
  6. WiFi Setup
  7. Issues with the current board

About The Project

This is a christmas tree as PCB with RGB LEDs. It is controlled using an ESP32 and contains 12 RGB LEDs. Which can be configured in pairs of 2 so it has 6 different "zones" for colors.

The software can support up to 256 frames of animation (While a frame of animation is roughly 500ms long). The biggest animation I have tested had however only 20 frames.

Before downloading the gerber files and ordering a PCB please take a look at Issues with the current board, since this was my first ever PCB build I have made some mistake in the design which are outlined in the file linked above.

The whole board was designed using EasyEDA. v2 will be designed in CircuitMaker if it will ever come out.

(back to top)

Why have I created this?

I know there are a number of soldering kits out there for a christmas tree as a PCB. However in my opinion those are lifeless and annoying. I had ordered one for christmas last year and it's not calming at all. The LEDs change color rapidly and in no order.

I wanted a tree which looked more realistic, had the ability to change animations and could possibly also display several colors and not just red and green.

This is why I created a christmas tree PCB with an ESP32 and RGB LEDs.

(back to top)

PCB Preview


Bottom View

Top View

Layout View

(back to top)

Webpage Preview

(Only frontend part is done)

(back to top)

Android App


Main view

Settings view

My files view

(back to top)

WiFi Setup

  1. Enter the SSID of your Wifi in WiFiCredentials.h:1
  2. Enter the password of your Wifi in WiFiCredentials.h:2

(back to top)

Issues with the current board

NOTE: As I am no electronic engineer the PCB does look ugly and can contain some non-standard things. Also after placing the order with JLCPCB, I have discovered that the silkscreen of the RGB LEDs are cut off, woops my mistake. Also I could not figure out how to get rid of the ESP32 Silkscreen.

All issues should be fixed with this new version.

- No idea why but I thought the PCB would be much much bigger than it is. It's smaller than the commercial one I got for christmas last year from ebay which was a huge disappointment to me.
  • I have not checked for the pinout of the ESP32... So I assume there are some reserved GPIO pins connected :/.

  • Pin 35 is connected.. However Pin 35 cannot be an output.

  • Some resistors are in series and not connected to the LED. Identified ones are:

    • Pin 17
  • The used part for the ESP32 has the wrong footprint (atleast the one I bought AZDelivery ESP32).. It works when bending while soldering but it should be fixed.

  • It is missing an LED on the top of the tree. It looks odd when having the tree turned on without one.

  • I have not used any ground plane. No idea if this is critical or if this makes me stupid. But I've connected the grounds for all LEDs using traces. Thinking about this one after the fact makes me feel dumb.

  • The slot on the trunk is too tight, PCBs are too thick to fit in there.

  • Not an issue but a note on my design, I didn't want to "harm" the look and feel of the tree. This is why I have only populated the front side with components.

(back to top)

Technical explanation

A post request has to be made to http://[IPofESP]/post with a JSON Encoded body. An example animation would look like this:

[
    [1, 0, 0, 0, 0],
    [2, 0, 0, 0, 0],
    [3, 0, 0, 0, 0],

    [4, 0, 0, 0, 0],
    [0, 0, 0, 0, 0]
]

It's a 2D Array with the first dimension being the frame of animation and the second being the color of a LED group. So in this example its a 5 frame animation (2.5 seconds long as one frame takes roughly 500 ms). With the following values

  1. Red
  2. Green
  3. Blue
  4. Yellow
  5. Off

(back to top)