Welcome to our Instructable! We hope you enjoy and fully understand it!
Here is our video on YouTube:
We are a group of four students working in this project. Our idea of a Christmas FreakTree was born in Creative Electronics, a Beng Electronics Engineering 4th year module at the University of Malaga, School of Telecommunication (http://etsit.uma.es/index_en.html). We wanted to design a tree were you could see the "innards" of it, do the study, the design, implement it on a PCB and proof its functionality after a few months of hard work so we could feel that satisfaction of finish a project made of nothing (as you will see in this Instructable, we did the "dirty work" of a project).
There are a few complications you must know before deciding starting this project. You should have a basic electronic idea combined with a slight mechanical knowledge, and also a little bit of programming on Arduino Workspace. If you don't manage to understand the electronic area, we will give you the circuit ready to print on a PDF (I hope you download it successfully) and the program lines to build on your ATMega328. Anyway, check out the following steps and make sure you are ready!
- Once you print the circuit's paths it might be hard to join both faces of the sheet. Be aware that both have to move to the same place when you put the iron on it (check out step 2 for more details).
- Don't leave the PCB inside the acids for too long because some copper needed might disappear (check out step 3 for more details).
- The drills are very thin and delicate. Be careful and make sure you drill softly and slowly (check out step 5 for more details).
- You are lucky that we already give you the program files and the circuit on a PDF (it takes long...).
You must make a list of the components needed. We made that already, so you can check what you have and what you need (be aware of needing spare components or tools in case any breaks, better be ready for that). If you are going to order the components on the Internet, you´ll have to wait a few days till it comes (I'm sure you've experienced that :)). All the things we needed to build this tree are:
Component - Cuantity
Red LED 5mm - 64
Green LED 5mm - 64
Green LED 8mm - 1
White LED 3mm - 8
Green LED 3mm - 1
TLC5940 - 4
ATMega328P-PU - 2
Two faced PCB A4 - 2
Two faced PCB A6 - 2
Microphone - 1
Speakers - 2
Capacitor 10uF - 2
Wood Box - 1
Precut wires - 10
Resistors - 25
Tin - 100g
Double potentiometer 10k - 1
28 pins socle - 6
Soft Wire (star) - 10cm
Drill 0.8mm - 1
Drill 1mm - 1
Wire USB2.0 type B - 1
Thermoretractable wire - 50cm
Transformer USB 1A - 1
Connector USB2.0 type B - 1
Screws - 8
Nuts - 8
Switch ON/OFF - 1
Press button - 1
A short description of what we expect to get when we finish this project is:
- You must be able to turn on and off the system without disconnecting the battery.
- You must be able to change mode from shuffle playback (mode 1) to control playback (mode 0).
- You must be able to see which mode is on at the moment using a green LED (ON - Mode 0; OFF - Mode 1)
- You must be able to control lights using a microphone settled on the top of the tree.
- You must be able to change the speakers volume using a potentiometer from mute to loudest sound.
We hope you enjoy our Instructable!
Step 1: Circuit on PCB Wizard
The first thing to do is to download the free software that we used to design the tree circuit, PCB Wizard. We'll put the URL for you in case you don't have it.
Install it. It can take a few minutes. While doing so, download the ZIP I've embedded to the step before. Once you have it, unzip the file. Inside, you'll find four PDF, two for each face. You can print it directly from there but if you want to change something, you can also use the files from PCB Wizard that we used. It's opened to changes and improvements, if you consider so.
We've also added some pictures showing the process of building the circuit. Firstly, you need to choose the size of the tree that you want to make. We made it A4 shape. Then, we put the LEDs sequence building coloured rows, one green and one red, till you get to the top of the tree. As you can see, there's no need of using resistance for each LED like normally we do. That is because we are using TLC5940 chips (http://www.ti.com/lit/ds/symlink/tlc5940.pdf). They don't need to have a resistor on each pin that leads on a LED. You can see one at the bottom of the tree, which will supply one face of the shape. On the other face, we'll put the other TLC5940 and the LEDs connected.
The second picture shows the first face we made. It is not completed yet. The next picture has the whole circuit built. We added a few random components trying to simulate the Christmas tree decoration. We used electrolytic capacitors, resistors, inductors, AOs and whichever component you want. You can use broken or burnt ones or burnt. It won't interfere on the circuit functionality if you do it right.
And, at last, we've put a picture of the circuit printed on the special paper. It's yellowy, shiny on one side and rough and rugged on the other. You must print it on the shiny one, which gets sticky when touching the water. The next step will show what to do with the yellowy paper.
Step 2: Let's Ironing
Once you have finished step 1, you can stick the tree shape on the Bakelite sheet.
You'll need an iron. It doesn't need to have water spray. You'll also need a straight platform to work on it.
The first picture we put shows both the Bakelite sheet and the same sheet covered with the yellowy paper we made on the step before. On the second picture, you can see both faces put together. Between them we'll place the Bakelite sheet. It should look like that once you stick it on the sheet, otherwise, the wholes for inserting the components won't fit properly. Be careful with that. We had to do it twice because we didn't realise the faces weren't perfectly set. You must keep on giving heat ironing for about 10 minutes, it should be enough.
After that, carefully put the Bakelite sheet with the yellowy paper stuck on it inside a tray full of warm water. Leave it for 20 minutes. The contrast of temperature should help you later, when you take off the yellowy paper. The ink stuck to the Bakelite sheet shouldn't break. After you take off the paper, the Bakelite sheet is ready to bring out, dry and work with it on the next step.
Step 3: Playing With Acids
Now, we have the ink perfectly aligned on both faces of the sheet.
The next thing to do is to prepare the acids. What you need for the liquid is:
- Hydrogen peroxide 110º. (1/4)
- Etching. (1/4)
- Water. (2/4)
Don't forget to get the 110º, it's very important. If you want it to act faster, increase the amount of hydrogen peroxide, but not too much because it might not do its work properly. Don't exceed. Mix it all on a clean tray. You must do it on a breezy place because this liquid can be toxic if you inhale it for too long.
Put the sheet inside the tray carefully. We can't really tell a exact period of time to leave the Bakelite sheet inside the acids, it depends on the condition of the acid: if it's been opened for long it will take a little bit longer to eliminate the copper from the sheet but if the liquids are new it won't take that long. You should stay around checking on it till the copper is totally gone but not the copper that we need, under the paths. You'll see some bubbles coming out from the copper. Be careful and make sure it doesn't mislead on you.
After you take the sheet out and clean it from the acid, dry it. Make sure that all the paths are OK and test the connections with a multimeter. If something has gone wrong, don't worry, if it's a small thing you can fix it later putting a tin bridge or breaking the connection between paths that shouldn't be there with a cutter or a screwdriver.
Once you have the sheet cleaned and dry, you can start rubbing the useless ink. For that, we used acetone. You can find it easily on a supermarket or a chemistry. Women use it for their nails, so you might have some at home if you're living with one. The third picture shows how it was looking while we were rubbing the ink and how it should look at the end of this step.
Step 4: Cut Cut!! Pierce Pierce!!
Once you have the sheet with the paths printed on it, you can start cutting the sheet to make the typical Christmas tree shape. Make sure that the sheet is properly fastened to the table. Use an automatic hacksaw if possible, it'll make it easier and faster but if you don't have any just use a manual one but mind the movements, make sure you don't miss the shape. As you can see on the first picture, the hardest part is the inside of the tree because the line is very thin.
Now that the sheet is fastened to the table you can also do the sanding part. Carefully, go all over the outside of the tree shape till it gets softer.
After that, what we recommend is to mark each hole where you'll insert the component. It will help you when you start with the drilling part. Get the drill ready and, patiently drill all the wholes of the sheet. Be very careful because they are very breakable and delicate. We had to buy a few spare ones because we broke the first one... Assume that on the budget too!. We were using a stationary drill so it was easier to make the holes straight.
Step 5: Welding...
This one is the most repetitive step. You'll have to weld every component to the sheet. First, put each component on the right place, each green LED and red LED following the rows we talked about before. Also the other components for decorating the tree.
The first picture shows how we were proceeding on the welding step. We first started with the LEDs. The next picture shows how it looks with the LEDs, then with the broken components and the last piece shows the socle and the white LEDs of the outside. For those, we used the thermoretractable wires. We put it on the whiskers of the LED so that it doesn't touch any other pin or conductor. Once it's on the right place, give heat to it and it will stick to the whiskers.
That is all you have to do to get one sheet. Repeat the whole thing for the second sheet. Good luck!!
After the second sheet its done, follow the next steps which will tell you how to stick both sheets together and how to make the base for the ATMega328P-PU.
Step 6: Building the Tree
If you've reached this step, you must have two A4 size sheets of two PCB built. We recommend to weld the components to both faces before welding them together but not all of them. Leave the nearest column to the groove between the sheets with no weld because, otherwise it will get complicated to weld them. You can do that column after joining both faces, don't worry. You can weld them to stick them together.
The first picture shows how we welded the groove. The last part of it shows the star we made with a small piece of soft wire. It must be a conductor because we are going to put the microphone there. In the circuit draw we left two holes at the top of one of the sheets. We made that on purpose for welding now the metallic star. We also left two holes for the huge LED welded on the top, it also needed the thermoretractable wire. The second picture shows how it looks like with the microphone and the LED welded to the tree.
This microphone will let us change the sequence of lights. We will also have a switch at the bottom of the tree (in the wood box) to change the mode from random playing to consecutive sequences. The microphone will get the blow of the user and it will change the mode that's on. We will talk later about that...
The last picture shows how it will look like after doing the welding part and putting it on the wood box, which later we will prepare with another PCB with the circuit for the micros.
Step 7: Wood Box
We bought this box in a shop here in our neighbourhood. As you can see in the first picture is a normal wooden box where you can open the lid with a hinge. You can choose which ever box you want and the size you prefer but make sure that it can hold the whole structure of the tree.
We also got this wooden one because you can drill it and it's harder to break. If you want to add speakers to the design (we have) better choose a wood box because it'll be easier for you to make the holes.
The first thing we made was the holes for the speakers. We found the drawing on the internet, I've put a few URLs to help you choose the right shape for you:
You can find the right drill for your box. Use them to make the holes carefully, don't put them too close because you might break the wood. Try not to move the box while drilling. When the holes are made and finished with the drilling, sand the inside of the box to eliminate the spare wood left.
The next thing to do, shown on the second picture, it's the hole for the supply and the hole for the ON/OFF switch. We used a chisel and a hammer for that. If you don't know what that is (like me at the beginning) here is a link to a picture:
With the hammer, pull softly and it will fall easily (try to choose a box with a pine tree wood because it's very soft). You must also sand the inside and the outside of the box after this. If you want to add the press button for changing the mode, the volume changer and the LED that shows the mode, use those tools and a drill.
The last thing to do is to make the hole on the tip of the box to insert the base that we will build later. We used a specific tool: a DREMEL (http://www.dremel.com/Pages/default.aspx). You can do that when you decide the size of the PCB for the base. Our box has a hexagon shape, so our circuit must fit in that. The next steps shows how we made the PCB.
Step 8: The Base
As you can see in the pictures, it's the same process that we did for the shape of the Christmas tree. We printed the circuit on the yellowy paper, gave heat to it, put it in a tray with water, dry it and got the same that shows the first picture.
Then, we put it in the acid, like the second picture shows. Be careful with this!
Once we have the right copper for the paths, we cut the outside, leaving just the shape that we wanted for the tip of the box. You can see that the third picture shows the hexagon that we talked about. After that (like we did before) do the drilling part, drill a hole in each connection and also the bigger holes for the clamp screws in both sides. Don't forget to sand the outside of the sheets too!
The last thing to do is the welding. In this case, we put a few spare pins in the ones that the ATMega328 is not using for the tree function so, if you want to put any other functionality to the tree you just need to reprogram the micro and insert the pins needed. For easily usage, we recommend to write the name of the pin on a sticky paper and put it in the right place, you'll thank that!
Step 9: Finishing With the HW
Once you have the tree shape and the base, you can weld them together. The supply from the ATMega328 and the lines that control the LEDs and the microphone are also welded from the base to the tree at the bottom of the shape. The drawings of the base that we've attached to the first step has the perfect shape of both Bakelite sheets together. So it'll be easy to weld the correct lines.
After that, you must screw the base to the wood box. We used two screws but it depends on the box you use, if you don't have enough space just put one but try to put it in the centre of the box and if you have plenty of space, you should put a few more screws to make you sure it's very tight.
One thing we recommend is to label each pin of the ATMega328 in the inside of the box, under the base. That will make it easier if you want to add any other functionality. The third picture shows what we did to our tree.
You can also see on that picture how we put the speakers. We connected them with a few precut wires because if one of them breaks you can replace it easily. Same for the press button and the switch.
Another thing we made, which is not required, is the wooden plate with the capacitor. We also used the DREMEL named before to make the shape of the box. Mind the wires, the speakers and the hinge! The capacitor helps to quit and put again the wooden plate, which covers all the wires inside the box improving its appearance. You'll be able to keep things inside the box!
The second picture shows how it finally looks. We tried to make pictures of all angles so that you have an idea of what you should get after all these 9 steps.
Step 10: The Code
As you can figure out, you can't download the Instructable if you're not pro membership. So, we've decided to upload the code into the steps so that you can download the full version. You will see a few comments on it as an interpretation of certain sentences.
MicroMaster is the code of the master ATMega328. It sends orders to the slave (the other ATMega328) to set the mode and change it.
The master sets the sequence of LEDs and changes it if the microphone mode is on and someone blows on it. We made a few examples of sequences according to our map of LEDs: if you change any of the circuits drawings, the assigned number of each LED vary. Then, if someone presses the press button (the one that changes mode), the master changes the outgoing of the pin that communicates with the slave, advising the slave that the mode has been changes.
MicroSlave is continually playing songs. We've used a few examples of songs like Mario's song or Doraemon's, but you can add more songs or quit. Before adding a song, check out that the time of the notes and the pauses between notes are in milliseconds. It gets the interrupt from the MicroMaster and swaps mode. This ATMega328 also sets the white LEDs on and off nearly copying the song's rhythm.
That's all we can say about the code (more specific description commented directly on the code).