First Scratch Build Lightsaber

BipeFlyer

Well-Known Member
Other than adding bits and pieces to a flashlight, I've never made a saber, so I'm going to attempt a scratch build. My intention is to make as much as I can myself, including the electronics and maybe a crystal reveal. I've never even seen a saber with electronic effects first hand, so I'll be working blind a bit, but I'm going to jump in and see what happens.


I've decided to build a Stormtrooper saber.

First thing is the drawing.
Stormtrooper_1280.png

Edit: 06/14/2018I've added a picture of the completed Lightsaber here. Go to this post to see the more pictures and videos.

101_2689.JPG
 
Last edited:
Progress so far.

I went into this thinking that PVC, being white, was a natural, but once cut it gets dirty very quickly and not every piece is the same shade of white, so I'll be painting it.

End caps. Made from 3/4" PVC caps.
IMG_20180320_225312.jpg


Emitter. I think I'll re-make this as I'm not satisfied with it.
IMG_20180320_225632.jpg


Main body.
IMG_20180320_225450.jpg

IMG_20180320_225501.jpg


Grips machined down from 1 1/2" PVC pipe.
IMG_20180320_225834.jpg

IMG_20180320_225911.jpg
 
Last edited:
I like it! What are you thinking to use for the black grip section?
I'm planning on painting the cover with textured rubber truck bed liner. I'm going to do a pattern on the PVC cover before I paint it.

Sent from my Nexus 6P using Tapatalk
7db0ec8c364e9d4ef4d97ecf29edc215.jpg
 
Testing the crystal. I'm using a 3-axis gyro with an Arduino for motion detection. I have since found out that most ligtsabers use vibration sensors, so I have some on order. It should simplify the programming, but I've already done it with the gyro so I'll see which works better when the other parts arrive.

View attachment 804329

 
Last edited by a moderator:
Actually.. most sabers (now a days) use an accelerometer.. or even a gyro...

If you have the gyro.. and it looks like your already also using an DFPlayer..

just use the DIYino open source light saber project... (all libraries and .ino files included)

LSOS
FSSaber-OS
USaber

all on git hub.. all for/from the same open source project.. supports high powered leds.. and even Neopixel string blades.

remember to debounce your 'vibration sensor' if you still go that route..

IMHO... you could have purchased a pre-made board for about the cost of your prototyping components..

If you do in fact stick with the DFPlayer board.. (and you are using the default DFRobot library for it... comment out the reset() command in the begin() method in the .cpp file..

this stop that horrible 'pop' coming from the speaker when powered on/off..
 
Actually.. most sabers (now a days) use an accelerometer.. or even a gyro...

If you have the gyro.. and it looks like your already also using an DFPlayer..

just use the DIYino open source light saber project... (all libraries and .ino files included)

LSOS
FSSaber-OS
USaber

all on git hub.. all for/from the same open source project.. supports high powered leds.. and even Neopixel string blades.

remember to debounce your 'vibration sensor' if you still go that route..

IMHO... you could have purchased a pre-made board for about the cost of your prototyping components..

If you do in fact stick with the DFPlayer board.. (and you are using the default DFRobot library for it... comment out the reset() command in the begin() method in the .cpp file..

this stop that horrible 'pop' coming from the speaker when powered on/off..
Thanks for the info. I know I could buy a board, but where's the fun in that? ;) And with the exchange rate right now... At least I'm on the right track with the gyro. I'll take look at the library you suggested. [emoji106]

Sent from my Nexus 6P using Tapatalk
 
Oh I hear ya... I do most of my own electronics work as well....

But they have been down the road already with code that helps get you to where you need to be. Or you can just write it all yourself.. and use your own hardware.. (thats how the open source project started.. they now have a PCB with the Arduino, gyro and DFPlayer all together on one board)

I at least suggest the default DFRobot library for the DFPlayer audio board.... it much nicer than having to send a serial command and checksum..and..etc..etc..
 
Oh I hear ya... I do most of my own electronics work as well....

But they have been down the road already with code that helps get you to where you need to be. Or you can just write it all yourself.. and use your own hardware.. (thats how the open source project started.. they now have a PCB with the Arduino, gyro and DFPlayer all together on one board)

I at least suggest the default DFRobot library for the DFPlayer audio board.... it much nicer than having to send a serial command and checksum..and..etc..etc..

The player I have is a WTV020-SD, but the DFPlayer looks better; plus the libraries...

I know I'm headed down a well travelled road that ranges from a total scratch build to buying a completed saber. I'd rather do more myself, but there's no need to re-invent the wheel, so the tips and feedback are very much appreciated.
 
Ahh.... the WTV variant...

I would still check out the USABER github version of the lightsaber project.. I believe her used that initially/or always in his development..

others couldnt get to seamlessly loop, so they transitioned to the DFPlayer if I recall correctly.

So I -believe- there is a support/code/library for that variant of sound player. I have some WTV boards... but not the microSD versions.. (so I never did anything with them).

the DFPlayer (while a couple annoyances)... were nice to work with.

Cons:
* Required naming conventions for the DFPlayer (they tell you to name things like 001.wav, 002.wav..etc) this is because if you drag-n-drop the files as suggested to do.. it will write the files to the SD card in the named order. The DFPlayer doesnt care about names really.. what is DOES care about is the order the tracks are copied to the SD card..
So if the file was named ABC123.wav if it was the first file written to the SD card.. you would always reference that file as .play(1)

* I guess this is library dependent,. but if using the widely suggested default DFRobot library.. there is an additional reset() command that makes the speaker POP when powering on/off the project (fixable though, by commenting out that line in the .cpp file)

* Detecting when a track playback has completed.
- They have a 'busy pin' that you can poll to check this... but its not very responsive (slow).. and not really worth it.
- There are some software (library dependent) actions that query the DFPlayer to see if a file is still playing or not.... however, its a bit buggy. If a file was called in a .loop() command.. you can detect when a file is complete, easily and accurately every time!.. However, in my results, I found that when you just .play() a file... the calls to query if a file was complete. triggered IMMEDIATELY.. (which was obviously incorrect)...

If you did an enabledLoop() action after a .play() call.. the query to check if a file was complete worked... however... when you disabledLoop().. it would sometimes error out.. and keep the initial file looping.. (when it shouldnt.. like the internal pointer couldnt keep up or something)..

If I was a better programmer.. I'd dig into the DFRobot library and see what 'internal watch dog' is set/turned on when a loop() command is called (as the chip has to knwo when the song is complete so it can loop it again).. and turn this on for just regular .play() commands..


I think if you already have the hardware.. then checkout the open source project on github or Arduino forums.. even if you do NOT use the project files.. it may yield to some code snippets that help you along the way.. they also (I believe) have wiring diagrams...etc.. for all these components..

Still plenty of things to tweak and play with in the open source project.. especially if going the DIY route.. and not buying one of the pre-made project boards
 
Excellent info. I've already found the issue with seamless looping using the WTV. I think I'll save it for another project and go with the DFPlayer you suggested. As you say, there will be plenty to tweak, modify and customize using the libraries. It's all about the journey.
 
So far.. I have found the DFPlayer a nice little board (and the bonus that it only costs roughly $1.50-$1.75 USD is great!)

I have also found the on-board amp to be sufficient for all the project/props that I normally do as well.

Also with it being its own board/processor... it doesnt really bog down the Arduino, and lets it be free to do other things.

I used it for a Tron disk project as well as a Rocketeer JetPack project..
 
I've been playing with the WTV020-SD while I'm waiting for something better to arrive.

I've got it basically working, but there is a noticeable delay when a new file starts. From what I've been able to research, the 20ms delay is a limitation of the WTV020-SD.

As I said before, I'll save it for another project, but at least I'm familiar with how it works now. :)

 
Last edited by a moderator:
I know JakeSoft prefers and recommends the WTV model..

I believe he also gets gapless playback loops.. (where others could/did not)..

He also mentioned that using the DFPlayer might not give you a seamless/gapless playback in a loop. (but I'm not sure if others have reported this from the DIYino project or not?)

As for the 20mS 'delay'..... are you using .wav files?

If so.. make sure you remove ALL metadata in the audio file... this will cause a small delay in playback (and looping from what I understand)
 
I tried wav files with nometa data and it's the same thing, but they sound worse. I've tried another brand of SD card, and it's the same

I found a post from jakeSoft on the Arduino forum saying he abandoned this board for that reason. Maybe you're thinking of the WT588D?
 
This thread is more than 5 years old.

Your message may be considered spam for the following reasons:

  1. This thread hasn't been active in some time. A new post in this thread might not contribute constructively to this discussion after so long.
If you wish to reply despite these issues, check the box below before replying.
Be aware that malicious compliance may result in more severe penalties.
Back
Top