Arduino Lightsaber

JakeSoft:
No problem. Good luck.

Side note: I’ve been reading the spec sheet for the WT588D 16-pin version again. I can’t seem to find where it specified that VCC had to be 3.3 volts. I thought I saw it in an application diagram somewhere, but now I don’t see it. I wonder if the VCC input is 5 volt tolerant just like all of the other pins. If so, then it might be possible to power the 16-pin version with either pure 5 volt or pure 3.3V configurations instead of needing both levels for maximum loudness.

Has anyone tried putting 5V to both the VCC and VDD pins on the sound module? That would make things a lot nicer not needing a separate 3.3V supply anywhere in the system.

LOL. We talked about it last year, and your experience was that you needed 3.3 for the VCC and 5v for the VDD . No where in any documentation can I find that you need to run 3.3V at all to the VCC. In 3 different PDFs it says the same thing about the VCC pin… nothing. only the VDD pin is rated for Vin and that is 2.8v-5.5v. Now that being said, it does show 3.3v to the vcc pin IN ALL the wiring diagram examples. I can only assume that is an example scenario,. not meant to be limited to that specific voltage. It is however, limited to the voltage of the spec’ed tolerance, that is 2.8-5.5v. We literally had this same conversation lat October. you stated that your actual testing proved you, in fact, needed 2 independent voltages. I was like,
“that is messed up” and you were like,. “yeah but what evs, it is what it is” the WT588-U usb big daddy does not have this glitch. 5v all day! I cant say i’ve tested your 3.3v or bust claim. i dont use the small WTs. The programmer is an uber hassle and I am in no way bulk loading 25+ WT modules. the cons far out weigh the pros for a small, “make a couple sabers”, hobby builder, and novice arduino programmer, like myself.

Has anyone posted links to a good sound library yet? i have the sounds i have always used,. they work. i would like 2-3 different swing sounds with some longer Doppler. the 3 i have are OK at best.

Stemplar:
Yes, I tried with this code, but… when i record the sound 5 (0 to 4) in the module WT588D-U (28P), after to ejecute the first time all sounds, there is a shift of sounds.

The number 0 ceases to be 0 and became 4.
Number 1 ceases to be 1 and became 1.
Number 2 ceases to be 2 and 3 became.

Number 5 ceases to be 5 became the 0.

Is there any solution for this?.

P/D: sorry for my bad english, but I am Spanish.

Hey man, did you sort this out?

I think you need to go back to your WT programmer and make sure your WT playlists are what they are,. The WT playlists number IS the Arduino command code number. Are you triggering the WT yet with your nano? I can send you some basic code to trigger your WT. if you are using the WT code pasted in the above post, you will need a command like this somewhere after an input trigger,…

//switch code or button code, or ADXL code that you know works because you tested it with some LEDs first
// if you don’t know how to test or check some input code with an LED, just ask,. if no one else here will brew you up a test cycle, i can.

WT588D_Send1(0);
delay(100);

Some button test code for the WT- if you trigger your WT with accelerators you’ll have to change the code. but this is to just test the playback of the WT. I think this code will work.

#define WT588D_SDA 9 // WT Module pin "P03" or pin # 10,  arduino pin 9
const int button = 3;     // the number of the  push button pin
byte file_count = 1;
int buttonState = 0;

void setup() {
  // initialize the push button pin as an input:
  pinMode(button, INPUT_PULLUP);
  pinMode(WT588D_SDA, OUTPUT); 
  digitalWrite(WT588D_SDA, HIGH);
  digitalWrite(button, HIGH);
}

void loop() {
  // read the state of the pushbutton value:
  buttonState = digitalRead(button);

  // check if the pushbutton is pressed and released.
  if (buttonState == HIGH && buttonState == LOW) {
    delay(5);
  } else {
    // the button was pressed and released play sound 0
    WT588D_Command(0);
    delay(100);
  }
}
void WT588D_Command(byte addr) {
    digitalWrite(WT588D_SDA, LOW);
    delay(5);

    for(int i = 0; i < 8; i++)  {
        digitalWrite(WT588D_SDA, HIGH);
        if(bitRead(addr, i)) {
            delayMicroseconds(600);
            digitalWrite(WT588D_SDA, LOW);
            delayMicroseconds(200);
        } else {
            delayMicroseconds(200);
            digitalWrite(WT588D_SDA, LOW);
            delayMicroseconds(600);
        }
    }

    digitalWrite(WT588D_SDA, HIGH);
    delay(100);
}//end WT588D_Command

JakeSoft: I got one too, but it's been sitting on my desk for a few weeks. I haven't got around to testing it out yet (been working on playing with the ATTiny chips). I'm please to hear that available code will work with them. I was also able to direct connect with USB and upload a file with no fuss on Windows 7. So know at least that much works.

Even if you can't get the one-USB concept to work, two micro USB ports side by side should still be smaller than that SD card and free up some real estate on your next gen board.

Idk if I'm just over looking it up on here but I cannot find anything about your mm IV schematics with adding the ADXL335. I'm highly interested in that design but I am not good at designing whatsoever and I was wondering how would I go about finding the schematics to build this particular board.. I'm also interested in your ATTiny chip set

MrLaTtEa: Idk if I'm just over looking it up on here but I cannot find anything about your mm IV schematics with adding the ADXL335. I'm highly interested in that design but I am not good at designing whatsoever and I was wondering how would I go about finding the schematics to build this particular board.. I'm also interested in your ATTiny chip set

You aren't missing anything; I never posted the Mk. IV schematics. Not much info on the ATTiny setup yet either as I just started playing with them myself.

JakeSoft: You aren't missing anything; I never posted the Mk. IV schematics. Not much info on the ATTiny setup yet either as I just started playing with them myself.

oh okay thank you for the confirmation lol. I'm assuming it's basically like the original one except with the one new sensor?

MrLaTtEa: oh okay thank you for the confirmation lol. I'm assuming it's basically like the original one except with the one new sensor?

Yes, the Mk. IV is very similar to the Mk. II wiring-wise, just with the ADXL335 X,Y,Z outputs wired to analog inputs on the Pro Mini or Nano.

JakeSoft: Yes, the Mk. IV is very similar to the Mk. II wiring-wise, just with the ADXL335 X,Y,Z outputs wired to analog inputs on the Pro Mini or Nano.

okay so now instead of it being one switch does the ADXL335 XY and Z go wired into one port on pro mini,or multiple ports? And is the coding been modified to use this sensor? I'm really new to this whole experience and I'm trying to learn as much as I can. How did reading back-and-forth through this whole thread the past couple days. My daughter six birthday is coming up and she's been dying to build a light saber together. I'm trying to find the most affordable way to make this build and to make it look and feel higher quality than just grabbing LEDs and plastic Pipe from Home Depot.

Protonerd: I also prudently bought one myself and tested. It has 8M flash. Well, this is not tremendous, barely enough for 1 full sized sound font with hum-extension. With 16M it would be better I guess, and this also would give some motivation to try to reduce hum-extension and put some more effort into hum-relaunch.

On the very positive side this module is smaller than the SD-card version AND worked with my WIN10 first time right. Plug in, copy the files, attach to Arduino the same way as the SD-version, and voila it works (I have a simple sketch which just plays the sounds one after the other in the same order they are present on the whatever-is-used-to-store-them media). Actually - I was caught unprepared - it worked without any modification of the code...I though that I need to specify to the chipset whether it should play from SD or Flash, but it can actually device on its own (the WT5001 could not, that is why I mention).

I~~'m sad to report that mine seems to be defective. I uploaded some sound files and it seems to crash shortly after playback starts. It sounds like a big farting sound until playback ends. Really disappointing.~~

Scratch that. The batteries I'm using for testing must be getting low. Switched to drive my 5V regulator with 9V instead of 6 and suddenly it started working. This is going to be tricky. Seems to require more amps than the WT as those same batteries and regulator were driving that system just fine.

MrLaTtEa: okay so now instead of it being one switch does the ADXL335 XY and Z go wired into one port on pro mini,or multiple ports?

It requires multiple pins: one for each axis. In reality, you could get a workable solution with only two of them, but I wired all three.

MrLaTtEa: And is the coding been modified to use this sensor?

Oh my, yes. And it's hard to get right. The code to work with the ADXL335 doesn't even resemble the code for swing detection with the simple swing sensor.

MrLaTtEa: I'm really new to this whole experience and I'm trying to learn as much as I can.

I've said this many times before, but I'll say it here again. If you are new, jumping right into accelerometer programming is a bit like jumping onto a motorcycle before you've learned to ride a bicycle. Get something simple working first, then build up from there. If you use the Universal Saber library that I posted some time ago in this thread then you'll find everything you need to make a saber with swing and clash sensors. All the low-level processing is done for you, you just have to put it together like building blocks.

MrLaTtEa: My daughter six birthday is coming up and she's been dying to build a light saber together. I'm trying to find the most affordable way to make this build and to make it look and feel higher quality than just grabbing LEDs and plastic Pipe from Home Depot.

A noble cause. Best of luck. Share your results, we love seeing that stuff around here!

Man its really confusing, there were like 8 versions before the one that is linked to. I am using the V7 when the author put in the code for color selection, that one was perfect for me. Then they went to to version you have to put ahh what is that program, JAVA on, well I use win98 so who knows if that older version they stopped supporting would work with the newer type upload and Language. The code looks very different in the current version, I am glad I saved every version 1-8 of the older one!!! Actually now, making the handle is gonna be hard. All the parts are sold out at the Custom Saber shop. I was gonna get an adapter and use a sink tube, but think I might just use Iron Pipe and fittings lol! Sink tube might be possible, but I will have to find a metal collar to hold the blade and I can thread. Think regular smooth 1" pipe fits inside the 1.25 kitchen sink. Anyone who knows how to fit holder and pipe and light together chime in please!

stinky1:
Man its really confusing, there were like 8 versions before the one that is linked to. I am using the
V7 when the author put in the code for color selection, that one was perfect for me.
Then they went to to version you have to put ahh what is that program, JAVA on, well I use win98
so who knows if that older version they stopped supporting would work with the newer type upload
and Language.
The code looks very different in the current version, I am glad I saved every version 1-8 of the
older one!!!

Versions of what? Are you talking about Lightsaber OS? If so, that’s mostly discussed in this thread: (http://forum.arduino.cc/index.php?topic=361566.0).

Here is a new drop of the Universal Saber library. It was few late nights, but I added support for the DFPlayer modules that Protonerd uses in his setup (Click here to see his thread). This module was also referenced previously in this thread in post #759.

It should work with the DIYino boards since that board houses the same chip-set. I haven’t stress tested this in an actual saber, but it seems to work fine on my breadboard with the module that I have.

Usage of the new DFPlayerSoundPlayer class is damn near identical to the WT588DSoundPlayer that was added in the last drop of the library, which was kind of the point. Dispite that, I made sure to include an example sketch showing how to use the new class. Just open examples as usual from the Arduino IDE after you have installed the library.

Now you have two sound options that share a common interface. :slight_smile:

USaber_5_7_2016.zip (50.3 KB)

stinky1: Actually now, making the handle is gonna be hard. All the parts are sold out at the Custom Saber shop. I was gonna get an adapter and use a sink tube, but think I might just use Iron Pipe and fittings lol! Sink tube might be possible, but I will have to find a metal collar to hold the blade and I can thread. Think regular smooth 1" pipe fits inside the 1.25 kitchen sink. Anyone who knows how to fit holder and pipe and light together chime in please!

I may be able to help you in that department but I only have materials for hilts that take 1" blades at the moment.

I have literally meters of 35mm OD 30mm ID UK sink tubing (ours is a wider diameter it seems) and have a couple of items I use as blade seats for it. The pipe reducers for the tubing work great as well as a specific brand of glue stick container which I've been diligently collecting (silver painted one seen top left in the pic below)

|500x500

Both are a real tight "push fit" for polycarbonate blades, so in most cases, don't need blade retention screws. They've also been field tested in combat sabers I made for my kids a few years ago as Christmas presents (they still have to ask me to remove the blades even now)

|500x375

I also have a few short lengths of alu stock tubing (working my way up to stainless) in diameters that work with the PVC sink tubing and came up with these lens holder assemblies:

|500x375 |500x375 |500x375

Giant high volt PCB spacers made from nickel plated brass are the heatsink extension as it adds a nice bit of waight. Handily, they already have a hole running through the centre for passing the wires through (I use silicone wire for my LEDs as the coating is rated for temps upto 400°C and is far more flexible and less prone to snapping than standard wire) and the LED's star heatsink sits directly on top of that with a little heat transfer compound in between.

The tubing used for the lens housing is 22mm ID 25mm OD so the assembly can double as a blade stop for setting the seat depth. The seat itself I use in sections, or as the main body of the hilt which I then sleeve with increasing diameters of tubing to reach the desired hilt OD.

JakeSoft: Hi, all. I used an Arduino Pro Mini 3.3V and a WT588d to create a custom sound board and LED controller for my lightsaber. I love this little board. Special thanks to SugarBombs for sharing his working code for the WT588d module! http://forum.arduino.cc/index.php?topic=227435.0 That really saved me some trouble.

Here are video and pics.

|500x375 Core IC components: Arduino Pro Mini 3.3V, WT588d sound module, some small MOSFETs, and a 5V regulator.

|500x375 Components mounted on some perf-board and inside the hilt.

And here is a video of it working: http://youtu.be/3PacAFmnF_8

Update 1-29-2016: If you are interested in building your own, please read this thread in its entirety before posting questions. You will find that it is a trove of useful information. Most common questions have already been answered.

Hello anyone, can somebody suggest me exactly what mosfets and 5V controller to use? I can't read the specs on the picture as they are too small.

Any help is appreciated, thank you in advance

Think regular smooth 1" pipe fits inside the 1.25 kitchen sink. Anyone who knows how to fit holder and
pipe and light together chime in please!

Here is my latest saber project. It is not an Arduino( I just robbed some parts from a store bought saber) but, the basic hilt design should work. I used a 1.25" sink drain and soldered a 1.125" metal plug in the end. I made a module to hold the electronics out of 1" and 3/4" PVC. I will be drilling and tapping a hole to hold the emitter shroud and blade. I am waiting on some molding supplies so I can cast the grips and switch area.

Hope this helps and feel free to ask me questions.

Hi there,

I'm new to this thread, but very impressed with progress shown. I'm trying to tag along, and have bought a WT588U-32 sound card with the USB uploader. However, when trying to upload the sound fonts the USB port fails to connect.

The card apparently has a WT55U02 USB uploader chip but Windows reports "it is most up-to-date" and I can't find an alternative driver anywhere.

Has anyone else encountered this issue? I'm on Windows 10 Pro, 64-bit.

R.

Rusty1234: Hi there,

I'm new to this thread, but very impressed with progress shown. I'm trying to tag along, and have bought a WT588U-32 sound card with the USB uploader. However, when trying to upload the sound fonts the USB port fails to connect.

The card apparently has a WT55U02 USB uploader chip but Windows reports "it is most up-to-date" and I can't find an alternative driver anywhere.

Has anyone else encountered this issue? I'm on Windows 10 Pro, 64-bit.

R.

I am curious about the answer to this. I use Windows 7, but I'm unsure if after I'm eventually forced to upgrade if I'll still be able to use these chips. Has anyone had success with Windows 10 and the WT588D?

Thinking about it in the wee hours of the night, it might just be that the card is faulty. I'll wait to see if anyone chimes in before sending it back though.

R.

JcBailey: Here is my latest saber project. It is not an Arduino( I just robbed some parts from a store bought saber) but, the basic hilt design should work. I used a 1.25" sink drain and soldered a 1.125" metal plug in the end. I made a module to hold the electronics out of 1" and 3/4" PVC. I will be drilling and tapping a hole to hold the emitter shroud and blade. I am waiting on some molding supplies so I can cast the grips and switch area.

Hope this helps and feel free to ask me questions.

What kind of battery are you using it? From the pics it certainly looks broader than a18650.

Rusty1234: Hi there,

I'm new to this thread, but very impressed with progress shown. I'm trying to tag along, and have bought a WT588U-32 sound card with the USB uploader. However, when trying to upload the sound fonts the USB port fails to connect.

The card apparently has a WT55U02 USB uploader chip but Windows reports "it is most up-to-date" and I can't find an alternative driver anywhere.

Has anyone else encountered this issue? I'm on Windows 10 Pro, 64-bit.

R.

I also found this in the instructions: "ISP download Online (WT588D download the content directly in the application environment), need keep WT588D module doesn’t work, as pull low the RESET of WT88D to connect ground when download, or connect to P17 of WTU02, P17 at low level when download data, high level at ordinary times, thereby can reset the modules when downloadt."

Does this mean that when I am trying to upload the data via USB that I need to set the reset pin of the WT88D to LOW? I would have thought the USB method would do this automatically.

R.