Welcome everyone to my instructable on how to create a DIY spinning Christmas tree. This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com). To begin with, this instructable is NOT a step by step instruction guide because:
a) it would be absolutely massive and take away from the fun learning experience of the build whereas I could just give tips where I had failure points to help you avoid them
b) the build here is the version 1 build and has flaws that can be done better as I will detail. So overall it is better to structure it this way for your benefit so that you can make it better yourself and learn from my version
To make everyone's life so much easier and spare hours of work I have attached a link to a Google Drive folder with the parts and arduino code used to make this version of the project in this intro. Enjoy!
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Drafting the Design
From the Google Drive folder you should have access to just about every design for parts used in this build. If you only have access to SolidWorks I unfortunately am not positive which file types are needed to export into the software and apologize for that but I have read that the parts would be importable to SolidWorks as iges files if you can find access to the software to do this in some way, however I cannot confirm this.
Notes on modeled purchased objects:
I have linked the parts I purchased and used for the build. The motor I bought was a vast overkill for the application and even when driven with just three AA batteries it still spun quite quickly but the bracket went perfectly with it so adjust adequately with this in mind. Make sure your motor also can use the pulley system as well as most can but some shafts for the motors are pretty awkward to use. The Bluetooth module is not modeled for CAD here. Lastly I recall using a power drill with 1/8 and 3/16 drills to great success and similar bolt and nuts to keep everything together but I do not list that in the build of material as I bought them from a local construction store.
Notes on parts for 3D printing:
1.) ALL of my parts were created with a huge underestimation of the precision of the 3D printers I had available. I believe every part that is meant to mesh together have size differences that are just far too compensated and will allow too much jiggling. I highly recommend any part that meshes to have changes made to how much tolerance is given and if you are unsure about how to 3D print or what I mean just understand that you cannot design parts like a cube that has 1mm squared faces fit into a square hole of 1mm squared area. You need a little tolerance difference or you can try more advanced tricks here
2.) All the the tree layers mesh using half inch cleets into matching sockets but if you want to avoid having to epoxy the system for stability I would strongly recommend lengthening the cleets and the sockets to avoid falling over (this may require overhaul of the tree layers but I have not yet begun version 2 testing)
3.) You will notice that most tree layers are hollowed where possible compared to others. I recommend hollowing the second tree layer as this makes the wiring process far easier
4.) The static component meant to attach to the box and hold the spinning tree and mate with the slip ring frequently 3D prints imperfections because as the hot plastic cools around the limbs, they are so much smaller and isolated they tend to curl up and lead to the limbs not being straight. If you have access to a 3D printer with a hot bed or if you buy printing services from someone with hot beds you may not have to worry about this but be aware of it. I had to fix it by using a hot air blower extension that my soldering station had available to it. If you do that, use about 100 degrees fahrenheit and apply heat in the same way you blow dry hair until you can mend the mistake
5.) I laser printed and nail gunned my box together. Without good experience this may be tricky and lead to imperfections. If you do this though you must create 2D drawings in your software that can be converted into JUST vector data on a PDF (will just be geometry on the pdf that looks like your drawing). I did this one on SolidWorks as the Autodesk .dwg files did wonky things. One could alternatively 3D print the box but due to the sheer size this can be tricky so it must be done in parts that can mesh together like puzzle locking walls or cleets into sockets.
Step 2: Coding the Design
In the other subfolder given in the Google Drive is the arduino code. The key things to note about this code that can definitely be enhanced is as follows:
1.) I only used 2 outputs for RGB LED's in the code which vastly reduces the cool combinations available even though the slip ring can accomadate 6 connections meaning you can mix and match 5 outputs to do crazy things and reserve one wire to grounding
2.) Colors can be combined as I mentioned but all colors look far more crisp if you modulate their signals. I will elaborate on this at the end of this step
3.) I did not create the music code I pulled it from arduino forums so if you are more musically inclined do please make something that sounds far more pleasing. I have seen arduino shields that take SD cards that can pulse width modulate some crisp sounding music so look into it if you are interested
4.) I only have the one bluetooth command to control music but be imaginative and make more like different color patterns maybe or fix how the music does not turn of until the end of the verse
NOTE: To elaborate on modulating the LED signal, if you simply light two colors of an RGB at all times you will likely notice how the colors fail to perfectly mix for certain combinations like yellow or if you are not looking directly at the top one color will be in front of the other. PWM aleviates this as your eyes cannot make out the the difference when the light is only briefly lit allowing for the colors to mesh much better byt he time it reaches the eye. This means if you understand how to code on the Arduino, I highly recommend you use PWM outputs for the LED's.
Step 3: Wiring the Circuits
Lastly, there is a fritzing diagram in the Google Drive that with the software for Arduino fritzing shows the connections I have made to connect my circuitry.
It is important to note:
I could not find the correct power relay switch in the software but essentially the picture of this step shows how a proper relay is connected. You want to be aware of N.C. versus N.O. (normally closed or normally opened) because your motor wants to connect to normally opened in this configuration.
The batteries used are not accurate either as the parts from amazon are for AA battery holders so you would use a 3 pack instead for 4.5V.
The HC-05 is connected in a very important matter as the arduino has too much current being drawn from it to sufficiently power the the module and I apply pull-up resistors to the transmission lines for a similar power problem
You can do the LED's however you like that works so long as you give each LED its own resistor through the cathode common pin