Project

How to Build the Brightest LED Saber in the World

October 18, 2016 by Jeremy Lee

The brightest blade in the world. Fluid sound effects generated in real time. Any colour, changeable on the fly. If you want to know what it feels like to hold a Lightsaber, this project is the closest you can get today.

The brightest blade in the world. Fluid sound effects generated in real time. Any colour, changeable on the fly. If you want to know what it feels like to hold a Lightsaber, this project is the closest you can get today.

In Part 1 of this series, we'll go over the project's goals, how to choose the right components, and some of the software involved in constructing such a powerful device—and we'll be mindful of the dangers ahead by discussing battery safety and the safeguards in place to protect you and your saber.

LED Saber Testing

Introduction

First, I wanted to have the brightest blade ever—one that looked great on camera, even in daylight.

That was done with a 144 LED "Neopixel" strip (the highest density you can currently get of 24-bit programmable lights) and a modern DC/DC converter and LiPo battery capable of supplying the watts it can consume. 

In fact, I made it so powerful that I melted my first blade. The real limitation is the heat generated by a double-sided strip in a tube; we're doing the very opposite of heatsinking, and to prevent thermal overload we should keep the power dissipation of the LED strip to not more than 40% of the maximum. This means that we can't have a full-brightness white saber because white requires all three LED colors (red, green, blue), but we can have full brightness of one color along with small additions of the other colors. And we can still "burst" for special effects.

Even with that limitation, it's certainly bright!

How to Make Arduino Lightsaber?

My secondary goal was more esoteric. A Lightsaber isn't just an extended torch. There is also "The Hum"—that growling purr that lets you know you're holding something of immense power.

In the movies, this sound effect is created by the legendary Ben Burtt retreating to a studio and waving microphones around for several weeks. There was never a real physical object that made that noise when wielded (unless you count his entire mixing desk).

Shanks FX did an extensive video on the original sound effects and how to recreate them in the studio that I found very helpful:

How to create STAR WARS Lightsaber sound effects | Shanks FX | PBS Digital Studios

In fact, most of the time and effort in this project went into the software aspects of how to generate fluid real-time audio effects.

This "sword" knows you're holding it. If you become still, it does too. If you swing it unevenly, you will hear it. If you put it down, it will turn itself off.

This is possible because there's a computer inside. An Atmel 32u4 Arduino-compatible "Pro Micro" and a companion inertial measurement unit (IMU). To that end, another way of looking at this project is to ask: Can we create a “user interface” so natural that we completely forget we're using one? And so rugged we can drop it on bricks?

Shoto-length Saber

Completed (but unpainted) Shoto-length Saber. The blade still has a visible "glow halo" even in direct sunlight.

Lastly, I wanted my saber to look polished. At the end of the series, I'll go over the physical construction of my hilt (from hardware store PVC pipe and fittings). This is where I expect you to exercise your own creativity. No two Lightsabers should look quite alike because each is an expression of the maker's personality and local materials.

I'm not really a very artistic prop-maker—I tend towards basic and functional—but there are many fantastic examples on YouTube of saber hilts constructed from plumbing parts, hollowed-out metal torches, and even professional kits sold by various makers.

Be aware that the parts involved in this build are quite chunky and the “slimline saber hilt” kits are just too small (sorry). I used 32mm PVC pipe (which is actually 40mm across) as my main diameter, and even that was tight. But high-capacity batteries and DC/DC converters continue to shrink, so it won't be long before slimmer builds are possible. This project deliberately explores the limits of what is possible.

If you're good with Arduino code, you might reconfigure the controls or sound effects as well. My build had a voltmeter read-out to assist debugging that you'll see in all the pictures, but it's not an official part of the build, as it made wiring more complicated than it needed to be. Bench-testing with a multimeter serves the same purpose.

LiPo Battery Warning

This project is essentially a toy, but it uses an RC-grade LiPo (Lithium Polymer) battery and power system that can be dangerous if mishandled. The voltage is safe for humans, but there is enough power (20 Amps, 200 watts!) to start fires if a short-circuit occurs. If you build this saber, I expect you to carefully supervise its use.

LiPo batteries come with special handling requirements. They must be charged correctly and never be allowed to run "flat" or they may explode. 

 

LiPo batteries for Lightsaber

 

Always have a plan for the safe disposal of an overloading power cell. Fireproof bags are a good start. Be advised that water makes Lithium fires worse.

If you are experienced with building multirotors or RC (remote control) aircraft, this will all be familiar ground. (It's just a quadcopter without propellers, really.) Otherwise, this should be considered an advanced project that requires care and good construction skills, one which will hopefully give you experience with these kinds of power systems.

Circuit Diagram

LED Saber Schematic

Click to enlarge.

 

There's not much to this project's actual circuitry. We will make extensive use of pre-built modules and you'll mostly need to wire up connectors between them. 

In essence, power comes out of the battery, flows towards the blade, and a control signal is added along the way. Most of the features are in software, which doesn't show up on this particular diagram.

Parts List

Component Name

Price per Unit

Power Converter  
Hobbyking YEP-20 SBEC $18
(5x) Futaba 22AWG 15cm Servo Extension Cables $4
FrSky Battery Voltage Sensor (FBVS-01) $3
Controller  
SparkFun Pro Micro (5V) (Atmel32u4 Arduino) $15
MPU6050 IMU Breakout Board (GY-521) $5
"Digital Volume" Rotary Encoder Switch $1
Audio  
TPA2005D1 Audio Amp (SparkFun / geeetech) $7
8Ω 2watt speaker, 20-40mm diameter $2
Resistors: 1kΩ, 150Ω, 1/4W (small)  
Capacitor: 0.68μF electrolytic (anything from 0.47 to 1μF will do, but get as compact as possible)  
LED Blade  
1 meter (2x50cm joined) WS2812b RGB LED Strip $40
144 LEDs/meter density, White PCB, Waterproof IP65 Silicone Insulated  
600mm Polycarbonate tube (25mm Outer Diameter) and Blade Tip $10-20
Foam Packing Sheet (500mm x 100mm)  
Battery  
Zippy Compact 1000mAh 3-cell Lipo Pack $8
XT-60 Connector $1
--or--  
Turnigy 1000mAh 3S 20C 3-cell Lipo Pack $8
Male JST Battery Pigtail $1
Power Harness  
10A “Mains” Switch (optional) $2
Bullet Connectors or JST connectors (optional) $2
Power lights or voltage indicators (optional) $2
Heatshrink Tubing $1
Hilt  
20mm (3/4") PVC Compression Pipe Coupler (with rubber o-rings and screw-ends) $10
32mm (1 1/4") PVC Pipe (a 1m length is plenty) $2
32mm (1 1/4") PVC End-cap (get a couple) $2
32mm (1 1/4") PVC Pipe Connector (two or three of them) $4
Any other bits you like the look of $???

 

*Note that the Futaba 22AWG 15cm servo extension cables are also used by the controller and the blade subsystems. (Futaba connectors have a polarized edge.)

Futaba connectors have a polarized edge

Obtaining Parts

The RC components like the battery, DC/DC converter, and connectors can be found at Hobbyking (if not your local model aircraft shop) and the rest at DigiKey, SparkFun, eBay, and the usual internet sources. The rest is PVC pipe and plumbing fittings from the hardware store.

The main component there is the Hobbyking YEP 20A HV (2~12S) SBEC (Switch-mode Battery Eliminator Circuit), also known as the MTTEC KETO HV BEC 12S. This device is really what makes a hand-held saber possible. I don't know of an equivalent, but I'll be looking. For now, it's the key to the build.

That takes care of the DC power. Now we have a pair of my favorite semiconductors: an Atmel32u4 microcontroller and the MPU6050 IMU.

 

 Atmel32u4 microcontroller and the MPU6050 IMU

 

The project uses features specific to the 32u4 (such as the high-speed Timer4) and is designed around the physical shape of the “Pro Micro”, but other Arduino Leonardo–compatible boards should work with minor modifications.

They must be the 5V version running at the full 16MHz clock rate. The 3.3V version is inadequate both in terms of voltage (to control the LED strip) and computing power (to run the sound synthesizer).

Of course, we need a nice LED strip for the blade:

 

LED strip for the blade

 

Most of the "1 meter" LED strips you will find online are actually two 50cm strips joined together with an obvious gap in the middle. For a 50cm "Shoto" sized blade, that's great—we just need to disassemble the strip back into its original halves. Convenient! And cheap, too, at less than $30 on eBay right now.

If you intend to "battle" with your saber, I'd consider this a consumable. Enough hits and you're going to break it eventually, so keep an eye out for deals. The design allows for easy change-out of blades in the field, if you have backups prepared.

 

 

Close up of the "missing LED" where the two strips join, and the IP65 silicone coating.

 

If you want a longer blade (70-90cm is a full Lightsaber length), then you either need to go for more expensive continuous strips (and I don't know where you'd find them) or modify the cheaper strips to edit out the join gap with some whittling, tucking, folding, and resoldering.

Be sure you're getting WS2812b LEDs. The 5050-package LEDs should have FOUR pins per package and be right next to each other, and the strip should have THREE connections on each end. Three only. Not two (that's a single color strip), not four (that's an analog RGB strip, or a different serial protocol).

You also want a strip that has a WHITE background (not black) for maximum light reflection out of the blade, and that is coated with IP65 silicone for physical protection. (IP67 and IP68 have a thicker rectangular sleeve that likely won't fit.) It should be the same cost, just an option when ordering. You really want the waterproof version, because of the greatly enhanced physical robustness (shock-proofing) the silicone coating should give the blade, and the slight extra heatsinking it provides.

 

25mm polycarbonate tube

25mm polycarbonate tube

 

A critical part that you should source early is the blade tube. I used a 25.6mm Outer Diameter (1 inch OD) 22.2mm Inner Diameter polycarbonate tube (1.6mm wall thickness) from a local supplier called Profile Plastics, but I've since found a cheaper and better source at The Custom Saber Shop which are specifically for this purpose, and they have transparent "blade tips" too. Those are really hard to find!

My build used a clear tube with a packing foam sheet light diffuser wrapped around the LED strips, but I would definitely experiment with their Translucent White tube for an even-better-looking blade. The clear tube is a little too revealing when it comes to assembly mistakes or imperfections, and you can see the LED dots if you really look. An extra layer of diffusion would have been nice.

 

Packing foam sheet Light Diffuser for wrapping the blade and improving the glow

Packing foam sheet Light Diffuser for wrapping the blade and improving the glow. Free with eBay purchases in random sizes, or your local stationery supplies cupboard.
 

Normal/thin-walled tube is probably fine unless you want a full-length saber or intend to combat hard with it. The LED strip is fairly wide (12-15 mm) and we need some space for the light to diffuse around the edges, so I don't recommend the thinner 3/4 inch tube or the thick-walled tube to start with. I haven't tried them yet.

A note on material: Polycarbonate tube is what you absolutely need. Not perspex, acrylic, transparent PVC, or any other plastic. This is why:

Polycarbonate tube does not shatter. Ever. It will take a shotgun blast and remain in one piece. It can be bent and crushed (so don't drive over the tube with a car) but there are no conceivable circumstances where you'll suddenly be swinging half a broken and jagged plastic tube around. This is important to me and anyone who wants to be safe.

Polycarbonate has a slightly bluish tint compared to Perspex because it's less optically clear. That's not a problem for us, but it helps when trying to identify "true PC" if you're in doubt.

The build described here has the first 8cm of the blade tube held securely in the hilt by the Pipe Compression Coupler, and about 2cm of free space at the far end. Therefore you need 10cm more tube length than LED blade; so a half-meter blade needs a 600mm tube.

And yes, a 25mm OD tube fits inside a "20mm Pipe Coupler", with room to spare. (PVC water pipe sizes relate to the inner diameter of the iron pipes they replaced. PVC conduit connectors are correctly dimensioned, but aren't rated for pressure.)

 

Real-world physics means we have to firmly secure the tube in the hilt with sufficient leverage

Real-world physics means we have to firmly secure the tube in the hilt with sufficient leverage. "Compression couplers" are quick-release, can hold mains-rated pressure pipes, and look cool.

 

Another fairly personal choice is the shape and placement of the speaker for the sound effects. A traditional magnetic coil speaker is essential to capture the bass notes properly (sorry, piezo just doesn't cut it) but they come in many varieties. 

A 2-watt speaker is nicely loud, and I used a reclaimed 40cm part that just happened to fit inside the PVC endcap that made the 'pommel' of the hilt. Replacement laptop speakers are interesting and come in long and rectangular shapes that may fit slimmer builds.

 

the PVC endcap

 

We need an amplifier to drive it and there are a plethora of small class D modules that will do nicely. We only need mono output and the quality doesn't need to be superb. The SparkFun/geeetech amp does the job nicely with a few additional parts.

There is a great deal of leeway with the individual components, but not much with the specifications. If you are making substitutions, don't downgrade anything. We're running all these pieces hard, in some cases close to their design limits, in order to fit all of this into a hand-held device.

Software and Controls

An explanation of how the firmware works would take another article and wouldn't help the build, so I’ll just describe how to use it for now:

The saber has many settings, like sound volume. If that was all, one volume knob would do the job. To set the blade color we could add another knob. We could add a third knob for the colour saturation, a fourth control to ignite/retract the saber, four more to tweak the audio frequencies, and then there wouldn’t be any room left on the hilt to put our hands.

So instead, one physical knob (which is also a push-button) is used for all the controls, by having the knob change its mode when pushed in. While you’re doing this, the first dozen LEDs along the blade will go dark and a “menu dot” will show the current mode. It also helps that these rotary controls can spin endlessly and have no specific zero point.

Push the knob and turn it to set the mode. Then release and spin it normally to tweak that parameter up or down. Got that?

Here’s the modes in order, and the color of the dot in the blade menu.

 

  Color  Mode
0 White Blade Extension / Retraction (startup mode)
1 White Sound Volume
2 Blue Blade Hue (colour)
3 Blue Blade Saturation (whiteness)
4 Yellow Buzz Frequency
5 Orange Hum Frequency
6 Orange Swing Frequency
7 Red Swing Doppler
8 Purple Preset Selection
9 Black Bump Lock (no action)

Don’t spin the knob too fast or the controller will miss updates—it’s very busy doing many things—and you might even go backwards a notch. Be slow and definite. (This may improve in future software.)

Some of the modes loop around (like the color) and some hit max and minimum values (like volume and mode, itself) and some are just hard to describe (like the doppler division parameter which can go negative) but just give them all a try and I'm sure you’ll figure it out.

Frankly, it’s not the greatest user interface in the world, but I challenge you to fit more functionality into a single knob.

Also, remember that the saber will forget everything on power loss. If you want custom presets, you’ll have to modify some magic numbers in the source code and upload it again.

Power Management and Safety

Remember how we talked about why LiPo batteries can be dangerous? The following is how I designed this project to be safe and keep your blade from catching fire. Please don't remove these safeguards.

The firmware has a 'screensaver' that will retract the blade when you don't move the saber for 90 seconds—in case you set it down somewhere and forget about it.

It also constantly checks the battery sense voltage, and when it detects an undervoltage condition (defined in the firmware at about 10.5v, or 3.5V per LiPo cell), it darkens the blade and makes loud nasty beeping noises until you turn if off. This is a critical safety feature for dealing with high-capacity LiPos, and must not be disabled, and it's good to calibrate the numbers in the code for your power system.

If you disable the voltage sensor or otherwise allow the blade to stay on, the following badness will happen: The blade will continue drawing large amounts of power, the DC/DC converter will continue to drain the battery at increasing amperages and won't ever stop, and the battery will drastically HEAT UP as it gives up its last watts to the point where it can outgas, catch on fire, and EXPLODE. Rarely, but sometimes. I'm sure you've heard the stories. It will certainly degrade the LiPo's capacity and may render it less safe for future use. (Small LiPos often include protection circuits, but higher-current RC LiPos, like the one powering the saber, are "unprotected").

Monitoring the battery voltage and turning off the LEDs when necessary is really the most important job the controller has. That's the price we pay for pushing the limits and using such a high-density power system. Feel free to mess with anything, except that

Understand, the lights won't even turn off when the power drops below 5 volts. The batteries will be screaming, the microcontroller will crash (taking out the alarms)—but the LEDs will continue to do what they were told until you turn them off manually. The controller must be able to detect the undervoltage condition coming and stop before going into the red zone.

Remember rule 9: "I will not include a self-destruct mechanism, unless absolutely necessary."

Next Time...

In Part 2, we'll build the power systems and audio module.

In Part 3, we'll build the controller, upload firmware, and do a bench test.

In Part 4, we'll finally construct the LED blade and assemble the hilt.

Give this project a try for yourself! Get the BOM.

32 Comments
  • Fredrik Hubinette October 25, 2016

    Not the brightest lightsaber in the world. This might be: http://www.fx-sabers.com/forum/index.php?topic=46064.0
    It’s not even the brightest neopixel lightsaber, I have one with 280 LEDs: http://fredrik.hubbe.net/lightsaber/

    Like. Reply
    • Jeremy Lee October 25, 2016
      Those are some nice builds! I didn't see them while doing my research, but there were so many... I don't think we can be sure who exactly has the brightest saber without getting some calibrated light meters, but I'll just point out a few things in my favor: Photonic Bladesmith definitely has the biggest LED of all of us, but he's only driving it at 50% duty cycle from the battery, which equates to about 50 watts. You and I know that hilt-illuminated blades loose a decent percentage of the light before it gets out. But he also probably picks up extra efficiency from such a lovely semiconductor. But keep that 50 watts in mind. It looks like you and I were thinking along similar lines. You definitely have more LEDs, that is true. However, I'm driving mine at a higher voltage (5.2 volts) so the strip can consume it's full rated 45 watts, and should be brighter (per LED) than it will be at 3.5v. How much, I don't know. And we also get an advantage because our light is directed straight out sideways, in comparison. My "shoto" blade does not use the full capacity of my hilt, which can sustain 75 watts (and burst to 100) so I can upgrade to a longer blade. I'm actually in the process of building a 216 neopixel blade right now (1.5 meter total strip length in a 90cm tube) but the published build needed to remain simple, so it demonstrates the shoto. (while saying the longer one is possible) I will also note my run-time is over half an hour, which is a nitpick, but I would suggest that it's not that hard to be "brighter" if you don't have to sustain it. I can burn my candle twice as bright too, if I want. In fact, from what I learned, heat is the real limit. I can't run the Shoto continuously at it's full rated power (as I could the bare strip) because once you stick it back to back and wrap the LEDs in a cozy foam blanket, the semiconductors start dying after 20 minutes when they hit 80 degrees or so. I'm happy that my blade is the brightest it _can_ be, (reliably) given the thermal limitations of the system and current technology. And that's with our advantage in spreading the heat out along an extended source! If you've managed to solve the heat problem, I'd love to know how. I'm looking into cooling options that will take it up a notch, but it's getting complicated. One thing I've just got working over the last few days that you might like is a new kind of diffuser to replace the foam. I'm experimenting with 3D printed 'inserts' made from transparent PLA, and they have a profound effect on the light - I'm calling it a "holographic blade", because microlensing from the 0.2mm print layers both spreads the LED light-points along the length of the blade, but also concentrates the light 'axially' into what looks like a thin thread up the core. (I believe there's a special film that does something similar for hilt LEDs?) And more total light gets out! Now my blade is mostly filled with air instead of foam, looks a bit unreal (more like the really thin sabers in Rebels) and now I've got two broad channels to blow air up the tube, if I want. I suspect all three of us are in the same ballpark, and probably battling the same limitations. It's a shame we don't live closer... then we really could meet in the same ballpark and settle things the Jedi way! (With jokes and tea.)
      Like. Reply
      • Fredrik Hubinette October 27, 2016
        Neopixels have linear power regulators in them. Giving them more than 4 volts don't make them any brighter, just hotter. As for measuring blade brightness: http://www.fx-sabers.com/forum/index.php?topic=50536.0
        Like. Reply