Go Down

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

JakeSoft

I had a quick question about the home-brew combination of Nano/DFPlayer Mini/MPU-6050 configuration.

Is the wiring diagram on the FX-SaberOS wiki correct? The diagrams for the non-DIYino setup have the common cathode wiring connected to the RST pin instead of the GND pin on the Nano.

Is that the right way to wire it?

(And yes, I'm well aware the DIYino is a much superior alternative to cobbling together a homebrew system - I own half a dozen or so now, but this was mostly out of curiosity so I could experiment with the cheaper homebrew components when doing stuff that'll require more trail and error than I'd want to subject a DIYino.
I think you want this thread: https://forum.arduino.cc/index.php?topic=361566.0

danboe70

Well I make an update to my project.

Sounds work pretty well, MPU is still very sensitive on the movement detectioon, but thats ok. I finished now the second of four different lightsabers. Each with a different color and sound font.

Reachged this point I want to thank you all, but especially JakeSoft, for your help during the lastb view months. Without your helpful input, this would not have been acomplished!

JakeSoft

Well I make an update to my project.

Sounds work pretty well, MPU is still very sensitive on the movement detectioon, but thats ok. I finished now the second of four different lightsabers. Each with a different color and sound font.

Reachged this point I want to thank you all, but especially JakeSoft, for your help during the lastb view months. Without your helpful input, this would not have been acomplished!
Congratulations on getting things working. When you finish your build, post up some pictures/videos. I'm sure we would all like to see your creation.

danboe70

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.

JakeSoft

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.

danboe70

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?

padawan

Star Wars + Arduino? Awesome!
-p.

Protonerd

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.

Messiahlad

#1268
Sep 20, 2017, 05:27 am Last Edit: Sep 20, 2017, 07:01 am by Messiahlad Reason: added pic
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 :) 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.

Protonerd

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 :) 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 :)

Messiahlad

#1270
Sep 23, 2017, 01:56 pm Last Edit: Sep 28, 2017, 05:47 pm by Messiahlad
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?

https://imgur.com/8gnqA3X


Messiahlad

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 :)
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?

Messiahlad

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 :)

Messiahlad




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.

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.

https://www.youtube.com/watch?v=2X_zyTwZjaI&t=15s

Go Up