Arduino Lightsaber

billpealer:
here.

DL them before saberfont.com takes them down.
http://www.thecustomsabershop.com/Nano-Biscotte-Sound-Module-V2-P806.aspx

Woah, that seems like it would be of concern to the folks who made these sound fonts... Thanks for the pointer.

There are a lot of free sound fonts out there for Obsidian, but to use them in your own custom application like we do around here requires some extra work. Follow these instructions to make them compatible with the WT588D.

  1. Open Audacity. (can be downloaded for free here: http://audacityteam.org/)

  2. Select File->Import->Raw Data

  3. Browse to the .lsu file.

  4. Select these options on the Import Raw Data dialog:

  • Encoding: Signed 16 bit PCM
  • Byte Order: Little-endian
  • Channels: 1 (Mono)
  • Start Offset: 0 bytes
  • Amount to Import: 100%
  • Sample rate: Anything from 44100 Hz to 48000 Hz

You can change the pitch and mood of the sounds by messing with the sample rate. Experiment until you get a sound you like. I recommend you do the hum and power on sounds first, then convert all the other files to match.

  1. At the bottom left of the Audacity window, select "Project Rate" to either 10000 OR 20000.
  2. select File->Export
  3. Choose a file name and set save type as "WAV" then press Save.

You will now have a sound file that is compatible with the WT588D. Import it in the WT588D programming software as normal and enjoy.

i know this is going back to what was said before but i just found out... when my pro mini pack fell to the floor... it is a 5v not a 3.3v like i thought i had ordered. with 16MHz instead of 8MHz. so now i wont need that +5 regulator. but now i am wondering if my power source is too low for it all. on meter it showed 4.83v when fresh. or do you think that is enough bill, jake. yes or no

darkside:
i know this is going back to what was said before but i just found out... when my pro mini pack fell to the floor... it is a 5v not a 3.3v like i thought i had ordered. with 16MHz instead of 8MHz. so now i wont need that +5 regulator. but now i am wondering if my power source is too low for it all. on meter it showed 4.83v when fresh. or do you think that is enough bill, jake. yes or no

Your 5V Pro mini won't run on 4.83 volts.

Connect the 4.83V to Vcc instead of RAW, bypass the 5V regulator.

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.

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.