Introduction: Ultimate Lightsaber Lights and Sounds
This Instructable started as a general guide for how to add lights and sounds to costumes and props, but I got totally carried away and ended up with the electronics and program for the Ultimate Lightsaber.
It has great sound effects, including the "open" and "close" sound effects, plus "swing" and "clash" sound effects. Not only that, but I included LEDs that are synced to the sounds. When you press the open button, the LEDs fade in with that sound effect. When you press the close button, the LEDs fade out with that sound effect. When you press the "clash" button, the LEDs sync to the volume level of the sound effect to simulate a lightsaber strike. Awesome!
As you can see, I didn't build this into a prop (the lightsaber I have on hand is being pressed into service for something else), but that's where you come in. I'd love to see what you can do with this. And of course, let me know if there are any questions or comments and I'll help you out.
This program is a little bit more involved than what is usually necessary for a prop, but this Instructable can be easily adapted for much simpler costumes or props (or anything you want to add sounds to). I've included the source code for you so that you don't have to do any of your own programming.
Step 1: Parts and Stuff You'll Need
To make this project, you'll need the electronics for storing and playing back the sound effects and controlling the LEDs. To do this I'm using Foxonix, which is an awesome, easy-to-program platform for playing stored audio and controlling the other program functions.
1.) Foxonix Fox Development Board
2.) Foxonix Project Board
3.) Small speaker
4.) Four pushbuttons
5.) Three or four LEDs (or more - the number and color is up to you)
6.) Battery holder for two or three batteries (AA or AAA). I'm using 3 AA.
7.) One general purpose NPN transistor (I'm using an SS8050)
8.) One 100-ohm resistor
9.) One 1k-ohm resistor
11.) Soldering iron and solder
Step 2: Hardware and Software
Since the program is already complete and tested, we really just need to get the hardware up and running.
We're going to start by hooking up the Fox Development Board. This will allow you to test out the existing program so you can play around with it and see how it works. The Fox Board should be plugged into your computer with a USB cable. Here are the component connections as shown in the diagram:
1.) The speaker is plugged into the PWM jack.
2.) One pushbutton is connected between pin P1.0 and 3.3V (open button)
3.) One pushbutton is connected between pin P1.1 and 3.3V (swing button)
4.) One pushbutton is connected between pin P1.2 and 3.3V (clash button)
5.) One pushbutton is connected between pin P1.3 and 3.3V (close button)
6.) The base lead of the transistor is connected to pin P3.3 through a 1k-ohm resistor. The LEDs are wired to 3.3V and to the transistor as shown in the diagram. The board cannot drive three LEDs on its own with one pin, so we need to use the transistor.
All of the software files used to create this project are included here, but can also be found on GitHub. You can download these files and use them as is or modify them if you like. I recommend testing the existing program with the hardware before you make any changes.
To load up the code, you will need the Fox Hardware Programmer, which is part of the Foxonix software bundle. Use the Programmer to load the lightsaber.bin file onto the Fox Development Board. After the program is loaded, you should be able to press the buttons and hear the sound effects.
Step 3: Programming the Project Board
After you've tested out the program on the development board and everything is working and sounding great, you can load the program onto a (much smaller) Project Board for installing into your lightsaber. One of the super cool things about Foxonix is that the development board has the programming connector built in, so you can simply plug the Project Board into that connector and load up the code. Now you have a small, stand alone PCB with your program and audio on it, which is perfect for putting into various projects.
Step 4: Putting the Electronics Together
Now it's time to assemble the final electronics together. In this example, I've got everything glued down to a piece of foam core, but ideally this would be installed into the handle of your lightsaber. The buttons could be attached on the outside of the handle wherever is most convenient, and I've arranged the LEDs in a triangle pattern as if they were shining up into a transparent lightsaber blade. The speaker is in a generic plastic enclosure, but the speaker itself could also be housed inside the lightsaber handle.
All of the components are wired up to the Project Board the same way as was shown in Step 2. (The Fox Development board and the Project Board have the same pins and pads, they're just arranged differently.) To help make the assembly easier, I matched the wire colors in my assembled electronics with the wire colors used in the diagram in Step 2. All the red wires are Power, all the black wires are Ground, and the various other colors wire up the components.
The main photo above shows all of the electronics wired together, and the other photos show close-ups of the different sections. Refer to the notes on the photos for more details.
I hope you find this Instructable fun and useful. Please let me know any questions or comments, and check out my other projects.
You can also Follow me and mark this Instructable as a favorite. THANKS!
We have a be nice policy.
Please be positive and constructive.