Go Down

Topic: Arduino Lightsaber (Read 407787 times) previous topic - next topic

darkside

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.

darkside

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.

darkside

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.

IngoJ

#228
Dec 21, 2015, 01:37 am Last Edit: Dec 21, 2015, 03:00 pm by IngoJ
Hi,
I have previously worked with the WTV020SD-16P sound module (earlier state breadboard prototype: https://youtu.be/ANJg5hdYp3g). 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:
Code: [Select]

/*

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 :) )

darkside

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.

raphax

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?

SoundTrix

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.

darkside

 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

darkside

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. 

billpealer

Hi,
I have previously worked with the WTV020SD-16P sound module (earlier state breadboard prototype: https://youtu.be/ANJg5hdYp3g). 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.

IngoJ

#235
Dec 21, 2015, 09:17 pm Last Edit: Dec 21, 2015, 10:16 pm by 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.

billpealer

#236
Dec 22, 2015, 05:31 am Last Edit: Dec 22, 2015, 05:55 am by billpealer
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.

billpealer

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.

Protonerd

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...

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

Go Up