During the recent Vivid music and light festival in Sydney, there were stalls selling toy light sabres and other accessories with colourful lights. Obviously these toys attracted many kids (and adults) to buy and play with them. However, I was "too cheap" to spend $20 for such simplistic toys. As they reminded me of my RGB LED strip that has been sitting in my drawer, I decided to use them to make toy light sabres for my kids. This post provides the step-by-step construction. Note that my version of the light sabres is not rugged enough for children under 5 years old.
List of components:
- 60 cm packaging tube for DIP chips
- 50 cm addressable RGB LED strip
- 3 single-core cables would also work - I happened to have a 3-core cable in the storage
Step 1: Step 1 - LED Strip Into the Tube
- Insert the LED strip inside the tube with the LED facing away the groove side
- Ensure that the end of the LED strip with label DI is at the opening of the tube
- Place the 3-core cable inside the groove
- Solder the 3-core cable to the LED strip's terminal (5V, GND, DI)
- The groove side may need to be cut-off slightly so that the soldered end can be pushed into the tube (at least not protruding too much). Later this end can be sealed with glue gun or epoxy.
Step 2: Step 2 - Controller Box
- The battery holder will be used as the controller box and house both batteries and the electronic boards
- Cut-off the partition in the middle to make a room for the Arduino board and DC-DC module
- Remove the battery contact in the middle area on the left hand side of the box
- Cut-off the spring of the battery contact in the middle area on the right hand side of the box
- Solder the two battery contact on the right hand side of the box using a short wire
- Position the box on the groove side of the tube so that two screws can be placed to mount the tube on the box. Make sure to leave about 10 cm on the other end of the tube (enough room for your palm to hold the light sabre.)
- Secure the box and tube using a double tape
- Drill two holes (2mm) on the box where the middle partition was, through to the tube
- Drill a hole on the box or cut-off its top part to allow the 3-core cable to get inside the box
- Insert the two M2.5 bolts, washers and nuts to the holes
- Desolder and remove the USB socket on the DC-DC module
- Solder the red and black wires of the battery holder to the DC-DC module's input
- Attach the 5V output of the DC-DC module to the Arduino's RAW terminal
- Attach the ground of the DC-DC module to the Arduino's ground (near the RAW terminal)
- Solder the 3-core cable to the Arduino board (5V->VCC, GND->GND and DI->pin 4)
- Place a padding foam on the middle part of the box to cover the protruding end of the screw
- Place the Arduino and DC-DC boards on the foam
Step 3: Step 3 - Programming the Arduino
The code to program the Arduino is available from Sparkfun tutorial. This tutorial also contains more information about the WS2812 LED.
Step 4: Step 4 - Final Touch Up
- Seal the both end of the tubes using glue gun or epoxy
- Paste glue in the groove to keep 3-core cable stay inside
- I used 2 NiMH batteries giving a total voltage of 2.5V. It was sufficient to power the DC-DC module.
- I am still looking a suitable handle cover to cover the shorter end of the tube (e.g. of a bicycle handle)
- At one point, I happened to use flat rechargeable batteries. The total voltage was only 0.6V and the DC-DC module's output was about 2V. Most of the LEDs were on but static because the Arduino was off.
- My battery holder didn't come with a small screw to lock it. So I used a 5 mm M2.5 screw which was a bit too long but worked.