Arduino Lightsaber

darkside:
thanks crossroads and jakesoft. first i will try your suggestion crossroads... i also checked out your sight for a min trying to figure out if you teach fencing or do circuits or both. well either way i will give it a shot thanks again.

is your 4.83v a nimh batt pack? that is an odd total voltage for lithium or alkaline.

if it IS nimh (AAA?), your voltage is gonna drop, and drop fast when the audio starts to suck it down, and the LEDs start to chew it up.

i use a 4v lithium with one of these guys sending juice to the arduino and WT. 5.1v and 500ma. good stable juice and will keep vout stable as vin drops. just your current will drop, but i think even at 150ma and 5v is more than enough to drive it all.

http://www.ebay.com/itm/1-5V-to-500mA-DC-DC-5V-Out-Boost-Converter-Step-Up-Power-Module-for-Phone-Mp3-4-/161278319601?hash=item258cefdbf1:g:mqQAAOxyUylTT3Nt

just standard energizer aaa 1.5v each. but i will check around but for now thi will do unless i find something sooner than next year.

JakeSoft:
Also, see my YouTube channel for instructional videos on how to program the modules once you have the software and a programmer.

WT588D Programming - YouTube

WT588D Programming Part 2 - YouTube

But do you use an programmer, i need one ? Or it can be program with my arduino uno or nano ?

ok just got my 3.3v FTDI basic from sparkfun will it do the trick or do i need to set it up for 5v somehow. on back three spots and to the left is 3.3v to the right 5v. at the time i ordered it i thought i had a 3.3v pro mini. dont want to go threw the hassel of returns and reorder. any help would be good.

got the answer i wa looking for so if you get one that has this set up on the underside of the ftdi. all you have to do is solder two of the three tabs to make it a 5v ftdi or a 3.3v one. i have SB's wt588d code now its a matter of producing one for the pro mini. and guess what today is sunday and yet the 26 awg wire came in so now its time to prep it all to be assembled and programmed.

i do have a question about the pro mini. is there a preprogram setting for it or do i need to generate my own? if some one could answer this soon that would be great.

Hi,
I have previously worked with the WTV020SD-16P sound module (earlier state breadboard prototype: - YouTube). Unfortunately, I did not get it to play the sounds without gaps. On Youtube I found the videos from JakeSoft and then ended up in this forum. In an earlier post Jake wrote that the WT588D module is able to play the sounds without gaps. Wonderful, so I decided to buy a WT588D and now I'm experimenting with it. The code of SugarBombs works fine. It plays the first eight sounds/playlists but as with the WTV020 I also have gaps between them. I already tried the One Line Mode with the same result.

What am I doing wrong? How did you guys solve it?

The code I'm using:

/* 

This program cycles through the first eight files loaded onto a WT588D-16P Sound Module

The pins labeled on the data sheet as CLK, DI, DO, CS, REST are for programming
the module via the external USB programmer.

In the Waytronic VoiceChip beta software, the settings are configured as "Control Mode: Three Line Mode, and Busy Mode: LOW"


*/

#define WT588D_RST 7 //Module pin "REST" or pin # 1
#define WT588D_CS 6 //Module pin "P02" or pin # 11
#define WT588D_SCL 9 //Module pin "P03" or pin # 10
#define WT588D_SDA 8 //Module pin "P01" or pin # 9
#define WT588D_BUSY 10 //Module pin "LED/BUSY" or pin # 15

byte file_count = 1;

void setup() {

  pinMode(WT588D_RST, OUTPUT);  
  pinMode(WT588D_CS, OUTPUT); 
  pinMode(WT588D_SCL, OUTPUT); 
  pinMode(WT588D_SDA, OUTPUT); 
  pinMode(WT588D_BUSY, INPUT);  

  digitalWrite(WT588D_CS, HIGH);
  digitalWrite(WT588D_RST, HIGH);
  digitalWrite(WT588D_SCL, HIGH);

}


void loop()
{

  WT588D_Send_Command(file_count);

  file_count++;

  if(file_count == 8) file_count = 0;

  delay(50); //give the module time to start playing

  while(digitalRead(WT588D_BUSY) == 0) { }

  delay(200); 

}


void WT588D_Send_Command(unsigned char addr) {

  unsigned char i;

  digitalWrite(WT588D_CS, LOW); 

  delay(5); //delay per device specifications

  for( i = 0; i < 8; i++)  {    
    digitalWrite(WT588D_SCL, LOW);    
    if(bitRead(addr, i))digitalWrite(WT588D_SDA, HIGH);
    else digitalWrite(WT588D_SDA, LOW);          
    delay(2);  //delay per device specifications   
    digitalWrite(WT588D_SCL, HIGH);    
    delay(2);  //delay per device specifications 
  } //end for

  digitalWrite(WT588D_CS, HIGH);

} //end WT588D_Send_Command

Thanks and regards
Ingo

(I'm from germany and I hope my english is not too bad :slight_smile: )

if i am not mistaken it may be the ms or you are plying the sound before it starts and or letting go to long after the sound is played in the loop. check them both to see which it is.

Hello, how can i upload my .wav without the programmer board? Using an arduino uno, nano, ftdi, etc. Can be like that? Anybody can do that?

absolutely awesome thread, I had been trying different sound modules for some time (12months +) now, always a lag between sounds. I have just ordered some new Arduino Nano and WT588D-U units to try this again. Thanks JakeSoft and all, much good news and ideas here.

WTH.... will someone please tell me why or what i am doing wrong i can't seem to figure out why my PIC K150 programmer is not doing what it should. i even downloaded the stuff from the website. was going to program the sound board... man i am lost

never mind obviously i bout a dyno of a programmer so i downloaded the proper stuff to run it. i will soon see if it does the trick after i get some sleep since it is almost 3 in the morning.

IngoJ:
Hi,
I have previously worked with the WTV020SD-16P sound module (earlier state breadboard prototype: - YouTube). Unfortunately, I did not get it to play the sounds without gaps. On Youtube I found the videos from JakeSoft and then ended up in this forum. In an earlier post Jake wrote that the WT588D module is able to play the sounds without gaps. Wonderful, so I decided to buy a WT588D and now I'm experimenting with it. The code of SugarBombs works fine. It plays the first eight sounds/playlists but as with the WTV020 I also have gaps between them. I already tried the One Line Mode with the same result.

What am I doing wrong? How did you guys solve it?

stop using this.
void loop()
{

WT588D_Send_Command(file_count);

file_count++;

if(file_count == 8) file_count = 0;

delay(50); //give the module time to start playing

while(digitalRead(WT588D_BUSY) == 0) { }

delay(200);

}

and just cook up some button or switch code, and have this be the executable.

WT588D_Send_Command(01);
or
WT588D_Send_Command(00);

what ever playlists you have made in your module.

tap the button a few times. AND READ THIS THREAD CAREFULLY. all the answers you seek are already written out. I know because I am the dumbest guy in here and I got it all to work. i was ready to give up and just buy a hasbro lightsaber guts. i didn't.

Thanks Bill.
I used the "standard" code from SugarBombs only for testing purposes and better understanding the new sound module. Now I use my existing code that I wrote for the WTV020 module.

Regarding "gapless playback" I found this in your post #135 on page 10: "also,.. to bypass default or interrupt hum,.. just program the WT so that every activation sound, except for blade off, is followed by 20-30 seconds of hum looped. it wont take up any more space on the device and plays seamlessly with less or no gaps."

That brought me much further! I reprogrammed my WT588D-U with some HUM.WAV entries added to the playlists of my CLASH-, SWING-, ... sounds. And it works great that way. I'll make a new video and post it here.

IngoJ:
Thanks Bill.
I used the "standard" code from SugarBombs only for testing purposes and better understanding the new sound module. Now I use my existing code that I wrote for the WTV020 module.

Regarding "gapless playback" I found this in your post #135 on page 10: "also,.. to bypass default or interrupt hum,.. just program the WT so that every activation sound, except for blade off, is followed by 20-30 seconds of hum looped. it wont take up any more space on the device and plays seamlessly with less or no gaps."

That brought me much further! I reprogrammed my WT588D-U with some HUM.WAV entries added to the playlists of my CLASH-, SWING-, ... sounds. And it works great that way. I'll make a new video and post it here.

boom.

just got the new 3d printer in. i have already printed battery sleds,. speaker housings, activation boxes,.. uh, spacers,.. also,. i hate trying to tighten the button nut for 16mm buttons so i made an internal washer with concave fitting, so you can actually turn the nut.

anyone need a part?. i feel i should pay this group back,.. Jake you too man. let me know,. i'll print up a part. i have black filament now. looks nice with chrome or raw aluminum.
check out the attachments.

also i defeated the wire twisting issue in my V1.0, analog style. i just put the batt pack below the blade LED holder, and unscrew the blade holder,.. pull the batts out,. swap,. stuff em back in,. and screw the blade holder back in.

no twisting. works fine.

new saber came in to day,. what do you all think? silver brass, and black components? 11.4 inches from end to end.

attached. 7mm 3d printed spacer on the pommel. makes it a 4 turn screw and added 7mm. 10.75" is now 11" i may add another 5mm spacer on the other side of the ribbed handle.

and 3d printed activation box. gives a lot more room in the hilt. i can also print shrouds,.. ooh. OD is 37mm should be easy enough.

I really envy that activation box! It's always the biggest headache how to make a fitting activation box and you really need it, otherwise there is no way to fit in any meaningful circuitry in the hilt...

No billpealer I must the dummest since I bought a pic chip programmer instead of the wt588d sound board programmer. So now I have to order the proper one which sets me back a week or two since it is coming from China. Duuh

darkside:
No billpealer I must the dummest since I bought a pic chip programmer instead of the wt588d sound board programmer. So now I have to order the proper one which sets me back a week or two since it is coming from China. Duuh

it still boggles the mind why people just don't use the WT588D-U and skip the programmer, and the Nano with usb,. and skip the programer. If you buy the Nano with no headers, it is only 2cm wide and 4mm tall. it also lets you modify the software IN HILT.

My "TIE FIGHTER" MCU sled allows me to stack those 2 exact modules and holds them in the hilt either at 31mm OD for base hilts, and 28.5mm OD for the ribbed and V grooved extensions and chokes, from TCSS.

I'll gladly print these sleds for anyone who asks.

That sounds good and all dut the way I have it for now is I have a 16 pin mount for the sound board that way I can remove it at any time to either put new sounds on it or adjust the programming without taking the hole thing apart. All I have to do is removed that one chip. I may do the same for my pro mini as well. Besides once I get good at it all then I may step up to what you have. I do have a question for you... Programming the pro mini is like the wt558d code right. If so I can use that as a get start point.