Go Down

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

Messiahlad

What kind of Soundfont do you use? Was it a pretty assembled Pack, or did you use that converter Tool? Is the Numbering in the Soundfont.h File in Arduino IDE important? How do you orient yourself in the Menus? So many questions.
Hey Thanks, I'd say I am you 8 weeks from now lol as I really started with minimal knowledge and just slogged though it until it eventually made sense.

Everything I have used came from Protonerd and Neskweeks (probably others, but I am not sure) work on the original LSOS before it became FX-SaberOS. Between both links it should give you enough of an idea on what to do. If I didn't have a sick little dude I'd have more time to build another one and take pics of what I did for others to follow. Ultimately though, all 88 pages of this thread has a lot of great info.

LSOS:
https://github.com/neskweek/LightSaberOS


FX-SaberOS:
https://github.com/Protonerd/FX-SaberOS/tree/master/soundfonts

Soundfonts are on his link, just setup a folder that resembles the same structure and then follow the above LSOS info to copy them over.

If this doesn't solve it, wait and see what Protonerd recommends as he is the Guru.

Once I have the cash I am buying a few stardust boards off Protonerd. Building is a lot of fun but you cant beat the size of a pre-built board.

jbkuma

Sorry folks, I've been responding to the emails rather than directly posting thinking this worked the same as github.

Nothing should be connected to RST! RST is the reset pad, the only reason to connect here is to reboot the board.

I've corrected all of the diagrams for FX-SaberOS homebrew builds on github and the Facebook support group.  I've also created a PDF so it is easier to zoom in and reference: https://github.com/Protonerd/FX-SaberOS/blob/master/README/HomebrewDiagrams.pdf

Messiahlad

Sorry folks, I've been responding to the emails rather than directly posting thinking this worked the same as github.

Nothing should be connected to RST! RST is the reset pad, the only reason to connect here is to reboot the board.

I've corrected all of the diagrams for FX-SaberOS homebrew builds on github and the Facebook support group.  I've also created a PDF so it is easier to zoom in and reference: https://github.com/Protonerd/FX-SaberOS/blob/master/README/HomebrewDiagrams.pdf
Thanks JB its appreciated.

Protonerd

Sorry folks, I've been responding to the emails rather than directly posting thinking this worked the same as github.

Nothing should be connected to RST! RST is the reset pad, the only reason to connect here is to reboot the board.

I've corrected all of the diagrams for FX-SaberOS homebrew builds on github and the Facebook support group.  I've also created a PDF so it is easier to zoom in and reference: https://github.com/Protonerd/FX-SaberOS/blob/master/README/HomebrewDiagrams.pdf
Awesome, nice work Jason! I really like the look of the Fritzing pics, maybe for a future version of the User Manual I will give it a try! Sorry, I was not aware of the RST wiring "bug" on the drawing if that caused the confusion...

velvetwafer

#1324
Dec 07, 2017, 03:20 pm Last Edit: Dec 07, 2017, 03:38 pm by velvetwafer
Hey Thanks, I'd say I am you 8 weeks from now lol as I really started with minimal knowledge and just slogged though it until it eventually made sense.

Everything I have used came from Protonerd and Neskweeks (probably others, but I am not sure) work on the original LSOS before it became FX-SaberOS. Between both links it should give you enough of an idea on what to do. If I didn't have a sick little dude I'd have more time to build another one and take pics of what I did for others to follow. Ultimately though, all 88 pages of this thread has a lot of great info.

LSOS:
https://github.com/neskweek/LightSaberOS


FX-SaberOS:
https://github.com/Protonerd/FX-SaberOS/tree/master/soundfonts

Soundfonts are on his link, just setup a folder that resembles the same structure and then follow the above LSOS info to copy them over.

If this doesn't solve it, wait and see what Protonerd recommends as he is the Guru.

Once I have the cash I am buying a few stardust boards off Protonerd. Building is a lot of fun but you cant beat the size of a pre-built board.
Hey, and thanks for the continous Support! Helps to see im not the only one that has to bite his way through! :D

I tried the Soundfonts,dragging and dropping the Files from Folder to SD, and i still have the same Problem. The Boot Sound is played correctly, but when i turn on the Saber, there is no Sound at all...neither when i turn off (Or like, any other Sound). It seems to be only able to Play this one Boot Sound, interestingly, i can vary them, and i will always only get the Boot Sound, even if i use completely different Soundfonts from the Link
(Vanilla Swirl at the moment).
I think i need Protonerds Advice, as you say.
As im completely stumped why it only plays that one Sound. (Maybe wrong Settings in Soundfont.h?)

Youre right, sadly, i find the prebuilt boards a little bit pricey, and found that sourcing some cheap Parts from China, should be okay for a first Time Built. (I have printed myself a nice Hilt with a 20mm Core Diameter...a little tight for some Parts, but fits 2x18650 just nice.

Messiahlad

Awesome, nice work Jason! I really like the look of the Fritzing pics, maybe for a future version of the User Manual I will give it a try! Sorry, I was not aware of the RST wiring "bug" on the drawing if that caused the confusion...
Funny enough, I thought it meant reset and used ground instead in the beginning, but I swear while researching there was some mention of it used in this way under certain circumstances...

Any way, I thought I'd share something interesting. I had two hours to myself tonight so I decided to quickly threw another homebrew build together and noticed that this batch of DFPlayers had a red "play" light instead of the blue one on my first batch. The difference I found was that the TX and RX pins were reversed compared to my first DFplayer.

The other thing of note was something Protonerd has said in the past in regards to not trusting ebay where DC-DC step up converters are concerned as this build was generating increasing feedback noise the longer I used a protected battery.

If I used my non-protected lithium i had no issues, nor with using USB 5v for the Nano. Only the DFplayer and the DC-DC module are different.

The last thing I wish to share is that I used the SMD versions of the mosfetts and man do they shrink build as I can have 3 of these on the edge of the PCB to connect the LED pins. Also in an attempt to improve Red-LED efficiency I used a Torch LED driver for the red connection instead of a resistor which I believe has resulted in a brighter red for me. The two I have are 20mm diameter so they should sit well in the chassis when finished.

Overall it all works without any major testing and sits comfortable in an inch diameter saber (empty YDD/Hitoren whatever saber hilt).

1:22 AM going to bed... after one more solder...

Messiahlad

Hey, and thanks for the continous Support! Helps to see im not the only one that has to bite his way through! :D

I tried the Soundfonts,dragging and dropping the Files from Folder to SD, and i still have the same Problem. The Boot Sound is played correctly, but when i turn on the Saber, there is no Sound at all...neither when i turn off. It seems to be only able to Play this one Boot Sound, interestingly, i can vary them, and i will always only get the Boot Sound, even if i use completely different Soundfonts from the Link
(Vanilla Swirl at the moment).
I think i need Protonerds Advice, as you say.
As im completely stumped why it only plays that one Sound. (Maybe wrong Settings in Soundfont.h?)

Youre right, sadly, i find the prebuilt boards a little bit pricey, and found that sourcing some cheap Parts from China, should be okay for a first Time Built. (I have printed myself a nice Hilt with a 20mm Core Diameter...a little tight for some Parts, but fits 2x18650 just nice.
No worries, happy to offer up what I know.

TBH I have never had the boot sound change work, so I took the R2D2 boot sound from the first font, renamed it and then copied it over the config boot Wav - love it. Sounds like an R2D2 chocobo...

Tonight, I still used my slightly (just) older FX-OS build which doesn't have any font changes and it works ok. As I haven't added any additional fonts. I tried Teracopy and it balls it up so the usual - Drag and Drop - of the entire format structure on to a newly formatted card worked. Everything, the whole ZIP folder expanded. Hopefully its just a structure thing...



You can test this when you have the DFplayer connected and powered (no need for arduino) by shorting AD0 or AD1 to ground and it will play forwards in the list. Heck there are pins on there for volume control too.

20mm is TIGHT! I use 25mm and that is tight enough as most sabers have a 30mm ID it seems. Currently reconditioning some old (badly pre-modded) MR hilts and the have 36mm ID so heaps of room.

Good luck mate (Man) and I hope you are enjoying the process. To make life easier I bought a ton of 2 and 3 pin JST male/female connectors for quick tests too. So Glad I did!

jbkuma

Awesome, nice work Jason! I really like the look of the Fritzing pics, maybe for a future version of the User Manual I will give it a try! Sorry, I was not aware of the RST wiring "bug" on the drawing if that caused the confusion...
I was wondering why we kept getting comments about wiring to the RST not working...  I finally had a spare minute (a rest from packing) to look and was able to fix it quickly in illustrator.

jbkuma

TBH I have never had the boot sound change work, so I took the R2D2 boot sound from the first font, renamed it and then copied it over the config boot Wav - love it. Sounds like an R2D2 chocobo...
To change to using the font's boot sound go to line 456 in (the latest, you can search it if you have to) FX-SaberOS.ino

change
  SinglePlay_Sound(11);
to
  SinglePlay_Sound(soundFont.getBoot());


Now I really want to hear your chocobo R2 sound...

The copy order of the sound files is absolutely vital.  You can copy one folder over at a time to ensure it's done correctly.

We can thank Darth PJs of FX-Sabers forum for these fonts, he was very generous in working with me to put together some high quality unique fonts specifically for FX-SaberOS!  I also have a flame blade font I have developed myself, but I'm not ready to share it yet.

IGOR0509

heloo guys!

I know you are expert with the arduino but I am new to the Arduino area, and I have only basic knowledge. But I am a huge star wars fan and I'm thinking of making a saber basically with the following components:


-arduino uno R3 or arduino pro mini
-MPU6050 Acelerometer
-WTV020SD Mp3 module


Do you think it is going to work? Do you have any others components to indicate me? Can you help me with the code?

THANK YOU!

MAS3

Hi, and welcome to Arduino.

You'd have to create a huge hilt to get an Uno in, so your other choice would be better.

The MP3 module isn't an MP3 module, but an audio playback module.
The difference is in the MP3 file format, which the WTV020SD doesn't seem to support.
Instead you'd need to convert your files into an other format.
And you need to connect some kind of speaker to it.

Read this huge thread a few times over your Christmas holidays.
There's tons of details in it.
You'll need batteries, and a Lightsaber isn't a Lightsaber if there is no light.
So that's something to take care of too.

Have a look at "blink without delay".
Did you connect the grounds ?
Je kunt hier ook in het Nederlands terecht: http://arduino.cc/forum/index.php/board,77.0.html

IGOR0509

ok, thank you for help me!

JakeSoft

-arduino uno R3 or arduino pro mini
-MPU6050 Acelerometer
-WTV020SD Mp3 module

THANK YOU!
Technically, the WTV020SD will work, however many have reported it doesn't do gap-less playback very well. Meaning, which you switch from the hum sound to a clash or swing there will be a noticeable moment of silence. It's actually one of the modules I first considered when doing research for my Mk. II saber until I read about that limitation. You can use it, but be aware that it may have that limitation. Proven sound modules are the WT588D and DFPlayer Mini. Both are easy to find online.

As another poster said, the Pro Mini or a Nano are the best choices for sabers because they are small, skinny, cheap, and well documented.

The MPU6050 is well-proven and a good choice.

For help with the code, obviously this thread has a lot of tidbits, but also check out the Universal Saber Library that I put together. Link here: Universal Saber Library There is an example sketch included that uses a DF player Mini and a MPU6050. Use that as a guide.

IGOR0509

Hello Jakesoft,


Yes, I will use a DF player mini instead of the WTV020SD because of this ┬┤┬┤moment of silence``. and should I do a single led saber, or a saber with a led tape? If I should do a single led saber, what kind of Led should I use?

IGOR0509

I already read the DIYinoSaber sketch on the USaber Library, but I just dont understand how to setup the sound map, can you basically explain me.

Go Up