Circuit Playground Lightsaber

by gcondon in Circuits > Microcontrollers

531 Views, 2 Favorites, 0 Comments

Circuit Playground Lightsaber

IMG_2506.jpg

This is a lightsaber made from 3D printed parts, including the blade, and has an Adafruit Circuit Playground that is running CircuitPython controlling it.

Supplies

You will need:

  • Adafruit Circuit Playground
  • NeoPixel Light Strip
  • 3D Printed Parts
  • Momentary push buttons
  • Battery pack
  • Speaker
  • Wires
  • m3x8 screws and matching nuts

Step 1: Print Your Parts!

IMG_2457.jpeg
IMG_2456.jpeg

The first thing that I did was organize and print all the STL files that are needed for this project. I printed all parts on a PRUSA Mini+. For the handle of the lightsaber, I used black and grey PLA filaments. The links to download the four parts that make up the handle are below:

Powercell

Barrel

Pommel

Emitter

I then made the hollow blade in a CAD program. The blade has a diameter of 1 inch and the walls are .15 inches thick. I printed the blade using PVB natural material that gave the transparent look I was going for.

Step 2: Design the Circuit

IMG_1E8D3C8BC6D8-1.jpeg

Next you are going to want to design your circuit and connect all the components. Here you can see that I connected one button to A3 and the other to A4 on the Circuit Playground. You will notice that the button has two terminals on it, one for signal and one for ground. These are actually interchangeable and it does not matter which is signal and which is ground as long as both are connected. Next, I ground the speaker and connected it to the AUDIO output on the board. The speaker I am using has a battery of it's own so I did not need to provide it with a power source. Finally, I connected the NeoPixel light strip to the board. It has three wires on the end of it: red, black, and white. The red goes to VOUT, black goes to GND, and white is the signal which I put at A6. After all these are connected, we have finished out circuit.

Step 3: Write the Code

I have attached the code that I wrote for the lightsaber to function properly. You want to make sure that you have adafruit_ls3dh and neopixel libraries in your board lib folder for the code to run correctly.

Downloads

Step 4: Putting the Lightsaber Together

IMG_2455.jpg
IMG_2500.jpeg
IMG_2502.jpeg
IMG_2501.jpeg

Now it is time to put the lightsaber together. You can disassemble your circuit from the alligator clips and cut wires to install in the handle of the lightsaber. First, I folded the light strip in half and put it into the assembled blade with the three wires hanging out of the end. Next, I glued the blade onto the emitter or top part of the handle. Then strip the wires that you cut and use electrical tape to attach to the alligator clips at the end of the light strip and then use screws (as pictured above) to attach it to the correct ports on your board. Once your light strip is all connected, attach the rest of the wires to your board with the m3 screws and nuts. Feed them through the large hole near the top of the handle out the bottom. Now it's time to install the buttons. Screw the corresponding wires into each terminal of the buttons and then insert them into the designated holes, adding super glue to make sure the button stays put. There should only be two wires left for the speaker. Feed the 3.5mm jack of the speaker through the bottom of the handle and then attach the wires to it, again using electrical tape to solidify it. Use a small amount of glue to stick the speaker onto the bottom of the light saber. Screw all pieces together and use one screw to secure the clamp. Your light saber is now put together!