Go Down

Topic: Arduino Lightsaber (Read 236027 times) previous topic - next topic

JakeSoft

Aug 20, 2014, 03:39 am Last Edit: Aug 19, 2016, 08:06 pm by JakeSoft
Hi, all. I used an Arduino Pro Mini 3.3V and a WT588d to create a custom sound board and LED controller for my lightsaber. I love this little board. Special thanks to SugarBombs for sharing his working code for the WT588d module! http://forum.arduino.cc/index.php?topic=227435.0 That really saved me some trouble.

Here are video and pics.


Core IC components: Arduino Pro Mini 3.3V, WT588d sound module, some small MOSFETs, and a 5V regulator.


Components mounted on some perf-board and inside the hilt.

And here is a video of it working:
http://youtu.be/3PacAFmnF_8

Update 1-29-2016:
If you are interested in building your own, please read this thread in its entirety before posting questions. You will find that it is a trove of useful information. Most common questions have already been answered.

Update 8-18-2016:
For help in creating your own Arduino saber sketch I have created the Universal Saber Library which supports various hardware. The most recent version is available on GitHub here:
https://github.com/JakeS0ft/USaber

Pedro147

#1
Aug 20, 2014, 06:03 am Last Edit: Aug 20, 2014, 06:05 am by Pedro147 Reason: 1
Good job.  The Force is strong with this one   8)   8)
http://www.pedroduino.com

flyingangel

Hi!

Wow, your lightsaber is realy cool! I'd like to update my one too! Do you have any shematics of your version? Which LEDs did you use?

Thanks for sharing,
Robert

raschemmel

Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

JakeSoft


Hi!

Wow, your lightsaber is realy cool! I'd like to update my one too! Do you have any shematics of your version? Which LEDs did you use?

Thanks for sharing,
Robert


Thanks! I am willing to share the design, but I don't have anything that is easy to share digitally; only hand-done drawings in a paper notebook. Give me some time to put something together.

raschemmel

#5
Aug 21, 2014, 01:51 am Last Edit: Aug 21, 2014, 01:53 am by raschemmel Reason: 1
Usually we don't have schematic capture software and most of us hate Fritzing because it is not a schematic so what we do is just take photos of the hand drawn stuff and post the photos. My cell phone camera is 8 Mega pixels so it is more than clear enough. I mean let's be realistic here. The guy just cares about how to build it, not how pretty the schematics are. If all the information is there I would say just put it out there as photos, and leave at that.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

JakeSoft

#6
Aug 21, 2014, 04:33 am Last Edit: Aug 22, 2014, 02:44 am by JakeSoft Reason: 1
I made an attempt to transfer the most useful drawing from my notebook. I don't have a good program at home for drawing schematics, so please excuse the crudeness of it.



Not shown are the bits where the N-channel MOSFETs are used to switch the main LEDs. That part is pretty straight forward, though. I hope this helps. If you build it, post up here; I'd love to see what somebody else does with it.

raschemmel

Perfect. Thanks !  What kind of leds ?  What current rating will the Mosfets need. ?
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

JakeSoft

#8
Aug 21, 2014, 01:51 pm Last Edit: Aug 21, 2014, 02:07 pm by JakeSoft Reason: 1
I used a Luxeon Tri-Rebel star LED array like this one:
http://www.ledsupply.com/leds/luxeon-rebel-endor-star-rgb-high-power-led

The Cree version would also work:
http://www.ledsupply.com/leds/cree-xpe-indus-star-rgb-high-power-led

The Custom Saber Shop sometimes has a version in stock with a deeper blue LED. I haven't tried it, but some claim that it makes a better purple when the colors are mixed with red.
http://www.thecustomsabershop.com/Luxeon-Tri-Rebel-Star-P777.aspx

Depending on the color, max current on these kinds of LEDs can range from 700mA to 1500mA. You shouldn't have a problem finding FETs to handle that. Mine are rated for something like 18 amps!

Also, I am noticing I made an error on the diagram. The negative for the WT588d should be on the far left pin at the top, not the right. I'll try to get a fix up for that tonight when I get some time.

raschemmel

Is there more than one led ?
FYI, if anyone is interested, the attached datasheet is for this mosfet from sparkfun (30A)
  https://www.sparkfun.com/products/10213 
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

JakeSoft

#10
Aug 21, 2014, 05:20 pm Last Edit: Aug 21, 2014, 05:21 pm by JakeSoft Reason: 1
Yes, there is more than one LED (there are three) used to light up the blade in my project example. The way I accomplished changing colors was to use varying levels of Red, Green, and Blue light that mixed together in the blade. At a very basic level, this same method is used by TVs and such to create different colors for each pixel. That's why you'll notice I have the blue lines to the MOSFET gates all connected to PWM-capable pins on the Arduino.

You don't have to do it that way. To simplify the project and operate with a single LED for the main blade, you could drop say pins 5 and 6 and drive a single MOSFET and single LED for the main blade on pin 9. That way you could still have the ramp-up/ramp-down effect during power on/off. You would loose color change and flash-on-clash functionality (at least, you'd have to come up with another implementation, maybe pulse the output or something instead of changing colors), but it would be easier to code and use fewer components (also cheaper, more room in your hilt, etc).

An example of this type of LED would be this:
http://www.thecustomsabershop.com/Luxeon-Rebel-Star-P523.aspx

Also available here:
http://www.ledsupply.com/color-high-power-leds


raschemmel

For the sake of others who are interested and don't know how to write the code to drive the leds, are you going to release your lighting code ? I saw the link for the sound code.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

JakeSoft

This will get you started:
http://arduino.cc/en/Tutorial/Fade

Programming-wise, fading these high-powered LEDs is no more complicated than that.

JakeSoft

I corrected the schematic in a previous post.

raschemmel

Roger that.
Schematic in Reply#6 corrected.
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Go Up