Lightsaber With CircuitPython Bluefruit: Become One of 5 of Your Favorite Star Wars Characters, With Quotes, Colors, and Saber Sounds!
by eliotmoose in Circuits > Microcontrollers
197 Views, 3 Favorites, 0 Comments
Lightsaber With CircuitPython Bluefruit: Become One of 5 of Your Favorite Star Wars Characters, With Quotes, Colors, and Saber Sounds!
Become one of many Star wars characters with my interactive lightsaber. But you must answer one question first: Join the Sith Lords or Rebel against the Empire and be a Jedi? May the Force be with you!
Supplies
Electronics
- CircuitPython Bluefruit microcontroller (accelerometer and neopixels)
- Strip of 60 LED Lights
- A battery pack containing three triple A batteries
- Alligator Clips
- 2 external buttons
Materials
- Lacrosse Stick Shaft (Any 2-4 ft, Lightweight stick works)
- 3D printed Lightsaber handle
Tools and Consumables
- 3D Printer
- Scissors
- Hot glue gun
- Soldering
- Clear tape
- Hand Drill
Coding
My coding process involved two major responses to either button being pressed. The green button is for the Jedis (“Good Guys”) which randomizes a character from a list of 3. Obi Wan has a blue lightsaber, Mace Windu is purple, and Yoda is green. All of their voices are triggered with clips upon activation. The red button is to activate the dark side, and gives a random output of Darth Vader or Darth Maul with a red lightsaber. Additionally, the accelerometer is used to detect lightsaber swings which trigger three different swinging and clashing sounds. The speaker is set up for an external speaker.
Downloads
Audacity for Wav Files
All characters have unique WAV files that produce quotes from the movies. Audacity was used to compress, convert to WAV, and increase the volume of individual files. All Wav files used are included in the file pack for this instructable.
3D Printing
With inspiration from online 3D printing projects, I created the lightsaber handle that attaches to the base of the lacrosse stick. This was about a 6-hour print using silver plastic. Two 3mf files are attached including an option for Luke Skywalker's lightsaber handle and Darth Vader's handle. Be sure to adjust the dimensions of the handle depending on the diameter of the stick you are using, the size of your microcontroller, and the size of your external buttons.
Assembly
The handle had to have holes drilled into it to attach the wiring of the buttons which are soldered to their connecting pins and the CircuitPython is taped to the bottom of the saber. Every wire except for the external speaker wires run up through the handle and attach to both buttons as well as the LED light strip. I have used a lacrosse stick shaft as my main stick operator but any firm 2-5ft rod will work fine.
Slicing
At this point, you are ready to slice and dice! Take on the droids and siths as Master Yoda, Mace Windu, or Obi Wan Kenobi, or decide to rebel against the Jedis as Darth maul or Darth Vader! Luckily, the lightsaber is kid friendly and cannot slice through metal or block lasers like the movies. May the force be with you!