WT588D-16P Sound Module Working Code

Hi all, I want to share working code for the WT588D sound module. The code is not a library, just a quick example hopfully to help someone get started working with these neat little devices.

The module plays sound stored on an EEPROM and is capable of driving an eight Ohm speaker at 0.5watts. The module supports more than 200 sound files in WAV format.

Quick video demo: Breadboard Sound Demo - YouTube
(The sound files are just wav files generated by a free online text to speech app,)

As far as I know, there are three modules based on the WT588D: WT588D-16P, WT588D-28P, and WT588D-U. The WT588D-U has an onboard USB programmer, while the WT588D-16P and WT588D-28P require the special USB external programmer.

A quick eBay search should show you all three modules including the external USB programmer: WT588D for sale | eBay

There is a shared Google drive with the control software to upload wav files to the devices, the user manuals, and schematics , they are well written for this type product: WT588D.rar - Google Drive

/* 

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

Hope this helps!

How about this page, it links a different zip which contains complete documentation:
http://www.emartee.com/product/41694/WT588D%20U%20WAV%20USB%20Module

// Per.

Thank you for posting this information. I have recently started trying to integrate a WT588D-u (the one with built-in USB for programming). It's been a real source of frustration. I can't get it to make a peep even in the stand-alone KEY mode. I also tried to interface it with a Pro Mini 3.3v with 3-line serial and still nothing.

What kinds of issues did you run into while getting started with this module? How is the sound quality? (I wouldn't know, mine doesn't work!)

JakeSoft:
What kinds of issues did you run into while getting started with this module? How is the sound quality? (I wouldn't know, mine doesn't work!)

Where did you get the idea that i have the module ? I just googled a bit for you, that's all.

// Per.

Where did you get the idea that i have the module ? I just googled a bit for you, that's all.

My comments were directed to SugarBombs, the original poster. He obviously has some experience with the module.

JakeSoft:
My comments were directed to SugarBombs, the original poster. He obviously has some experience with the module.

Oops, sorry mate :blush:

// Per.

No worries.

SB, would you care to elaborate on how you have this wired in your video. It looks like you have lines run from the programmer to your breadboard while the unit is in operation. Is this just so you can program the WT588D chip without taking it off your breadboard? Also, it looks like you've got a transistor wired to pin 14? (I can't really tell which pin in the video, but it looks close to that). Why is was that necessary?

I got it to work after all! It ended up being some kind of software corruption problem. Apparently, if you start your sound project in "key" mode then change it to serial mode and then back to key mode something gets messed up. I was able to start a new project and get everything working.

Some extra news to add is that you can drive the serial interface with 3.3v logic. It looks like SB was using a Nano which operates at 5v. I got it to work with a Pro Mini 3.3v.

It seems to work pretty well in my project so far. Now I want to make it louder.

The unit itself is capable of outputting 0.5 Watts of power with an 8 Ohm load. I'd like to get ~1 Watt @ 8 Ohms. Anyone have any ideas? I've got limited space in my project so I don't have room for a ton of huge capacitors or complicated amplifier circuitry. I wonder if I could use a linear amplifier chip like this one:

Thanks SugarBombs and community for sharing your experience!
It sure helped me in my learning process. I am not a technician, nor a programmer. I try to learn by reading, watching Youtube and other videos and doing some experiments. In my home now and then some volcanic activity takes place. A typical weird smell and white smoke fills my room, driving my heartbeat to the max. Bringing me down, but also motivates me stronger than before to go further and not give up.
I am searching for some example code on how to play certain sound samples from WT588D memory. E-mail communication with the manufacturer of the board was not successful, although they tried to help by sending documentation. As they unfortunately did not have any experience with Arduino they were not able to help me any further.
I hope to find some Tom Thumb bread crumbs here...

Wandering if anyone else has any sample code for this module I can get it to play but when trying to get it to play I keep hitting road blocks

Is the non-usb model only programmable by buying that external programmer? Or can you program it using a USB-UART connection?

I was actually wondering about the same as forsytjr, I already ordered the two modules wo/USB, I'm very hopeful that there is a way to bypass an external programmer.

Anyone out there maybe already have a working solution for this? :astonished:

in my project i am trying to be able to talk to my project to activate different controls, is this feasible

that is very simple , all you need to do is use that application created the bin file.
and then write into the flash just same like how you write to the flash chip. :slight_smile:

ps: pull reset to low before download the file.

Can anyone tells me why my stuff can't working .i use three wire serial interface mode to connect with arduino mega 2560 and my buzzer did not have sound ,besides i have using Lm386 to be power amplifier to make sound loud . I am confuse .. does the host code has wrong or i use wt588d wrong way

I found that the example code only works if you have the soundfiles in the first "playlist" 0.

If you connect the arduino as per the model of WT588D you are using. I found this document to be very helpful as the pins locations vary. http://www.waytronic.com/DownLoadCenter/2011825103320760.pdf

Using the pins as per the pdf and the code provided by SugarBombs I was able to get the audio working.

Just make sure you match arduino pins to WT588D pins as per the code. You can change the the arduino pins by updating the pin in the #define statements

#define WT588D_SDA 8 //Module pin "P01" or pin # 9 (Pin 8 on the arduino and P01 on the WT588D)

forsytjr:
Is the non-usb model only programmable by buying that external programmer? Or can you program it using a USB-UART connection?

Protonerd:
I was actually wondering about the same as forsytjr, I already ordered the two modules wo/USB, I'm very hopeful that there is a way to bypass an external programmer.

Anyone out there maybe already have a working solution for this? :astonished:

Hi Guys, I am in the same boat as forsytjr and Protonerd. I got this module, but alas I cannot get the programmer locally, since the local seller only carried the non USB model, and he has no programmer available.

poiuycat:
that is very simple , all you need to do is use that application created the bin file.
and then write into the flash just same like how you write to the flash chip. :slight_smile:

http://www.instructables.com/id/How-to-Design-with-Discrete-SPI-Flash-Memory/

ps: pull reset to low before download the file.

Hi poiuycat, were you able to do it with the non USB module. The above instructables, seems to target winbond flash memory chips, I am not sure if it will be compatible with the flash chip on the wt588d module.

Well, i tried using poiuycat's instructables link. No response to the command get_jedec_id. I connected the SPI pins accordingly via CD4050 (except MISO, directly connected to the pro mini's pin12), also connected the RESET to GND. Sigh.

I'm using a 5V arduino by the way.

Just an update for those trying to program this module without the programmer. I was able to connect to the module's SPI Flash. It is Winbond compatible, mine was KH25L8006E (the datasheet I can find was of MX25L8006E). I ended up using AdaFruit's TinyFlash library for programming the trinket audio player, modified the code to just upload bin file to the flash.I was able to upload the .bin file, but somehow it will not play. Oh well, back to the drawing board.