View Full Version : Arduino saber for LED string blades: AS2 (video heavy!!!)

11-22-2015, 06:20 AM
:cool: Finally! After months fter months of research, designing, planning, building and software development it's compeleted.

I proudly present my first Arduino based saber electronincs for LED string sabers.

My goal was to build my very own saber electronics, from scratch. Of course developing the software was an essential part of this project, more so because it was my first encounter with the C++ language.
Before saying more about the specifics of the electronincs, here is the video I made to show (off) the capabilities.
http://i1035.photobucket.com/albums/a432/Kunci1/th_kicsi_AS2demo_zpsh0aymbsg.mp4 (http://i1035.photobucket.com/albums/a432/Kunci1/kicsi_AS2demo_zpsh0aymbsg.mp4)

I named it AS2 for Arduino Saber 2, honoring JakeSoft's first Arduino based saber, who motivated me and gave valuable advices to see me off on this journey.

About half of the time spent developing the system was spent on selecting and experimenting with the constituent parts, which has 4 min components:
http://i1035.photobucket.com/albums/a432/Kunci1/kicsi00008_zpsjuflnrs0.jpg (http://s1035.photobucket.com/user/Kunci1/media/kicsi00008_zpsjuflnrs0.jpg.html)
1. The Arduino board itself. It was clear from the beginning that I will use an Arduino Nano, owning to the fact that that was the smallest one available. The new version comes with an Atmega328 core which fulfilled my specification (mainly that of having as many PWM channels as possible, but still be of a small form).
2. I could have opted for the simple and robust mehanical clash and swing sensors, but I was fascinated by accelero- and gyrometers I got to know from a fellow Arduino developer. So I designed in an MPU6050 sensor, mainly because of the easy way of communication and the comprehensive library coming with it.
3. The drivers from the PWM Outputs to the LED segments. I selected the smallest nMOS Transistors avalable which can still handle the current (a few hundreds of mA at most). I had to do that in order to save space, which was an imperative to avoid excessive cram-fu. I wanted to concentrate on design and not on cramming.
4. The sound module. That was a journey on its own, I tried 3 different mp3/wav Players, mostly based on recommendations of other DIY fans. At the end I selected the only one which could deliver me gapless playback, the so called DFPlayer. Yes, I managed it, I'm very proud and hapy big time (huh, that was a work figuring that out!).

Here is a "werkfilm" showing the development breadboard with the modules wired together on it.
http://i1035.photobucket.com/albums/a432/Kunci1/th_kicsi_werkfilm_zpsuiyobnx0.mp4 (http://i1035.photobucket.com/albums/a432/Kunci1/kicsi_werkfilm_zpsuiyobnx0.mp4)

The hilt I used was put together from a Saber Forge hilt lying around. I love the look of that hilt, but it lied on the bench for more than one year, due to the very minimum space available inside. Then I figured that if I can build an electronics fitting in that hilt, it will fit in any other one as well. The clamp box is from an UE Hasbro Vader saber (yes, it's cheapo, but it comes with a removable and good looking clamp box).

Supply is 7.4V using 2 10440 batteries (for development OK, otherwise run time is ~20mins max).

I also made a video using my red LED string blade:
http://i1035.photobucket.com/albums/a432/Kunci1/th_kicsi_redAS2_zpsnfvhyuzz.mp4 (http://i1035.photobucket.com/albums/a432/Kunci1/kicsi_redAS2_zpsnfvhyuzz.mp4)

11-23-2015, 05:46 AM
Technical info:

The board I designed supports the following features:
- drive for 6 LED segments (Class II. or III. Serial) -> like MR/Hasbro or CF-LS (now I know why these have 6 segments, most of the controllers usable for this size of PCB have up to 6 PWM capable channels)
- resistorless setup with drive adjustment
- blade scrolling with higher resolution than other LS boards, including smooth transition (not just swicth on/off of segments, this is especially important for long ignition/retraction schemes)
- supports up to 3 sound fonts, selectable using a combination of aux. and main switch
- Flash-on-Clash (native using LED string drive adjustment, mainly because I know from experience that a FoC string is a bad idea)
- Blade Lockup
- Blaster bolt deflect, random segment flare like CF-LS
- different hum FXs -> either synchronised random flicker or "blaze" effect, because I like the Kylo Ren saber flicker and with LED strings I can simulate that
- 7.4V battery setup
- 3W speaker output (4Ohm or 8Ohm) -> extremely loud! At the end I was amazed, that the mp3 player I choose was the only one capable of gapless playback, was by far the smallest and had the most powerful audio driver
- programming through mini-USB port
- small enough to fit into most saber hilts
My target was to design something like a PC-LS and looking at the set of features I'm happy with the outcome.

It was fun!!!

What I still plan:
- next step is a color changing saber using HP LED's. Since the board concept has up to 6 "power extenders", this would be less demanding than the LED string. Only 4 would be needed (RGBW). In my estimate a color changing setup would only need software changes and ~2 weeks time (working in the evenings). But first I need to make a hilt for that (I plan a saber staff).
- I will explore how the flickering/FX's can be synchronised with the sounds, e.g. sampling the sound and adjusting the drive accordingly.
- store settings in EEPROM to "remember" certain settings like SF used or for a color changing saber the mix for each SF/setup
- the motion engine I programmed is still rudimentary, it can detect swings and clashes but it's still far from reliable and uses only a bare minimum of the capabilities of the sensor. I definitely plan on utilizing more features like interrupt based clash, better flow gesture recognition
- better use of on-board memory space -> currently this is the biggest challange, each like of extra code can play mischief with the way the saber works, simply because the board runs out of dynamic memory and starts behaving erratically.

I have to say after building my own electronics I'm even in a bigger awe of the likes of Erv who developed a way more sophisticated and stable product. I can now fully appreciate the work they invested!

11-23-2015, 12:59 PM
Hey, you finally finished it! Congratulations! And it's looking like it was worth the effort. Very nice, Obi. This is especially impressive knowing you went into it without C++ coding experience. Welcome to the custom board builder's club!

Now I suppose I have to add blaster blocks to my next revision, huh? I can't have you one-upping me like this. :-D

12-01-2015, 08:55 AM
Would you be interested in sharing some code from the project? I am also trying to build something similar to this and I am struggling a little bit with the DFPlayer module and trying to get gapless playback. I can't seem to get rid of a small gap when transitioning between sounds (power up -> idle hum). This is my first saber build and I'd appreciate any help or advice you could provide. Thanks!

12-03-2015, 07:21 AM
Hi kkwapnioski,

If you are on the Arduino forum, you can check this link. Post the questions there (I'm the Thread owner) and I try my best to answer:

01-14-2016, 12:56 PM
I could have opted for the simple and robust mehanical clash and swing sensors, but I was fascinated by accelero- and gyrometers I got to know from a fellow Arduino developer. So I designed in an MPU6050 sensor, mainly because of the easy way of communication and the comprehensive library coming with it.

Would you still suggest this for someone new, with the idea that this will offer more benefits in the future, or would you suggest we move to the clash and swing sensors?

Thoughts about adding the available motion/gesture and voice-recognition sensors?

Also, would it be possible to set up a bunch of buttons dedicated to switching options using this framework? I keep wanting to make a saber where color and sound choices have their own separate, dedicated buttons.

01-18-2016, 02:04 AM
Hi ANorris,

Please see the link to the Arduino Forum Thread above.

As to the multiple switches: as it is, it's pain enough to accomodate 2 swicthes in any saber hilt, more that that is (at least for me) out of question.