PDA

View Full Version : Pertinax



JakeSoft
08-16-2014, 07:26 PM
I present: Pertinax, an MHS saber with a home-made custom sound board.

Vital Stats:
Hilt is full MHS Parts from TCSS
RGB Tri-Rebel 3-up main LED
In-hilt recharge system
7.4v Li-ion 800mAh 14500 Battery Pack
Sound-synchronized Blade Ramp-up/Ramp-down
Flash-on-clash
Lockup
3 "mini" sound fonts which each contain these sounds:
- Power-up
- Power-down
- x4 Swing sounds
- x4 Clash sounds
- Lockup
3 quick-switch profiles
136 possible color settings

Let me start this post by saying that when it comes to saber building, I consider Erv (of Plector Labs) and Niagon (creator of Saber Igniter) to be among my personal heroes. Their contributions to the hobby have allowed for great power and flexibility to be added to any saber build in much the same way that Tim has allowed us all to create great looking hilts with the MHS system. So, in keeping with the old adage that imitation is the sincerest form of flattery, I set out to create my own sound board. I did this not because existing products weren't good enough, but because I sought the adventure of it; to get just a taste of what it must have been like to develop early prototypes of those now familiar products. It may also have been partially because I'm an engineer and I just couldn't help myself. ;-)

For the core electrics hardware, I wanted to select components that a hobbyist with moderate soldering skills could reasonably be expected to assemble on their own. That meant no surface mount components, no etched circuit boards, and no connections that required the hands of a surgeon to complete, and no exotic chemicals or tools. This was the first a major design requirement.

The second consideration was size: It had to fit in standard diameter MHS parts. This also influenced component selection and placement on the board.

http://i58.tinypic.com/ws36zq.jpg
After much research, I selected the components above: A WT588d programmable sound module, 3 small MOSFETs, a 5V/5A regulator, and a the 3.3 volt version of an Arduino Pro Mini.

http://i57.tinypic.com/16ibhq1.jpg
Code, code, and more code. This part took me months of bread-boarding and coding. For the software, I targeted functionality somewhere between an MR board and a Saber Igniter. Switchable profiles was a must as well as multiple sound fonts, but I wanted to keep it fairly simple so I didn't incorporate an accelerometer opting instead for simple swing/clash sensors. See the stats above for details on what I ended up with.

http://i58.tinypic.com/28c2byv.jpg
After much trial and error, I got a crude test-rig wired up so I could do some testing off of my bread-board.

http://i57.tinypic.com/1zpp9wh.jpg
After that I moved on to putting the components on some pref-board in a more permanent way. Then I made a sled/chassis out of some 1-inch polyurethane pipe with my Dremel and mounted the board, other core components, and the battery.

Wire it up, stick in the MHS hilt, and bam: We've got a multi-color, multi-sound font saber!

http://i60.tinypic.com/2463ub8.jpg
http://i58.tinypic.com/fncnk1.jpg
http://i62.tinypic.com/15484dg.jpg
http://i58.tinypic.com/161jm8y.jpg
http://i62.tinypic.com/301h7ix.jpg
http://i59.tinypic.com/345eqs3.jpg

Here is a video of it working.

http://youtu.be/3PacAFmnF_8
Note: I made the video to demo the board before I finished the grip section at the bottom of the hilt. The bottom section still screws off in the same way to reveal the core electronics. This is so I can get at it to pull the WT588d and reprogram it to change sound fonts, or to pull the Arduino to make firmware changes via the programming pin headers.

As always, thanks to everyone on these TCSS forums for teaching me so much over the years. I couldn't have done this without such a helpful community. And of course, thanks to Tim for making such awesome hilt parts. This is my 4th saber, but up until this build I had always used a sink tube for all or most of my hilt body. After building a full MHS saber, all I can say is: Wow! I love the Modular Hilt System!

Ty_Bomber
08-17-2014, 06:24 AM
Jake, I don't know if I can properly articulate how impressed I am. What a very cool project.

I really like the color changing menu. That was a very enjoyable vid. Thanks very much for sharing.

Gnar-Gnar Gin
08-17-2014, 10:12 AM
inspiring dude! I love the effort you put into that! mad props to you!

Bradman9
08-17-2014, 04:27 PM
This is superb! Really well done!! If I was you I would be uber proud! :D Extremely impressed!!

Obi1
08-17-2014, 10:47 PM
I'm utterly impressed!!! You can be proud of your achievement!!! I was amazed and astonished at the same time, the color changing and the sound engine are both extraordinary! Well done, and that's an understatement!

Silver Serpent
08-18-2014, 06:42 AM
Congratulations! You've accomplished what only a very small handful of people in this hobby have done. I've seen a number of people come along and express a desire to build their own board, and it's rare that we ever see results. Good job!

The saber doesn't look half bad either. I like a little more color on my sabers, but the black accents help break it up nicely.

JakeSoft
08-18-2014, 05:58 PM
Thanks all for your kind words!




The saber doesn't look half bad either. I like a little more color on my sabers, but the black accents help break it up nicely.

Thanks, SS. With all of the focus on the custom sound board, I neglected to say much about the hilt and what I was thinking there. It felt like an injustice to put all of that work into the sound board and then stick it in a sink tube saber, so I decided to go all out with full MHS parts for this build. I tend to favor builds with lots of usable grip space and this one is no exception. I was going for the look of "well-used but also well-maintained". My camera didn't really capture it very well, but I intentionally left a lot of little imperfections in the aluminum instead of trying to buff them out. I opened my toolbox for inspiration. I observed that even tools that I hadn't used very much still had little nicks and marks on them. I decided I wanted my saber to look the same way: Like that of a Jedi who had been around the galaxy a few times using it to dispense some justice as opposed to one who spent a lot of time sitting around the temple polishing his saber. I tried to create contrast with the black accents, this is true. I also tried to break it up a little with flat-on-smooth finishes created by the flatter switch box and the overlays in the grip section at the bottom over the comparatively smooth and shiny main hilt body . I worked the overlays with some steel wool to dull the finish at the bottom part of the hilt, I didn't realize how shinny the MHS sleeve material would be!

cannibal869
08-24-2014, 01:04 PM
Congratulations! You've accomplished what only a very small handful of people in this hobby have done. I've seen a number of people come along and express a desire to build their own board, and it's rare that we ever see results. Good job!

The saber doesn't look half bad either. I like a little more color on my sabers, but the black accents help break it up nicely.


agreed - I suppose it was only a matter of time until someone went down the arduino route, but as far as I am aware, you may be the first. Very impressive job with the coding and internals. I know it's already done and put together, but one of Tim's newer lower profile boxes would really give this hilt a bit more "oomph" and sleekness.

jedimastergarcia87
08-26-2014, 12:18 AM
*Tallahassee voice from Zombieland* Very cool. :P Love how you can change colors with the board in the hilt instead of using a computer. Makes it much easier. I like your custom sound font too.

forsytjr
12-24-2014, 05:17 PM
Very Cool! I was thinking of doing an Arduino based board myself, so was excited to find this thread. I just put a PC-Prizm into my wife's saber (and then managed to fry it by putting the battery in backwards), but don't have the $ right now to put a good sound card into mine, so I was thinking of slowly tinkering with an Arduino. This is partly just because I think I would enjoy doing it, and partly so it could be fully customizable, upgradeable, etc. For now I just modified a cheap hasbro board. For the main board, why did you go with a pro mini rather than a nano? For the sound module (WT588d), that doesn't have an SD card, right? So just the onboard memory of the card? How much sound can you store on it? Or are you also using memory on the Arduino? Also how many bits for the sound, and sample rate?

JakeSoft
12-25-2014, 10:51 AM
Very Cool! I was thinking of doing an Arduino based board myself, so was excited to find this thread. I just put a PC-Prizm into my wife's saber (and then managed to fry it by putting the battery in backwards), but don't have the $ right now to put a good sound card into mine, so I was thinking of slowly tinkering with an Arduino. This is partly just because I think I would enjoy doing it, and partly so it could be fully customizable, upgradeable, etc. For now I just modified a cheap hasbro board. For the main board, why did you go with a pro mini rather than a nano? For the sound module (WT588d), that doesn't have an SD card, right? So just the onboard memory of the card? How much sound can you store on it? Or are you also using memory on the Arduino? Also how many bits for the sound, and sample rate?

So glad you like it! Sorry to hear about the demise of your sound board. I'll do my best to answer your questions.

Regarding the Arduino:
This is actually my second go at building an Arduino-based lightsaber. (This was the first: http://forums.thecustomsabershop.com/showthread.php?15366-Novus-Animus) For that first board, I did use a Nano so you could definitely do that if you are more comfortable with it. However, be aware of the power requirements. The Nano operates at 5 volts and needs about 5.5 volts to run properly. The Pro-mini I selected for Pertinax operates at 3.3V and only needs about 3.5 volts to operate. This opens the door to more battery options and makes the board more flexible. It's also more power efficient. I tried running the Nano-based board on 4 AAA alkaline batteries and the runtime was terrible; the board would keep rebooting when the power dropped below ~5.4 volts and that didn't take very long running 3 high-powered LEDs! The only way I was able to make it serviceable with AAA cells was to use expensive lithium batteries. If you use a Nano, do yourself a favor and plan to use a 7.4 rechargeable battery.

Also, the pro-mini is cheaper and smaller than the Nano, so that factored in as well.

Regarding the WT588D:
The flash memory to store the sounds is built right into the module by the manufacturer. I liked this idea because I didn't have to worry about SD card compatibility woes that plague so many other components of this type. The modules come with various flash sizes. The most common seems to be 8 megabytes and 16 megabytes, but 32M exist (although they are somewhat difficult to find). That may not sound like much, but that's plenty when you consider that many of the sounds are one second or less in duration. (The 1GB+ mini-SD cards that Plector and NEC boards support are really massive overkill for a single or even 2 lightsaber sound fonts, but you can't find SD cards smaller than that.)

The WT588D supports 12-bit audio processing. I re-sampled all of my sounds at 22KHz, at either 8-bits or 16-bits per sample. They work flawlessly if you stick to that. Other sample rates are supported, but that is what I know works for sure. Note that this is NOT the same sample rate that the Plector and NEC boards use, so if you are recycling sound font files from your fried Prizm, you'll need to convert them or come up with your own sound files from elsewhere. Check out my YouTube channel for more instructional videos on working with these modules. https://www.youtube.com/playlist?list=PLpog3ksvC2iOfHrL2Bt9fOzKV0_ride3p

I hope this helps. Best of luck to you and happy holidays.

forsytjr
12-26-2014, 10:34 AM
Thanks for the response, very helpful. Someone from the forums does sound board repairs, so hopefully the prizm will be back in action. I had seen a post on the Arduino forums saying the nano could handle low voltage ok, so good to know that hasn't been your experience. I did want to power it from a single 18650 battery, like the prizm, so I'll stick with the 3.3v mini if I do this.


So glad you like it! Sorry to hear about the demise of your sound board. I'll do my best to answer your questions.

Regarding the Arduino:
This is actually my second go at building an Arduino-based lightsaber. (This was the first: http://forums.thecustomsabershop.com/showthread.php?15366-Novus-Animus) For that first board, I did use a Nano so you could definitely do that if you are more comfortable with it. However, be aware of the power requirements. The Nano operates at 5 volts and needs about 5.5 volts to run properly. The Pro-mini I selected for Pertinax operates at 3.3V and only needs about 3.5 volts to operate. This opens the door to more battery options and makes the board more flexible. It's also more power efficient. I tried running the Nano-based board on 4 AAA alkaline batteries and the runtime was terrible; the board would keep rebooting when the power dropped below ~5.4 volts and that didn't take very long running 3 high-powered LEDs! The only way I was able to make it serviceable with AAA cells was to use expensive lithium batteries. If you use a Nano, do yourself a favor and plan to use a 7.4 rechargeable battery.

Also, the pro-mini is cheaper and smaller than the Nano, so that factored in as well.

Regarding the WT588D:
The flash memory to store the sounds is built right into the module by the manufacturer. I liked this idea because I didn't have to worry about SD card compatibility woes that plague so many other components of this type. The modules come with various flash sizes. The most common seems to be 8 megabytes and 16 megabytes, but 32M exist (although they are somewhat difficult to find). That may not sound like much, but that's plenty when you consider that many of the sounds are one second or less in duration. (The 1GB+ mini-SD cards that Plector and NEC boards support are really massive overkill for a single or even 2 lightsaber sound fonts, but you can't find SD cards smaller than that.)

The WT588D supports 12-bit audio processing. I re-sampled all of my sounds at 22KHz, at either 8-bits or 16-bits per sample. They work flawlessly if you stick to that. Other sample rates are supported, but that is what I know works for sure. Note that this is NOT the same sample rate that the Plector and NEC boards use, so if you are recycling sound font files from your fried Prizm, you'll need to convert them or come up with your own sound files from elsewhere. Check out my YouTube channel for more instructional videos on working with these modules. https://www.youtube.com/playlist?list=PLpog3ksvC2iOfHrL2Bt9fOzKV0_ride3p

I hope this helps. Best of luck to you and happy holidays.

Whi-ja
12-28-2014, 12:11 PM
What an elegant way to include so many fantastic features; congratulations! Well done, and a good use of your professional skills.

forsytjr
01-11-2015, 12:07 PM
I used PNP power transistors to convert a cheap hasbro board to drive the LEDs. Is the advantage of a MOSFET that it can drive the LED without using a lot of current from the arduino? Or would PNP's work just as well? And how do you vary the LED intensity? Is it by varying the voltage going into the MOSFET, or is it by using full voltage, but then turning it off and on at high frequency to adjust the percentage of the time it is on? Are you using high power resistors to prevent burning out the LEDs, or do you just make sure to drive the LEDs at the correct voltage?

JakeSoft
01-13-2015, 12:25 PM
I used PNP power transistors to convert a cheap hasbro board to drive the LEDs. Is the advantage of a MOSFET that it can drive the LED without using a lot of current from the arduino?

Yes. I like N-channel MOSFETs because they can handle huge current loads and require very little current to drive the gate pins. That makes them perfect for use with a small Arduino.


Or would PNP's work just as well?
I'm not sure. Maybe, but you'd have to refer to the spec sheet of whatever PNP you're using to ensure the Arduino can supply enough voltage and current to fully drive the transistor.



And how do you vary the LED intensity? Is it by varying the voltage going into the MOSFET, or is it by using full voltage, but then turning it off and on at high frequency to adjust the percentage of the time it is on?

I used pulse width modulation (PWM) for the fading effect. The capability is supplied by built-in Arduino functions. Check here (http://arduino.cc/en/Tutorial/Fade) for instructions on how to fade an LED. It's really pretty simple.


Are you using high power resistors to prevent burning out the LEDs, or do you just make sure to drive the LEDs at the correct voltage?
Each LED die has it's own 3W resistor to protect them from being over-driven. The resistors are calculated in the usual way using Ohm's law.

forsytjr
01-13-2015, 07:47 PM
lation (PWM) for the fading effect. The capability is supplied by built-in Arduino functions.

Thanks! PWM was the word I was struggling to remember. My PNP's worked with 10-20ma (a 100 ohm resistor), but I might as well do a MOSFET. I guess if you are doing PWM at full voltage, keeping the high watt resistors would make sense to get the right voltage to the LEDs.

forsytjr
02-03-2015, 06:40 AM
Just an update on my progress. I got a wtv020-sd-16p card working with an Arduino pro mini, but am disappointed. The playback is not gapless, and it needs an amp. So I ordered a wt588d. But I do have a three axis gyro/accelerometer working. It's based in the 6050 chip and has some really nice libraries to support it. I'm able to get raw linear acceleration data and rotation speeds. But it also has an internal processor that integrates to get position and orientation. I managed to run a demo code where on the pc you can see an image that is updated with the board orientation in real time. So it seems very promising to do some cool motion based effects.

JakeSoft
02-03-2015, 09:23 AM
Just an update on my progress. I got a wtv020-sd-16p card working with an Arduino pro mini, but am disappointed. The playback is not gapless, and it needs an amp. So I ordered a wt588d.
Yeah, when I was doing research for my project I looked at the wtv20 too but disregarded it after reading about those issues as well as some others.


But I do have a three axis gyro/accelerometer working. It's based in the 6050 chip and has some really nice libraries to support it. I'm able to get raw linear acceleration data and rotation speeds. But it also has an internal processor that integrates to get position and orientation. I managed to run a demo code where on the pc you can see an image that is updated with the board orientation in real time. So it seems very promising to do some cool motion based effects.
Awesome! You'll be able to implement more sophisticated event sensing than my solution which used only swing and clash sensors. I look forward to seeing how your saber turns out. You should start a build log and put a link here.

MrCafe
02-03-2015, 12:42 PM
Wow. That is love for the craft right there. Amazing work.

forsytjr
02-19-2015, 10:01 AM
Jake, would be willing to share your code? My sound card should be coming in today. When you say create a build log do you mean just to create an ongoing thread? Or is there a more official way to do a build log?

JakeSoft
02-19-2015, 12:50 PM
FWIW, I have spent probably over $500 at the store. I bought a prizm card for my wife's saber, plus all the parts to make my own, plus the LEDs, multiple blades, resistors, heat sinks, etc, etc. I'm not trying to take business away, and have certainly spent my fair share here. This sound card I am working on is going into a saber that is otherwise all TCCS parts. People talk all the time about how to pull a cheap sound card out of a Hasbro, I'm not sure that actually building one from an Arduino is fundamentally different - it's a third party card just like a Hasbro. As long as people are just doing it for personal use rather than selling, and that they are buying parts from TCCS for some portion of the rest of the saber, it seems like it should be fair game? Jake, if you are willing to share, I guess just pm me rather than posting.

I sent you a PM.

While I tend to agree with your logic, I can kind of understand FJK's point. I started this thread to share with the saber-building community at TCSS a fun project I did. I used a lot of TCSS parts in my build, so it made sense. Now that some of the questions are starting to get a little more technical (and straying away from anything TCSS sells), I think it's appropriate to move that kind of detailed discussion over to the Arduino forum instead of here.

If anyone else is interested in the dirty details of how it was done, PM me and I'll be happy to send you a direct link to the thread where this project is discussed. If FJK or Strydur gives the OK then I'll post it here as well. Thanks all for your continued interest and support!

Strydur
02-19-2015, 12:57 PM
Feel free to post a link to the arduino forum and discuss it there.

JakeSoft
02-19-2015, 06:19 PM
Thanks, Tim!

http://forum.arduino.cc/index.php?topic=261980.0

forsytjr
02-22-2015, 08:22 PM
Tim,
Hopefully I didn't come off as belligerent, just trying to understand the ground rules. Having Jake able to cross post the other forum is a good solution.

For the record, I finally got my wife's prizm that I got from TCSS installed, and I'll say I'm thoroughly impressed. Doing the same thing with the arduino will take a lot more space, and an awful lot of labour. In my case, I wanted a project to tinker with as I wanted to learn arduino so I could do some summer projects with my son. But getting one of the plector labs cards is certainly far simpler and you get a fantastic product. After researching how to etch PCBs, do surface mounted components, etc, I have a lot of respect for the plector lab sound cards.

Obi1
03-24-2015, 02:05 PM
JakeSoft, this is an amaing creation! I'm truly impressed!

I also saw your Video on how to upload wav files to the WT588d. Do you know if it's possible to upload files using the arduino board as well? It also has SPI port...?

Thalan the Exiled
03-24-2015, 03:26 PM
You are a rockstar dude. That color change feature is absolutly stellar. You need to get with Erv and get that worked into his boards. I would love to see a crystal focus or a prizm/crouton with that.

Forgetful Jedi Knight
03-24-2015, 03:29 PM
You are a rockstar dude. That color change feature is absolutly stellar. You need to get with Erv and get that worked into his boards. I would love to see a crystal focus or a prizm/crouton with that.

Erv' boards have been doing color changing for a while now. ;)

Thalan the Exiled
03-24-2015, 04:30 PM
Yes but not without R.I.C.E. I Like the on the fly changeability this guy has accomplished. If erv added that to a Crystal Focus I would absolutly put out the money for one

Forgetful Jedi Knight
03-24-2015, 04:37 PM
Yes but not without R.I.C.E. I Like the on the fly changeability this guy has accomplished. If erv added that to a Crystal Focus I would absolutly put out the money for one

All RICE does is allow you to easily set whatever colors or other parameters you want, without having to manually make changes to the SD card. You may want to take the time to REALLY read through the CF, PC and Prizm manuals.

Also, further discussions regarding this "board" are to be carried out on the Audrino forums (the link is further down).

Thalan the Exiled
03-24-2015, 05:02 PM
Okie dokie didn't know they had the ability to scroll thru all the colors with the push of a button. I will have to read more on them I guess

JakeSoft
03-25-2015, 10:42 AM
JakeSoft, this is an amaing creation! I'm truly impressed!

I also saw your Video on how to upload wav files to the WT588d. Do you know if it's possible to upload files using the arduino board as well? It also has SPI port...?

Thanks, Obi! I've enjoyed watching some of your mods over the years as well. I particularly remember your solution for adding a FOC-like effect to a Force FX saber.

What you propose probably can be done; these little Arduino boards seem to be able to do just about anything! LOL ;-) I haven't tried it myself.
I won't get into any deep details on this forum, but this project is discussed in greater technical detail on the Arduino forum here: http://forum.arduino.cc/index.php?topic=261980.0

JakeSoft
03-25-2015, 10:47 AM
You are a rockstar dude. That color change feature is absolutly stellar. You need to get with Erv and get that worked into his boards. I would love to see a crystal focus or a prizm/crouton with that.

Thanks for the kudos!

While I'm flattered by the comparison, based on what Erv has accomplished already, I am reasonably sure that he doesn't need my help to add such a feature to any of his boards if it doesn't exist already. ;-) (That guy is crazy good!)

Corsair
01-18-2016, 06:44 AM
Good work! I love it! Did you gonna do a tutorial? I am a Noob with arduino but i can try with the full code you use to get all the parts and make the magic haha

Forgetful Jedi Knight
01-18-2016, 10:02 AM
Good work! I love it! Did you gonna do a tutorial? I am a Noob with arduino but i can try with the full code you use to get all the parts and make the magic haha

This Forum is attached to a store that already sells sound cards.