Go Down

Topic: WT588D-16P Sound Module Working Code (Read 67094 times) previous topic - next topic

smanettone

By the way what type of WT588D module are you using. What is the flash memory capacity is it already the USB version or the 20 pins version?
The version is the WT588D-20SS.

purgedsoul

The version is the WT588D-20SS.
If you are already using the USB version, you can just plug your WT to the computer and upload voice files using the WT Programmer application.

If your WT is non USB you can try this:

Modify the Adafruit_TinyFlash library by opening the Adafruit_TinyFlash.cpp file and then locate this line:

Code: [Select]
return ((manID == 0xC2) && (devID == 0x13)) ? CHIP_BYTES : 0L;

change devID to 0x20:

Code: [Select]
return ((manID == 0xC2) && (devID == 0x20)) ? CHIP_BYTES : 0L;

katonafull

#32
Jan 16, 2016, 07:42 pm Last Edit: Jan 16, 2016, 08:02 pm by katonafull
If I understand correctly i have to make a bin file with the software than I have to upload that to the WT588D-16P module.
Could somebody make a schematic about arduino and the WT588D-16P module for the data upload?

I saw the page about the SPI Flash Memory
INstructable link

And I saw the schematic


But the pins of the Flash memory aren't same like the pins of the WT588D-16P module.

The flash memori use 3.3V, But the module maybe 5V

Here is the datasheet of the WT588D-16P module:
DAtasheet
Here is the datasheet of the SPI flash memory:
DAtasheet

There are two pins on the Flash.... Pin3 (WP) and Pin7 (HOLD) on the flash memory
But what are thees on the WT588D-16P module?

Flash Memory-----------------WT588D-16P
Pin1_CS__________________Pin9_P15_CS
Pin2_DO__________________Pin6_P13_DO
Pin3_WP__________________? ? ? ? ?
Pin4_GND_________________Pin8_GND
Pin5_DI__________________Pin5_P14_DI
Pin6_CLK_________________Pin7_P16_CLK
Pin7_HOLD________________? ? ? ? ?
Pin8_VCC (3.3V)___________Pin14_VCC (5V)

So they are not same. I think the WT588D-16P module don't need the resistors too, until the flash memory need resistors in this schematic.

But i am beginner in that.
So could somebody help me?

Thanx!

purgedsoul

If I understand correctly i have to make a bin file with the software than I have to upload that to the WT588D-16P module.
Could somebody make a schematic about arduino and the WT588D-16P module for the data upload?

I saw the page about the SPI Flash Memory
INstructable link

And I saw the schematic


But the pins of the Flash memory aren't same like the pins of the WT588D-16P module.

The flash memori use 3.3V, But the module maybe 5V

Here is the datasheet of the WT588D-16P module:
DAtasheet
Here is the datasheet of the SPI flash memory:
DAtasheet

There are two pins on the Flash.... Pin3 (WP) and Pin7 (HOLD) on the flash memory
But what are thees on the WT588D-16P module?

Flash Memory-----------------WT588D-16P
Pin1_CS__________________Pin9_P15_CS
Pin2_DO__________________Pin6_P13_DO
Pin3_WP__________________? ? ? ? ?
Pin4_GND_________________Pin8_GND
Pin5_DI__________________Pin5_P14_DI
Pin6_CLK_________________Pin7_P16_CLK
Pin7_HOLD________________? ? ? ? ?
Pin8_VCC (3.3V)___________Pin14_VCC (5V)

So they are not same. I think the WT588D-16P module don't need the resistors too, until the flash memory need resistors in this schematic.

But i am beginner in that.
So could somebody help me?

Thanx!
Hi this is how I connect them:

Flash Memory-----------------WT588D-16P
Pin1_CS__________________Pin9_P15_CS
Pin2_DO__________________Pin6_P13_DO
Pin3_WP__________________NC
Pin4_GND_________________Pin8_GND
Pin5_DI___________________Pin5_P14_DI
Pin6_CLK_________________Pin7_P16_CLK
Pin7_HOLD________________NC
Pin8_VCC (3.3V)___________Pin14_VCC (3.3V) connect it to 3.3 volts not 5

NC is no connection or not connected.

katonafull

#34
Jan 22, 2016, 10:29 pm Last Edit: Jan 22, 2016, 10:52 pm by katonafull
Thank you very much!

katonafull

#35
Jan 23, 2016, 05:37 pm Last Edit: Jan 23, 2016, 06:11 pm by katonafull
I have an arduino Uno
I made a schematic about the uploading.
Is it correct?
http://goo.gl/OGoMDh?gdriveurl

purgedsoul

please see attached image for the modification. You need to supply 3.3V to your level shifter and WT. Connect the 3.3 V from the Uno to the LV pin of the level shifter and the VCC pin on the WT588D.

katonafull


destructables

please see attached image for the modification. You need to supply 3.3V to your level shifter and WT. Connect the 3.3 V from the Uno to the LV pin of the level shifter and the VCC pin on the WT588D.
Hey man, so... I've only got 3 SPI pins on my Pro Micro. I know my Pro Micro and wt588D are both 3.3v/5v compatible. How would I wire up between the two of them?

thunderace69

Hi Board, thanks for this info but im really a dumb a$$ and really lost trying to get my sound bin file onto my WT588D 16P using my Arduino Nano, can some that has managed to get it to work do an Instructable  or step by step guide with full diagrams etc. Really sorry in advance for being suck a dumb A$$. TIA

thunderace69

Hi Again, please can someone help. I get

HELLO
0 - I assume its saying 0 bytes

My chip details

Ready
command: get_jedec_id
Manufacturer ID: c2h
Memory Type: 20h
Capacity: 14h
Ready


I changed

return ((manID == 0xC2) && (devID == 0x13)) ? CHIP_BYTES : 0L;

to

return ((manID == 0xC2) && (devID == 0x20)) ? CHIP_BYTES : 0L;

but its still not working

jbkuma

I keep getting the error "Could not find connected Arduino running WT588DAudioLoader sketch." when I run the processing sketch.  I've tried a number of different things, but I can't seem to get it to connect. 

I'm running a pro mini 3.3v. When I open up the serial monitor I get the appropriate Hello message.  Do you think it could be my FTDI adapter?

Anghelos

I'm making experiments with the Arduino pro mini (3,3V 8Mhz Atmega328) and wt588d-16p but still cannot have the sound playing.....I feel very dumb and stupid.

What I did:
I managed to upload the following programm inside the Arduino Pro Mini:
https://github.com/tfk/WT588D

also including the library, plus I uploaded the programm using the loader with the options "one line serial mode" and setting the busy mode to low as requested by the User of this code. I also managed to upload the 'songs' (sound effects in wav)

I had some problems to put the code inside arduino, coz I had my com6 disappearing and not able to load everything at first...but finally I managed, the Arduino board works, coz I tried the 'blink' example and it works.

I connected (as the code says) the Arduino Pins: 7-9-10 to Busy, RST and SDA of the WT588D, following this image: http://i00.i.aliimg.com/img/pb/718/697/055/1055697718_357.jpg

Then I connected the VCC of the Arduino board to the VCC of the WT588D and the GND to the ground for both arduino and the WT-board.
Finally i connected the RAW of the ARduino to the + of the battery (and the Minus of the battery to the common GND)

OFC i attached the 2 PWM of the WTD to soundspeaker....but while the arduino board is showing red light, no sounds comes from the speaker.....

What the hell did i do wrong? isn't the code supposed to play the list of wav files as soon as i power it?

mtibi75

Hi all!

Another working code, simple onewire control:
Video: https://www.youtube.com/watch?v=h9qT3Uxnvrs (at 1:30)



void WT588D_reset() {               //OPTIONAL!
  digitalWrite(WT588D_RESET, LOW);      //reset chip 5ms
  delay(5);
  digitalWrite(WT588D_RESET, HIGH);      //min 17ms       
  delay(20);

void WT588D_data(byte data) {
  digitalWrite(WT588D_DATA, LOW);
  delay(5);                        //init data line 5ms
  for (int j = 0; j < 8; j++) {
    digitalWrite(WT588D_DATA, HIGH);
    if (bitRead(data, j)) {
      delayMicroseconds(400);         //400+LOW+200=1
      digitalWrite(WT588D_DATA, LOW);
      delayMicroseconds(200);
    } else {
      delayMicroseconds(200);         //200+LOW+400=0
      digitalWrite(WT588D_DATA, LOW);
      delayMicroseconds(400);
    }
  }
  digitalWrite(WT588D_DATA, HIGH);
}

void WT588D_speech(byte speech_number, byte volume) {
  Serial.println("Speech: " + String(speech_number) + "," + String(volume));
  WT588D_data(volume + 0xE0);
  delay(100);                     //min 90ms after volume change
  WT588D_data(speech_number); 
}

beyondal

So if i'm correct I can buy the wt588d 16 module and upload my code via a arduino uno.

But does this module (wt588d)  have a GPIO? Let's say I want to attach a sensor and when the sensor (infrared, tilt-sensor, pressure sensor, etc..)  is triggered it plays the song. And is this programmable in the arduino platform.

I need 50 for this project, so I need to be sure I can do this with this module. (it's cheap :) )

I already have a level shifter laying around to program them.

At last, did somebody power these with a battery, if so, how was the performance for your type of battery.


Go Up