Dancing christmas tree
a christmas tree that dances based on played music
Created by
schuilchristiaan
Tier 5
18 views
0 followers
1mon ⚡
approved Dancing christmas tree ago
Tickets awarded: 24 tickets
Tier: 5
really cute project!
schuilchristiaan
submitted Dancing christmas tree for ship review ago
1mon ⚡
requested changes for Dancing christmas tree ago
really neat project! please add a picture of it to your readme!
Tier: 5
schuilchristiaan
submitted Dancing christmas tree for ship review ago
schuilchristiaan
added to the journal ago
i build the christmas tree
I 3d printed all the parts for the christmas tree and assembled it:

After thatt i uploaded the software to the esp32, connected the servo and started the python script but it didnt work correctly since the latency was very bad like 30 seconds i tryed everthying i could think of to get it to work but i couldnt with stereomix so i decided to rewrite the code and use my normal mic this time with greatly improved the latency. Here is the new code:
Python:

C++:

i works good as long as the christmas tree is far enough away from the computer since the noice from the servo otherwise interferes with the mic and then it moves to the noice of the servo
Tanuki ⚡🚀
approved Dancing christmas tree ago
Tier approved: 5
Grant approved: $0.00
I bumped this to a t5 as it seems to be relatively simple, however, this is really really cool :D I love the creativity!
schuilchristiaan
submitted Dancing christmas tree for ship review ago
schuilchristiaan
added to the journal ago
Made the 3d design for the tree
I was planning on using a cloth to make the tree part, but at the suggestion from funkeudo i'm going to 3d print it which is way nicer so i 3d modeled a tree to fit onto the mechanism and i made the BOM a .csv file, i also updated the readme with the new assembely picture and i added all the 3d files to the repository.
full asembely:

zsharpminor ⚡
requested changes for Dancing christmas tree ago
Hi! Cool project, but where are you planning on getting the tree part from? Maybe 3d model one? Additionally, your BOM needs to be in CSV format.
schuilchristiaan
submitted Dancing christmas tree for ship review ago
schuilchristiaan
added to the journal ago
made the 3d design
I built the mechanism that will create the movement. Over this mechanism, there will be a cloth that forms the shape of the tree, which will then move along with the music being played. I used a mechanism I learned about from an infinity cube that I 3D printed. It consists of an extended part and a matching hole, both with fillets added to ensure they can be 3D printed properly.
I also created an assembly to check whether everything worked as I expected, and it did.
Mechanism:

Wireframe:

Normal:

schuilchristiaan
added to the journal ago
Making the computer side code
I programmed the computer-side code in Python, since I already had some experience with it. At first, I tried using Bluetooth because I thought it would be nice to make it wireless, but the latency was very high—around 30 seconds. So, I switched to USB serial, which is wired and much faster.
Figuring out how to access the audio from my computer was quite time-consuming, but I discovered I could use Stereo Mix. From there, coding was still challenging, but definitely doable.
schuilchristiaan
added to the journal ago
choosing components and way to code the christmas tree
Programming the Christmas tree is going to be the challenging part, so I wanted to start with that first.
To do this, I need to decide which components to use. Since it's almost Christmas, I won’t be able to buy anything new, so I’ll have to work with what I already have: an ESP32 and a TS90A servo motor.
Because I don’t have a microphone, I’ll be sending audio or movement data directly to the ESP32.
For the programming, I looked at a few different approaches. First, I considered using BluetoothA2DPSink, but this turned out to be a bit over my head. After that, I looked into using FFT, but I couldn’t get the library to work correctly.
Because of this, I decided to only send the servo position to the ESP32 and calculate the position on my computer instead, for which I wrote the following code for the esp side:

schuilchristiaan
started Dancing christmas tree ago
12/25/2025 7 PM - choosing components and way to code the christmas tree
Programming the Christmas tree is going to be the challenging part, so I wanted to start with that first.
To do this, I need to decide which components to use. Since it's almost Christmas, I won’t be able to buy anything new, so I’ll have to work with what I already have: an ESP32 and a TS90A servo motor.
Because I don’t have a microphone, I’ll be sending audio or movement data directly to the ESP32.
For the programming, I looked at a few different approaches. First, I considered using BluetoothA2DPSink, but this turned out to be a bit over my head. After that, I looked into using FFT, but I couldn’t get the library to work correctly.
Because of this, I decided to only send the servo position to the ESP32 and calculate the position on my computer instead, for which I wrote the following code for the esp side:

12/25/2025 10 PM - Making the computer side code
I programmed the computer-side code in Python, since I already had some experience with it. At first, I tried using Bluetooth because I thought it would be nice to make it wireless, but the latency was very high—around 30 seconds. So, I switched to USB serial, which is wired and much faster.
Figuring out how to access the audio from my computer was quite time-consuming, but I discovered I could use Stereo Mix. From there, coding was still challenging, but definitely doable.
12/27/2025 - made the 3d design
I built the mechanism that will create the movement. Over this mechanism, there will be a cloth that forms the shape of the tree, which will then move along with the music being played. I used a mechanism I learned about from an infinity cube that I 3D printed. It consists of an extended part and a matching hole, both with fillets added to ensure they can be 3D printed properly.
I also created an assembly to check whether everything worked as I expected, and it did.
Mechanism:

Wireframe:

Normal:

12/30/2025 - Made the 3d design for the tree
I was planning on using a cloth to make the tree part, but at the suggestion from funkeudo i'm going to 3d print it which is way nicer so i 3d modeled a tree to fit onto the mechanism and i made the BOM a .csv file, i also updated the readme with the new assembely picture and i added all the 3d files to the repository.
full asembely:

1/1/2026 - i build the christmas tree
I 3d printed all the parts for the christmas tree and assembled it:

After thatt i uploaded the software to the esp32, connected the servo and started the python script but it didnt work correctly since the latency was very bad like 30 seconds i tryed everthying i could think of to get it to work but i couldnt with stereomix so i decided to rewrite the code and use my normal mic this time with greatly improved the latency. Here is the new code:
Python:

C++:

i works good as long as the christmas tree is far enough away from the computer since the noice from the servo otherwise interferes with the mic and then it moves to the noice of the servo