Introduction: Star Wars Crossguard Neopixel Lightsaber

For all "those wierd kids that are board" and looking for something to do on a dark winter's night...

Make the new crossguard triblade lightsaber from Star Wars: Episode 7, (VII in Roman numerals, if they even teach that in school anymore)

This instructable will go over the physical build but it is more my tale of making, so be it.

CAUTION: Lightsabers should only be used by those trained in the ways of the Force. Same goes for soldering irons and cutting tools. Make it safe.


Step 1: Stuff Found on Tatooine and Not Canal Street...

Maybe, maybe not...

You can also use any Arduino to control Adafruit Neopixel strips.

I am using the Adafruit Trinket Attiny85 based microcontroller.

Adafruit Neopixel strips - higher density 60 LEDs/meter

- main strip has 60 Neopixels

- 2 crossguard strips of 10 Neopixels each

momentary pushbutton switch - normally open

3xAAA battery pack (LiPo is nice, an on/off switch would be nice to have)

fluorescent light protector - shatter guard tube (comes in 8-ft lengths) The clear plastic is like a water or soda bottle so you can cut with scissors or utility knife. Stop by the industrial lighting aisle at the home center to find one and then go on to browse the plumbing aisle to find the right pipes and fittings to make a more authentic lightsaber handle.

fiberfill batting in sheet form/rolls. The flat sheet form gives a more even diffusion as a wrap rather than trying to pull clumps from a bag of batting meant to stuff as loose fill.

Lots of thin hookup wire, use whatever you've got. Stranded is preferred but I have a mix of speaker wire, ethernet cable wire, regular solid core hookup wire.

electrical tape or patterned duct tape to cover the handle/hilt.

And if you've got some spare electronics parts to make the mini breakout board (headers and perfboard)

This project is good for practicing your soldering skills.

Step 2: Inspiration and Derivation...

So I was reading up on the Adafruit blog and came across Gewfy's make of a mini 3D printed lightsaber . So I says to myself, "That's not a lightsaber, mate. This is a lightsaber..." And I have a bag-o-Trinkets, 5v and 3v ones and I am not afraid to use them.

Well, time to investigate further and read up on what he had to offer. I always wanted to make a lightsaber and with the technology available today, it makes it easy to recreate things. I know enough about electronics to be dangerous so this project might not be too hard to tackle. I wanted to make a full size one. Besides, I nae have a 3D printer.

He offers the code for the Attiny85 which he used to build his Neopixel wand. Hmmm, I think I should be able to pull that over and use it in the Adafruit Trinket which I have. I also have some Neopixel strips from my Halo Cortana LED scarf. I've got some experience with soldering and working with those Neopixel strips.

Those delving into the Attiny world for the first time will have frustration that the pinouts are all labeled differently and each will be addressed differently depending on its context in use. In looking at his code, this was new, using a press button switch as an interrupt. Since programming using interrupts(commands to access the microcontroller directly as opposed to the commands in the programming language or IDE) was most hacker-like, the commands are seemingly cryptic. The Attiny85 is a small 8-pin microcontroller that many use despite it's limitations. What we have is a Trinket with it's Arduino type environment built over the standard Attiny85.

I set up my switch to the Trinket on pin # 3 and some strands of Neopixel strips controlled on pin # 0. I had wired up a long strip of Neopixels. I pieced together two 30 LED segment pieces by chaining one to the other. I kept the power leads on both segments separate so I could inject power to the farther strip. Try to use a full 1 meter strip of 60 Neopixels. I had repurposed my strips from the scarf. You can see the gap when it is in the tube because the mess of wiring spaces out the Neopixel strips. I fired up strandtest sample sketch to make sure all the LEDs were good.

I copied in Gewfy's sketch to see if I could get it working.

There is some code to use a potentiometer to control brightness and a switch to cycle the light effect modes. Let me keep it simple with just a switch first. Besides, I didn't have a spare big knob potentiometer lying around to be used.

Programed the Trinket with the Arduino IDE. Nothing. Hmmm, I read up on all the discussion topics for using interrupts on the Attiny85 and Trinket. I was getting discouraged after reading that some say PCINT0 which is not the same as INT0 on pin PB2 or 7 on the Attiny85 but pin 0 on the Trinket is the only thing that works. Switch on Trinket Pin 3 might not be good because it is also used for USB. Best thing to do, put it down and go to sleep and get back to it in the morning.

So a few tries at changing the interrupt call, modifying the interrupt mask, and resoldering the switch to a different pin, still not working. Then I was reading up with using switches with Arduinos. I did not have a resistor with the switch since I knew you could activate the onboard or internal pullup in the code, available on PB3. I had the switch wired up to pulse the 5 volts +.Then I had what might have been a stroke of insight. I was going through some diagrams of the wiring setup for a switch. The program was looking for the switch to go HIGH but internally triggered as going LOW. Rewire to ground and things started working.

And once the switch was cycling through modes, I started to program some different light sequences.

But now, I am trying to wrap my head around how to debounce the switch. I have tried some sample snippets but it seems millis() may not be working correctly in the Trinket implementation (attach interrupt and delayMicroseconds() might be needed) or I may have to deal with timer registers to software debounce. As seen in the demo video, the point at which the interrupt is being sensed is not in sync with the light effect finishing and will skip one or two modes to a different programmed light effect. It should have filled with a solid color, pulsate that solid color, and then collapse the solid color and turn off.

Once I get that working, maybe I will incorporate one or more knock sensors along the tube. It will then trigger a white flash of light. You can film a lightsaber duel without needing to rotoscope it.

So, my code is such a mishmash of stuff and changes for troubleshooting that I'm not sure what to attribute anymore. If anyone has questions on what I did in my code I will glady answer questions. Someone should put up an ible on what to look for when posting up blocks of code.

Step 3: 3D Fabric-ation...

You will end up with some kind of prototype wiring assembly like this. The digital signal line out from the top of the main strand is wired back down to the hilt. It feeds into both crossguard Neopixel strips. This creates the effect that the lights radiate out from the center of the hilt. Since the strands are from one signal input, they will act in parallel. It also makes it easier to program the loops since they are addressed in one continuous manner from 1 to 70. Oh, one of the crossguard strips broke off at the wiring so I had to remove that Neopixel and resolder the connections to the next one on the strip. The missing Neopixel did not affect the way the program ran since the 70th pixel was on the other strand. Things may act weird if your program addresses non-existent Neopixels.

Now to cut your plastic tube to length. Since the lightsaber is a longsword, the length is around 4 1/2 feet. The crossguard is about 22 inches wide.

Cut the main tube to be equal the length of your main Neopixel strip plus about a foot more to be the handle.

Cut the crossguard piece based on the layout of your crossguard light strips extended out from the hilt.

Make a U-shaped notch saddle cut in the crossguard piece so it can fit on top of the main tube making that T-connection. You can trace the profile of the tube to make the cut but you can just nibble away to make it fit. It will be covered up later so no need to be really precise unless it bugs you.

Cut a strip of your sheet batting about 4 inches wide. You can then wrap that around the Neopixel strip which will diffuse the LED lights.

You now need to snake the Neopixel strips through the tubes. I fed my tape measure through the opposite end first so I could tape it to the end of the wires and use it to help pull it through the tube. You have to compress the batting and push that all in while pulling through so it helps to have another person assist. Guide it through and orient the Neopixel LEDs all facing in one straight line. Remember to gently position the Neopixel strips as the connections and strip are still vulnerable with all the strain relief you try to build in.

I plugged back in the endcaps that came with the tube into the crossguard ends.

Step 4: Watchen Der Blinkenlights...

Constantly test as you go along as you want to know when things break at each step and not have to take everything apart over and over.

Once the main Neopixel strip is seated in position in the main tube, you can cut a slit from the bottom to bring up the rest of the assembly to position the crossguard lights.

Stuff in the crossguard Neopixel strips.

Orient the Neopixel LED elements to all face the same way for best effect. You may have to adjust the amount of fill that was compressed in there to even out the diffusion of lights.

Remove excess batting so that the crossguard tube fits on the main tube.

Step 5: Finishing Touches...

Wrap up and finish the hilt with electrical tape or other suitable covering.

Really, you could do a better job in tucking everything into the handle but I needed access to the batteries to pull out - no on off switch and wasn't hardwired to Vout on the Trinket, wasn't sure if the load was going to be excessive and burn it out. Since this was the prototype, I needed access to the USB port on the Trinket to upload any refinements to the programming. The battery pack is held on with a rubberband. The rest is taped on.

You can now play a mean game of stickball with the other Lords or use it as a lightsaber prop.

Make one yourself and experiment with programming to create your own special effects.

Comments

author
kyokorn made it! (author)2016-01-28

hi can you please share your aruino source code? BR

author
caitlinsdad made it! (author)caitlinsdad2016-01-28

You might be better served by looking up Adafruit's new guide to using interrupts on an arduino and meshing that in with the standard adafruit neopixel strandtest code which has the "theaterchase" effect for the blinking/running lights. It really is fun for experimentation even if you are only changing the delay values to get the lighting effect you want. Good luck.

author
kyokorn made it! (author)kyokorn2016-01-28

ok thanks ! i wll try!!!

author
pezzax made it! (author)2016-01-06

I'm looking for cool science projects to do with my kids, preferably themed based on some of our favorite (geeky) things, and half of what I've clicked on so far are your 'ibles. I created an account just to say thanks!

author
NicolasBarrows made it! (author)2015-11-15

Here is a build that a friend and I did at a hack-a-thon this weekend. We used various PVC lengths and fixtures for the hilt and 153 total neopixels for the blades. Planning another lightsaber build this weekend and some modifications to this one.

15, 10:25 PM.jpg15, 10:25 PM.jpg
author
caitlinsdad made it! (author)caitlinsdad2015-11-15

Cool! I think you got that warbly flame effect down better than my even illumination. Make an ible on your next build.

ps - look in your instructables inbox for a message from me.

author
NicolasBarrows made it! (author)NicolasBarrows2015-11-16

We used some feux spiderweb stuff we had leftover from halloween instead of the batting and swapped it in a spiral pattern around the neopixels. It diffused rather nicely. Our current prototype is using a 5V 10A wall power supply but I would love to implement a rechargeable battery. With 150+ neopixels, though, power is an issue. Other future mods include tilt and vibration sensors and a speaker for motion activated SFX. Ible coming soon.

author
caitlinsdad made it! (author)caitlinsdad2015-11-16

Looking forward to seeing an ible. Good luck.

author
Jedi_zombie85 made it! (author)2015-10-23

really nice build

author
caitlinsdad made it! (author)caitlinsdad2015-10-23

Thanks, you gotta make one.

author
SylvainVPC made it! (author)2015-02-09

As a big fan of star wars I think I'll try, eh do .

How much does it cost (approximately) ?

author
caitlinsdad made it! (author)caitlinsdad2015-02-09

in US dollars, 5 for the plastic tube, 10 for a roll of batting which you will not use much of- share with a sewing friend, 10 for the trinket arduino, 50 for 2meters of neopixel strips and miscellaneous for the wire, push button switch and soldering. You can go to Adafruit site for exact price or look at element 14 or Newark for euro suppliers. Good luck.

author
alex.haynes.902 made it! (author)2015-01-07

I'll give you 80 dollars to make me one plus expenses for the parts

author
caitlinsdad made it! (author)caitlinsdad2015-01-08

For that price you can arm a few jedi rebels but spend it on spare parts so you can learn to build it yourself. There is no buy, try.

author
SteffenRoth31 made it! (author)SteffenRoth312015-01-13

.

try-not.jpg
author
caitlinsdad made it! (author)caitlinsdad2015-01-13

The power of the meme is great in this one...

author
caitlinsdad made it! (author)caitlinsdad2015-01-08

.

yodamake.JPG
author
thrand.godfrey.1 made it! (author)2015-01-05

Star Wars: Episode VII Lightsaber Crossguard Tested - Is It Dangerous?

youtu.be/PLzvznM2dDo?list=UUNz5BlP5XafcfOWGbxCAgxQ

author
caitlinsdad made it! (author)caitlinsdad2015-01-05

nice, come on back to test our taser-cattle prod cross guard lightsaber next.

About This Instructable

14,906views

127favorites

License:

Bio: This author has not updated their profile. They might or might not get around to it sometime. If the kid wants a unicorn... Dangit, we ... More »
More by caitlinsdad:How to Get Your Kid to College/UniversityNeopixel Light Up Fire and Ice WingsAtomic Mushroom Cloud Lamp
Add instructable to: