Arduino Lightsaber

Well then, here we go! I am realy sorry for the bad quality of the images.

And now the internals:

Pommel with integrated Speaker:

Switch:

I am still not happy with my wiring...I think I am going to use some shrinktubing and put them all together.
But that is number one out of four.... I´ll post more stuff as I am going on with the project.

danboe70:
Well then, here we go! I am realy sorry for the bad quality of the images.
...
And now the internals:

...
I am still not happy with my wiring...I think I am going to use some shrinktubing and put them all together.
But that is number one out of four.... I´ll post more stuff as I am going on with the project.

Thanks for sharing! It's hard to see what's going on under that electrical tape. Maybe on Saber #2 give is a peek at what's under the hood. Your wiring looks pretty clean, though; I don't see any cause for stress. Think you'll be able to get it to fit inside with he battery? Looks like it will be tight.

JakeSoft:
Thanks for sharing! It's hard to see what's going on under that electrical tape. Maybe on Saber #2 give is a peek at what's under the hood. Your wiring looks pretty clean, though; I don't see any cause for stress. Think you'll be able to get it to fit inside with he battery? Looks like it will be tight.

Honestly its a bit tight.... but thats ok, nothing shakin inside or bumping around while using the saber. makes it pretty nice in the hand. The sound is incredible. I´ll make a list of what I have used for now:

  • MPU6050
  • 10Ohm 3W Resistor
  • BUK453
  • Arduino Nano
  • DFPPlayer Mini
  • MT3608 DCDC Converter
  • ICR18650-30B 3.7V 3000mAh Lithium Battery
  • One Pushbutton with LED Ring arround the button (same color as blade - obviously)
  • some wires and heat shirinks
  • soldering iron

With the next sabers I am going to ake some fotos of the hardware, since this one was already hidden underneath that fat shrinking tube. I am not shure, but I am thinking of writing a tutorial for my saber, since the hardware has become realy small...This smallnes is pretty useful for the empty ultrasabers....
This means: You could buy a cheap empty hilt, get a blade from ebay and then insert the small hardware perfectly into the hilt. My saber is worth aproximatly 120€. For a saber with light and sound, that is pretty amazing - comparing to sabers at sourceforge or ultrasabers with the same features.

And all this thanks to you JakeSoft! Again: Thank you very much!

Regarding your OS for the Saber....How about using an RTOS as a base? FreeRTOS?
I have been playin around with it, while building my waeatherstation. Is this something worth taking a closer look?

Star Wars + Arduino? Awesome!
-p.

danboe70:
Honestly its a bit tight.... but thats ok, nothing shakin inside or bumping around while using the saber. makes it pretty nice in the hand. The sound is incredible. I´ll make a list of what I have used for now:

  • MPU6050
  • 10Ohm 3W Resistor
  • BUK453
  • Arduino Nano
  • DFPPlayer Mini
  • MT3608 DCDC Converter
  • ICR18650-30B 3.7V 3000mAh Lithium Battery
  • One Pushbutton with LED Ring arround the button (same color as blade - obviously)
  • some wires and heat shirinks
  • soldering iron

With the next sabers I am going to ake some fotos of the hardware, since this one was already hidden underneath that fat shrinking tube. I am not shure, but I am thinking of writing a tutorial for my saber, since the hardware has become realy small...This smallnes is pretty useful for the empty ultrasabers....
This means: You could buy a cheap empty hilt, get a blade from ebay and then insert the small hardware perfectly into the hilt. My saber is worth aproximatly 120€. For a saber with light and sound, that is pretty amazing - comparing to sabers at sourceforge or ultrasabers with the same features.

And all this thanks to you JakeSoft! Again: Thank you very much!

Regarding your OS for the Saber....How about using an RTOS as a base? FreeRTOS?
I have been playin around with it, while building my waeatherstation. Is this something worth taking a closer look?

If you want to get even smaller and more reliable, go for a DIYino Stardust or Prime. Prime is same as what you have put together, the Stardust is way more, but even smaller. And you can USB charge it.

But what I also wanted to tell: congratulations!!! You are among those few who could really put it together and managed to place it inside a hilt! Good job and no small feat.

Hello to all the contributors of your extensive thread!

As I am in Australia, lightsabers are pretty dang expensive to acquire or build here due to shipping costs, but I have always wanted to build one. A few months ago built an analogue RGB saber with a cheap toy soundboard out of what ever I could find: latching power switch for "on" and three 2-state toggle switches to change the colours. It works and I have had fun with it but I really want to go further with it so at this point I have waited the 6 weeks for all the various combinations of Usaber and LSOS parts to arrive so I could finally start modernising this JunkSaber(v2).

Skillset: Electronics
weakness: Coding (I rely on pseudo code to track my variables)

At this point walking through all the code examples to understand Class calls and using libraries with increasing success - slowly :slight_smile: In the last few weeks I have spent many evenings examining all the examples and advice here, as well as for LSOS but have not yet got anything fully functional. Originally I hoped recreate the Homebrew method of LSOS but I cant get it Play sounds or detect motion, although my library tests have all worked with these units individually. So think the best thing right now is to roll up the sleeves and start fresh, with a simple plan and a new sketch.

Parts list that I have:

DFplayer
Nano
MPU6050
RGB and RGBW LEDS (and other various ones from projects)

I also have the WT588D-U-32M and clash sensors to test next, with the ADXL on the way soon.

Basic code parameters for now will be:

(after killkey or latch switch)

SETUP
define pins and inclusions # etc
Colour array [1-7]
Colour = 1

Main_Loop:

if Button High < 900ms (only one....BP)
Blade_on/off
colour
If Led_on/off (default blue) call Colour [1 of 7]
send sound power_on

if button = DoubleClick & blade_on = true
if colour ==7 then colour ==1
Else
colour ++1

//Colour Array defined in class

detect swing = play swing
detect clash = play clash

End Loop

Really basic but I thinks its best that I crawl before walking for now as I just want lights, sound and action.

PS I use to use the old PICAXE to control LED projects in the past, very BASIC...

I really hope I can create something that I can be proud of with all the advice that has been compiled here, so thank you for all this information.

Last PS, really love the DIYino but it equates to AUD$100 for me to acquire, so the idea of using AUD$25 worth of parts sounds like a great start for my budget.

Messiahlad:
Hello to all the contributors of your extensive thread!

As I am in Australia, lightsabers are pretty dang expensive to acquire or build here due to shipping costs, but I have always wanted to build one. A few months ago built an analogue RGB saber with a cheap toy soundboard out of what ever I could find: latching power switch for "on" and three 2-state toggle switches to change the colours. It works and I have had fun with it but I really want to go further with it so at this point I have waited the 6 weeks for all the various combinations of Usaber and LSOS parts to arrive so I could finally start modernising this JunkSaber(v2).

Skillset: Electronics
weakness: Coding (I rely on pseudo code to track my variables)

At this point walking through all the code examples to understand Class calls and using libraries with increasing success - slowly :slight_smile: In the last few weeks I have spent many evenings examining all the examples and advice here, as well as for LSOS but have not yet got anything fully functional. Originally I hoped recreate the Homebrew method of LSOS but I cant get it Play sounds or detect motion, although my library tests have all worked with these units individually. So think the best thing right now is to roll up the sleeves and start fresh, with a simple plan and a new sketch.

You can try FX-SaberOS, it's the successfor of LSOS. I just uploaded an update 2 days ago, it definitely works as I have now all my saber running on it. Including an RGB one, inspired by Jake's work :slight_smile:

Thanks for responding. I have really enjoyed learning about what your self, Jakesoft, Neskweek (Bill, Canobi) and many others have shaped here. FX-SaberOS looks great and the inclusion of One button option is a very welcome inclusion as well so I will test it out in the next day or two. The wiring diagrams look great as well and apart from testing battery life and main switch led connections my terminations are all in order. Continuity seems to confirm everything should be ok. Looking forward to buying a Startdust board off you too for my final setup.

As for recent developments I have working power on/ off with sound and ok motion responses with the corresponding sound effect, which would not have been achievable this soon without everyone's shared information.

Jakesoft: I have adapted your SaberBlades.ino and called it DEMO MODE, which I activate by holding my switch for 10 seconds. My 5 year loves it.

May I ask what most of you builders use for optics and LED modules for hilt lit blades, as I currently have to DIY mine from cheap Chinese 5 degree optics and custom 20mm candle holders as my heatsinks?

Imgur

Protonerd:
You can try FX-SaberOS, it's the successfor of LSOS. I just uploaded an update 2 days ago, it definitely works as I have now all my saber running on it. Including an RGB one, inspired by Jake's work :slight_smile:

And works out of the Box! Thanks Protonerd, even with only core connections wired (no battery read etc) it works well and the new multi sound fonts are a real treat. I am very appreciative of this and the wiring diagrams.

I can now finish of basic functions for my original "JunkSaberV2" and then use my second NANO to build my stable Saber. For this one I would like to try a 12w RGBW, is there a preferred way to wire the W and adjust config to include it in the FX functions?

Lastly, I ave noticed that other members have used SMD mosfets for LED control and space saving, so I am wondering if any one has had success with a 4 channel LED board or some small LED control options rather than using the normal large Mosfets?

Oh addition thought for the future...

Eventually, I would love to add RFID tech to the saber and pair it up with wristbands for instant config. Eg Sith bands when in proximity change LED to RED and sound font to agreed Dark settings. Would be nice at conventions :slight_smile:


Board wired and working on ONE BUTTON config. Love the ease of use. I must admit although I enjoyed creating my saber I really think using Startdust v2 is the way to go. Even at close to AUD $98 its worth it.

Working video coming soon.

Thanks again to everyone invovled in this thread and a massive thank you to Jakesoft, whose videos I have be very appreciative from the start.

Protonerd, I applaud your work and Bill Pealer whose videos helped show what can be done as well.

To Do list:

Better LED module and hilts...

PS. yes, yes I know for a professional, the soldering is sub-par but my 1 and half year old was cracking new teeth so I had to rush it lol.

Completed saber next to JunkSaberV2

Quick demo video showing that it works as well. Sadly I was outside so I wouldn't wake my kids and it started raining so the audio could be better but shows that the ONE button in FX-saberOS is easy enough to use.

Messiahlad:
Completed saber next to JunkSaberV2

Quick demo video showing that it works as well. Sadly I was outside so I wouldn't wake my kids and it started raining so the audio could be better but shows that the ONE button in FX-saberOS is easy enough to use.

Prototype Lightsaber using FX-SaberOS on Arduino NANO - YouTube

There are some ready-made programmable boards out there now and they are awesome, but in some ways I think it's good to have the experience of building your own home-brew board as you have done. Now you truly understand what's connected to what and how it all works. Thanks for sharing and nice work.

Messiahlad:
PS. yes, yes I know for a professional, the soldering is sub-par but my 1 and half year old was cracking new teeth so I had to rush it lol.

In fact it's one of the cleanest home-brew circuit I've ever seen, congrats! Nice work, now I', going to look at your video. Awesome, at last one more Arduino Saber!

JakeSoft:
There are some ready-made programmable boards out there now and they are awesome, but in some ways I think it's good to have the experience of building your own home-brew board as you have done. Now you truly understand what's connected to what and how it all works. Thanks for sharing and nice work.

Thanks Jake, it has been both rewarding and a better experience than using PICAXE as arduino is so feature rich. From zero arduino experience to now holding a saber that I have built is the best feeling. So much so that I have spares of every component now for new builds and designs. Although we dont take it seriously here in Australia, I can now easily make some fun mods to Halloween decorations for visitors.

For the people who have seen the end result, they are keen to have a prototype to try themselves and then bulk buy the stardust for the next build. All this high praise as in a very short time I have only seen one custom saber and now I have acquired some reasonable amount of knowledge on the topic. After we spoke today I grabbed 50 cents worth of cellophane and diffused the trans-white thick wall blade to test the theory and sure enough it worked! Colour smoothing is much better while I wait for my tri-cree RGB.

Protonerd:
In fact it's one of the cleanest home-brew circuit I've ever seen, congrats! Nice work, now I', going to look at your video. Awesome, at last one more Arduino Saber!

Thank you very much, to me that is high praise as I am a recent, but big fan of your work. FXSaberOS is a very good system for both new builders and now sabersmiths. Apart from adjusting a few minor declared pinouts it matched the fantasic Hombrew wiring diagram well which really sped up my building. I have since retro fitted some connections and removed the protected charge board which is now being built into a dedicated charge cable to indicate charge status. Unfortunately it isn't as pretty as it was but it works well and doesn't shift. Changing the mosfets to SMD to shrink the build and desoldering most component pins is the plan for the next build. Additionally, I wish to separate components with shield pads and enclose in shrink.

mosfets are connected to Fan connectors for quick disconnect. No heat issues as yet, the unused White one is in the middle, as is the resisted Red.

Just ran the numbers outside prototype costs.

$2.60 nano
$2.04 Df player
$1.40 mpu
$2.40 step-up 5v
$0.50 JST connectors
$0.25 pcb
$0.34 wire
$3.40 n channel mosfetts (x4) Depreciated with SMD
$1.15 various resistors.

$1.60 Optional protected charge board

Soo... $15.68 total AUD

Still, apart from the chance to test out the variations of the Arduino lightsaber, the cubic space the homebrew takes up the time to build, I really need to buy a few Startdust boards as they cover everything I wish to do here and with other props as well.

Now I just need a good affordable source of blades (the cost around $20-$40 from the big places and quote $68 to ship them to me) and cheap sturdy hilts. And a lathe and the expensive Dies to thread customs...

If anyone wants to know anything about my build, please feel free to ask as you in some respects couldn't get much greener on the topic of Sabers than I was...

Hi, guys! Just wanted to show you Kyberos, my (second) lightsaber that took me a year to complete. It's an Arduino Pro Mini 8MHz with a DFPlayerMini, GY-61 (ADXL335), buck boost from 3.7 to 4.7V, and 3-channel constant-current MOSFET drivers.

It has customizable colors, multiple sound fonts, swing, twirl, clash, lock, ignition and retraction effects. My favorite is the AirMenu menu system where you browse around by moving the saber and clicking a single button (nope, no Aux button here!). It has tons of options, like custom color mixer, volume, brightness, flicker, effects sensitivity, battery level indicator, presets... One year of software development for 30kB of code! :slight_smile:

The hilt is made of Inox, and the blade is 1" polycarbonate with 2mm thick sides, so it extremely sturdy. The tip is 3D printed transparent ABS. I also made up the system where you can pull out the entire motherboard without the wires handing out (hence, they don't get to break).

Here is a short video about its features (Kyberos Arduino Lightsaber 1/2 - YouTube), and here are some photos.

jonnieZG:
Hi, guys! Just wanted to show you Kyberos, my (second) lightsaber that took me a year to complete. It's an Arduino Pro Mini 8MHz with a DFPlayerMini, GY-61 (ADXL335), buck boost from 3.7 to 4.7V, and 3-channel constant-current MOSFET drivers.

...

I caught your video on YouTube just yesterday. Totally hot hilt design; I like the Starkiller inspired look! Also, a unique mix of components that I haven't seen before; a mash-up of My Mk III/IV and Protonerd's design with your own ideas thrown in as well. That's very special, great job!

Messiahlad:
Now I just need a good affordable source of blades (the cost around $20-$40 from the big places and quote $68 to ship them to me) and cheap sturdy hilts. And a lathe and the expensive Dies to thread customs...

If anyone wants to know anything about my build, please feel free to ask as you in some respects couldn't get much greener on the topic of Sabers than I was...

If you can find a source for 1"/25mm polycarbonate tubes, you can always 3D print a tip for it. I'm not sure what is typically available outside of the US, but you might even be able to find it locally. The only other thing you need is clear wrapping plastic as a diffuser.

16 months ago I had never 3D designed anything or done anything but web related programming, now I'm a contributor for FX-SaberOS and have a growing side business building props! Similar to you my first project was a scratch built/programmed arduino based saber!

JakeSoft:
I caught your video on YouTube just yesterday. Totally hot hilt design; I like the Starkiller inspired look! Also, a unique mix of components that I haven't seen before; a mash-up of My Mk III/IV and Protonerd's design with your own ideas thrown in as well. That's very special, great job!

Thanks, Jake, that really means a lot when coming from you. You guys gave me some great ideas on this forum that I've been lurking around for the last two years. It was a great reboot for me back into the world of digital electronics.

I like the original Starkiller design. But even though beautiful to display, it was inherently unpractical to wield, so I modified it in the way that feels really smooth in your hands, without any sharp edges. The whole idea was to make a sword for fight, rather than one just for display. Hence this design that I named "Kyberos". Since it is made of Inox, it is quite heavy, giving a feeling of a real weapon.

Since I wanted to have just one button, I came up with the AirMenu (as I named it) system which uses saber pitch and rotation, and that single button to browse the menus. It is very memory efficient, allowing ridiculously huge menu trees being fitted in an ATMega328.

I solved the problem of triggering the clash effect by a short click for a clash effect, followed by a hold button for the lock effect.

The entire software is completely written from the scratch, including the EButton driver and the DFPlayerMini driver that I already told you guys about.

The saber has my MOSFET constant current LED drivers, that I also mentioned here before. They are reasonably small, and they give me a precise control over the current.

There are still a few issues that I need to solve:

  • Powering. I currently use the DC-DC Adjustable Step-up Module to boost the voltage to 4.7V, but the buck seems to have quite significant power loss. I haven't measured it precisely yet, but its efficiency seems to be around 50% around the current/voltage that I use.

I am thinking of using 2 x 10440 batteries that would give me 6.5-8V range, but in that case, there would be more than 50% loss in the MOSFET LED driver (or on the resistor if you are using just a resistor), so there's no benefit in that either. But, I also have a step-down buck that I need to test for efficiency, so that might make things better.

Alternatively, the Kyberos Mk2 will be using Cree instead of Luxeon Rebel LEDs, and these suckers work on lower voltage. Perhaps I'll just try powering the LED drivers directly from a single 18650 battery.

  • Voltage drop on the kill-switch varies significantly with the current (from 0V to 0.3V), what messes up the LED driver currents and the readings of the ADXL335. My kill switch currently disconnects the BAT- from the GND, allowing me to connect an external charger adapter, but it causes the voltage drop problem. I am thinking of either moving the kill-switch from BAT- to BAT+ (fixing the floating LED Driver GND issue, but loosing the possibility to use an external charger), and/or making an electronic kill switch that would have a voltage drop independent from the current.
  • Position of the motion sensor should be as far away as possible from the center of movement. In my current design it ends up being just at the area where you hold the grip, making the detection of gestures more sensitive to the way you are holding the hilt.
  • Measuring Li-Ion State Of Charge (Battery Level) is a project of its own. There are quite a few whitepapers and doctor theses on the subject. Still working on a reliable implementation
  • Light Diffusion Foil is another thing I am working on. The plain wrapping foil does not give even distribution and is not good enough in the daylight, so I am experimenting with some modifications of the wrapping foil that should dramatically improve its efficiency.