Electronic, mini wooden Christmas trees

That original version of this project used 3 mm light-emitting diodes (LEDs) and no printed circuit board. Because of its size, it was tricky to wire and not so easy for a novice to construct. But the version of the project being followed here has been updated and adapted for easy construction.

Program wooden mini-Christmas trees to sparkle and sing
By Corey Beckett


Lights, music, Christmas!

Back in 2005 when I was 12, I decided to make a number of special Christmas presents: miniature wooden trees that flashed lights and played Christmas tunes.
That original version of the project used 3 mm light-emitting diodes (LEDs) and no printed circuit board. Because of its size, it was tricky to wire and not so easy for a novice to construct. But the version of the project being followed here has been updated and adapted for easy construction.
I made these trees from 6 mm-thick customwood but anything suitable can be used. The trunk is made wide enough to hide the battery box which attaches at right angles to the shape at the bottom so it can act as a support to hold up the tree.
I made my tree 200 mm high and shaped it with four progressively wider triangular bases or “skirts” ranging from 51 mm-wide at the top to 130mm-wide at the bottom. You can obviously make the dimensions to suit yourself.


Cardboard template and cutout.


Rear right side with battery and board.

Construction
I prefer to make a cardboard template rather than sticking paper onto wood. I marked Drilling holes for LEDs. I marked the tree shape onto the customwood before checking this and cutting the tree out with a jigsaw. Drill the LED holes to suit the size of the LEDs (in this case 5 mm) and use a countersink tool to remove the burr on the rear. A quick sand cleaned up both sides and a can of green paint made them look like trees.
You can add more detail or paint the base a different colour but the novelty is the LEDs and the tunes.


Drilling holes for LEDs.


Inserting LEDs.

LEDs
There are 18 LEDs in total, six each of green, red and yellow colours. Because the 3 x AA 1.5v batteries give a total voltage of only 4.5v, it was necessary to wire two LEDs in series, making three pairs in each colour. The nine separate “pairs” have a small current-limiting resistor and are wired to the collector of a transistor on the CHI040 board.
You will need to orientate the first LED in each pair to allow the anodes (this is the longer lead or the lead away from the fl at of the mounting ring) to be joined. This is usually easier if the anodes are closest to the outside. Press the LEDs in the holes you have drilled until the mounting ring is against the board. This will ensure the LED protrudes past the front of the tree.


Forming LEDs…


…close-up.

Wiring
It is easiest if you draw the wiring prior to doing any forming. Use the template and some coloured pens to make a paper representation of the rear of the tree.
I started by picking where the three “pairs” of a particular colour would meet before bending and forming the LED leads. You need to be careful about the length of the leads. When I designed the new size, we increased this to compensate for the larger 5 mm LEDs and forgot about increasing the length of the LED leads, too. The result is that some of these leads require short extensions to enable them to join (use the off-cuts of other LEDs).
Take note of the tree shape as you will need to bend some leads to ensure that they stay hidden. When you are happy with the layout, start soldering the leads and then add short pieces of wire to join the commons together.
Add the 9 x 100 ohm series resistors to the cathode of the second LED in each pair, leaving a small length to solder to the wire that goes to the circuit board. You can test your wiring by using the battery pack and some clip leads. The +ve (red) should go to the common and the –ve (black) to the series resistors. If you have all six LEDs of the one colour going, then move on to the next colour.


Soldering LEDs.


LEDs wired.

Circuit board
We used the PICAXE CHI040 board which contains a PICAXE 08 programming socket and the transistors need-ed to drive the LEDs. A switch is fitted to turn the sound off and a piezo buzzer added to Output 2 to play the tunes. Originally there was no switch, so pin3 was low. I chose to add the ON detection to stop the music playing endlessly (ON = silent). If this is the case, the program then allows the patterns of light from the LEDs to play silently in sequence.
One wire link across Tr3 is required, and the 1K ohm resistor replaced with a zero ohm or link, as shown on the board photos. The buzzer is wired with the +ve into the centre pin of Tr3, and the –ve to the cathode of D3.

Switch
The switch is anything that you have. In this case I modified an existing slide switch by cutting off the mounting lugs and all but two pins. This is fitted across input 0 on the board.
The completed board is wired to the LEDs using Outputs 0, 1, and 4, and to the battery box.


Board populated.


Link required

Attachment
The battery box holds the three AA batteries and has an on/off switch. I used velcro to attach the battery box to the tree and the board to the battery box. Place a strip of Velcro or some spots on the face of the battery box that isn’t the cover, nearest the on/off switch, and put the attaching strip on the tree, making sure it is hidden by the trunk. Some more Velcro on the side opposite the switch allows the board to be attached to the rear of the battery box.

Lights and music
For lights and music together, the PICAXE 08M contains three built-in tunes (Jingle Bells, Silent Night and Rudolph the Red-nosed Reindeer). You can also program it to fl ash the LEDs on Outputs 0 and 4 while the tunes play.
As you can add your own tunes for PICAXE to play, I contributed Merry Christmas and Deck the Halls as well as three patterns for the LEDs to follow. In the program, the numbers ($22, $27…) represent each note you put in. I added three patterns for fl ashing the LEDs while the songs played. The listing is available on the website to download which will save some typing.


Link wired


Switch modified

Patterns
At the beginning, the program monitors whether you want the tunes to play. The switch controlling the sounds is detected at the start of each LED pattern and at the end of each tune. The program checks to see if the switch is On (if pin3 = 1 then buzzer_off ) which indicates silence. If so, it jumps to the first pattern for the LEDs.
The lights play according to the fol-lowing repeating patterns:
Pattern 1, repeating: Turns each co-lour on in sequence and then off in sequence (20 seconds).
Pattern 2, repeating: Alternates each colour (20 seconds).
Pattern 3, repeating: Turns all LEDs on and then all off one second later (20 seconds).
The program returns to Main: and be-gins all over again.

Tunes
During the patterns of LED displays, the switch is checked each time it loops to see whether the sound should be started. If the switch is Off ( if pin3 = 0 then exit ), this is the signal to jump to Buzzer_On which will start the sequence of music.
Buzzer_On turns on Output 1 and starts playing Merry Christmas while fl ashing the LEDs on Output 0 and 4 because of the tune 3, part of the command. When Tune 1 and Tune 2 which I added have finished playing, the program jumps to the built-in tunes. We use play X, 3, where X is the inbuilt tune number and the 3 tells the PICAXE to fl ash the LEDs at Output 0 and 4 as the music plays. After each tune has played, the pro-gram checks to see if the BUZZER switch is off or on.
If it’s still Off, the next tune sounds. At the end of the fifth tune, the program checks the switch and if it is still OFF returns to Main: and starts again.
If you want only the LEDs to perform, you instruct the program to leave the switch ON which makes the buzzer silent.


Velcro strips attachment

Presents
When I first built these as presents several years ago, they worked great during testing. However, it was only when those happy to receive the presents had left the trees and music on for some time that they found the continual tunes formed a sort of psychological torture. The trees were quickly recalled for the switch to be added. That’s why this present version is programmed in a better way.
For that really “special” present, you could alter the program to play the tunes many times before detecting the off-switch. However, you might find your offer of a present the following year a bit less welcome.


Christmas tree schematic

DAD WRITES Christmas tree schematic.
Corey just turned 12 when he did this project so he had some limitations with code. Programming Editor (the software) has expanded since then and he has used at least one of the new instructions to update it. The software for PICAXE is free to download and the registration simply gives you the password. The download and installation also includes the datasheets for the various boards, manuals, and lots of examples.
The PICAXE site has some 72 Christmas tunes to download at
(http://www.rev-ed.co.uk/software/christmas_1.zip) as well as 15 anthems, 48 TV Themes and 800 other pieces of music.
If you want to add your own tunes, there’s a very useful utility called Tune Wizard to help you with the notes required when you install the Programming Editor Software (http://www.rev-ed.co.uk/software/bas805.exe).

Share:

More Posts

Creative duet

For Dave Pauling, making guitars is the natural fusion of two passions – music and wood.
Dave, who has been playing the guitar since he was 13, also knew the pleasure of pottering in sheds from a young age. His father is a “sheddie” from way back who, among other things, still spends many hours restoring vintage vehicles.
“I grew up helping him with his Model Ts, making bows and arrows, or working on a model railway we had in the loft,” he says.
While Dave himself has spent a fair few hours restoring a 1965 Mustang imported from San Francisco, he prefers working with wood. There’s something about the malleability and smell of wood, as well as its provenance, he says. Wood, especially the recycled timber he uses to construct his guitars, has had a previous life. “Every guitar I make comes with a pre-history.”

Rust, me and CRC Evapo-Rust

My tools and machinery were housed in an unlined shed for a few years, resulting in plenty of surface rust.
I tried removing it with abrasive products, but that involves an awful lot of manual labour and doesn’t always work well, not to mention the scratches it leaves on the tool’s surface. So I looked for a decent rust killer. CRC Evapo-Rust had a reputation, so I gave it a go.
Most of my affected tools were small enough to be immersed in the liquid. I had a container that I filled with Evapo-Rust, and an overnight immersion generally cleaned them up. The beauty of Evapo-Rust is that it’s reusable, so that container will last for the foreseeable future, probably a year for me.

A butterfly takes wing

This simple butterfly pendant or brooch (depending on the back fittings) is a very good exercise in several basic goldsmithing techniques. It also can be decorated in several different ways to produce strikingly different finished pieces of jewellery.
I drew this design more than 25 years ago for a company that then made paua-shell jewellery. They stamped out their products, so I often made the master patterns in copper and from these patterns they spark-eroded the dies.
If this design was being made in an art school, it would be stuck to a sheet of silver and the basic shapes cut from there. If a design was made this way in, say, 18-carat gold and the wing outlines (as here) made from 2.5 mm thick metal, the outlay and waste material would be considerable from a 2.5 mm-thick sheet of 18-carat gold plate. But we will make it like a professional craftsman who has to live in the real world where costs matter.