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.
Thanks!
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.
Parts:
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
10.) Wire
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.
Attachments
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!
12 Comments
8 years ago
If you want a really good lightsaber, get a 200mW laser pointer and a 36" by 1/2" polycarbonate rod and some pvc, attach the laser and the rod together with screws through the pvc, and you have an incredibly bright, very realistic lightsaber. Combining it with this sound module would be amazing.
Reply 8 years ago
Agreed! It would be awesome to see this paired up with a nice looking saber with good light visuals.
Reply 4 years ago
Add a Vaporizer mod to the design so the lazer has a medium to reflect in the tubing. it might require cleaning from time to time though. Another thought would be to use a reflective powder and a small fan to disturb the particles when the lazer is powered up. this would make for a nice swoosh power up effect as well.
6 years ago
Can the project board be connected to an accelerometer? That would control the swing and clash sounds and then the on/off be controlled by a single switch.
Reply 6 years ago
Hey prince link:
Thanks for your message.
The sound chip can't interface directly to an accelerometer, but you could do it by using another board in between. For example, you could hook up an accelerometer to an Ardunio (or other microcontroller), and then use that board to trigger the Foxonix sound board.
I agree that triggering the swing and clash sounds automatically would be awesome and make it even more realistic.
- ndb
Reply 4 years ago
you could take a coil and put a solid piece of copper inside to act as a switch. when a swing happens one coil can be set with less spring tension so it triggers the swing sound same with the clash but with a more tensile center piece. Many Kids grade lightsabers have these mechanical switches built in to trigger these. works good solid tech
6 years ago
Is it possible to attach a strip of LED's say about a metre in length rather than individual LED's and then achieve the same effect?
Reply 6 years ago
Hello Harold:
Yes, you can include more LEDs if you like. In my example I am using three LEDs that are all connected in parallel, and those are controlled using a single transistor. If you add more LEDs, you will need to make sure the transistor can handle the required current. But the effect should be the same, with all the LEDs fading in and out together like in my example.
Thanks for the question,
- ndb
7 years ago
Can you make an instructable with Arduino, instead of Foxonix?
Reply 7 years ago
Hi Wojtuma:
Thanks for your question. Arduino on its own isn't very good at playing audio or sound effects, which is why I use Foxonix for my toy and game Instructables. Audio and sound effects *can* be done with an Arduino, but it generally requires additional hardware, like a MP3 or WAV shield, or an additional sound board.
Foxonix on its own is a microcontroller with audio storage and playback capabilities, so it's perfect for these kinds of projects.
I do have an example project where I use Arduino and Foxonix together to make a talking thermometer. In that demo, the Arduino reads a temperature sensor and calculates the temperature, and then sends a code to the Foxonix board. The Foxonix board then plays the audio to say to current temperature. There's no Instructable for that, at least not yet.
Thanks again!
- ndb
Reply 7 years ago
Hi ndb!
I asked, because in my country Arduino is cheaper and easier to get.
And I don't want to spend too much money on my lightsaber, so I figured maybe
you can make an instructable for people like me :).
Thanks
8 years ago on Introduction
A cool modification for this project would be to replace the "swing" button with a simple tilt switch. That way, you would hear the swing sound effect as the lightsaber was tilted back and forth.