Arduino library for WTV020-SD-16P audio module

Hey guys!

I got this module last week and I have some issues with it. When plugged in MP3 mode where I only use Arduino UNO to supply power it didn't work with 3.3V pin but played alright (with all the buttons working) with 5V which shouldn't happen. I am using 32ohm 0.25W speaker, maybe that's why? But then again, I plugged some earbuds to it and again it was only working with 5V connected to it.

When I connect the device in 2 pin mode, I only get a "click" sound when playVoice functions are being called, but get no music whatsoever(neither 3.3V or 5V plugged). I get a strong feeling that it's not receiving a right command and tries to play a file that doesn't exist. I have ad4 files names 0000, 0001, 0002 etc, I was using the test files and my own but to no avail...

I hope any of you have some more ideas :(

Hi,

I got the Sparkfun WTV020SD and it plays sounds in stand alone mode but not when hooked up to the micro controller.

I don't think is a MicroSD card issue, otherwise it wouldn't work at all, right?

Thank you

Hi

I can playing MP3 mode that wtv020 SD mini module.

(16 Pin module Pin1 is Ground,Pin8 is +VDD ,Pin3 and Pin4 is Speaker connections)

But I don’t playing with software still

My project for blind people’s color identifier and spoker device.First step is working and color sensor is recognize with arduino
But I am working nearly one month for that simple job

I am learning I2C protocol in from that china module
if you help me for code also you will help to blind peoples too.

in your codes:
if you random 1 to 10 values and if you show in serial monitor that value
and if you read that values sound (AD4 file) from SD cart I will happy

Please help arduino pin connections too

Regards

I had try at first page library too over 400 people see my last message but nobody don't say anything.

if a firm's have product it must be good support too.I had send an mail (not e-mail) to Sony Corporation 39 years ago I had receive one page reply, after 15 day .

Big firm's have big boss too.

Yes I don't know I2C protocol and C language but I want learn and have not any sample code or tutorial that software for like in first message example

is very hard for a firm or I am asking very sopisticate Know-how question?

bye

Some things I found out while playing with the WTV020SD: - I didn't manage to play WAV files. Only AD4 (16kHz or 32kHz) did work. - The module works at 5V for me with the jumper set. - You better put a 0.1uF coupling capacitor at the Audio Output (Pin 2) to avoid loud "ticking" when switching between sounds.

  • I need two delays. Without them it lock up or skips the track.

My idea is that without the first delay the busyPin is not completely HIGH and so the while() loop is skipped. I guess this is because its a 3.3V Output connected to the 5V Arduino Input.

The second delay might be needed because after finishing and closing one track it maybe needs some time to accept new commands...

  wtv020sd16p.asyncPlayVoice(1);
  delay(15);
  while (digitalRead(busyPin) == HIGH) {
    //do Stuff here
  }
  delay(10);

Do you also have these problems?

Unfortunately the WTV020SD Datasheet is really bad (probably a small Chinese manufacturer). So there are rather experiences than facts about this module...

First of all big thanks and kudos to Diego J. Arevalo for putting together the library. It was a great starting point to play with WTV020-SD-16P audio module.

However there are two thing incorrect in this cpp code:

  1. at the end of each loop in “sendCommand” there is 2ms delay after each bit is sent. This 2ms stop bit should be sent after entire message is sent
  2. the timing does not account for digitalWrite taking about 5us so there are at least 15us added to each clock pulse.

Because of this problems the “sendCommand” takes over 50ms to execute. It was not acceptable in for my solution where I needed to do precise timings on each sound clip (fishing boat sound for RC model). I have corrected both issues and the “sendCommand” now takes absolute minimum required for transmitting 16 bits. I have also added “setVolume” function and fix “unmute” function to restore the volume level from before “mute”.

Anyway, here is the entire library attached (including updated example and three sample ad4 files used in the example).

@ the-rebel-agent - feel free to update it in your first post in this thread if you wish.

Ryszard.

Wtv020sd16p.zip (1.1 MB)

Is it possible to stream audio generated from this module via bluetooth to my headset ? Which other module I need ?

the-rebel-agent: Welcome and you are clear to go. Just be careful about the micro SD card you are using. Got a lot of pain in the b... figuring out why mine did not work from the start.

I am doing a gift box which plays four different audio phrases(files) depending on the child how close he is to the box. I am using 4pin ultrasonic with Arduino Nano and WTV020..Can you pleae help me with the code

I'm very impressed with this module and the library is great. I've tried it with a TDA7297 10-50W Dual-Channel Power Amplifier Module and the sound is great. I'd like to connect 2 of the WTV020's to the amp since it is stereo so I can play music on one and sound effects on the other at the same time, however there is only one gnd input and 2 + inputs. Is it safe to connect the speaker - from 2 WTV020's to the same gnd in on the amp? I had earlier tried connecting 2 WTV020's to the same speaker and ended up frying both, don't want to sacrifice any more.

Hello. Anybody knows good source of vtw020sd v1.5? :)

adamson: Hello. Anybody knows good source of vtw020sd v1.5? :)

I've been getting them on ebay, just search wtv020sd.

Hello, I am working on a project using this module. But I still can't make it work. Can somebody help me?

The SD I am using is a SanDisk 2GB FAT format this is the code I am using and I attached the circuit I used.

#include 

int resetPin = 10;
int clockPin = 11;
int dataPin = 12;
int busyPin = 13;


Wtv020sd16p wtv020sd16p(resetPin,clockPin,dataPin,busyPin);

void setup() {

  Serial.begin(9600);
  
  wtv020sd16p.reset();
  delay(100);
  Serial.println("START");
}

void loop() {
 Serial.println("song1");
  wtv020sd16p.playVoice(0);
Serial.println("song2");
  wtv020sd16p.asyncPlayVoice(1);
  delay(5000);
 Serial.println("pause1");
  wtv020sd16p.pauseVoice();
  delay(5000);
  Serial.println("pause2");
  wtv020sd16p.pauseVoice();
  delay(5000);  
  Serial.println("stop");
  wtv020sd16p.stopVoice();
 Serial.println("song3"); 
  wtv020sd16p.asyncPlayVoice(2);
  delay(2000);   
   Serial.println("mute");
  wtv020sd16p.mute();
  delay(2000);
   Serial.println("unmute");
  wtv020sd16p.unmute();
  delay(2000);    
  Serial.println("stop3");
  wtv020sd16p.stopVoice();
}

Schematic.png|479x344

Apologies if this has already been mentioned, but with the module dated 2012.01.12 what does the 5V/3.3V solder jumper on the module actually do?
I understand that this module works best with about 3.6V, and that two IN4007 diodes can be used in series to bump 5V down to around that. If I solder the jumper over to 5V would these two external diodes still be needed? Or are they included on the module now?

Hi, really good work on the code, do you know if there's a way to manage all the sounds with the arduino but be able to change the volume with two push buttons?

Hi, I just took an WTV020 and tried to make it work without an arduino, just plug and play. I follower internet tutorials like this one http://www.buildcircuit.com/how-to-use-wtv020sd-music-module-with-arduino/

and i even downloaded their *.AD4 files. I plugged a speaker 3.3v, GND and a led, tried to make it play with a button or just touching the pin 9 with GND and nothing, I changed SD Cards 1gb ,2gb..etc ever format them in FAT, FAT32, NTFS. I tried everything theres no coming sound outside the speaker, I ever changed the polarities of the speaker. I pluged out the speaker and put a low voltage led in the speaker ping just to look if there is coming outside any kind of signal (blinking led) and nothing.

that WTV020 start piss me off because i took it for a project and it's pain in the a*s.

Is there another module that is ready Plug and play without any problems sd-cards, audio file format..etc ?

I need just a f**ing simple module that gonna play mp3, wav from a sdcard and that's it not to work on it 10 hours and have no results

Hi! registered here because can't start the module during 2 last days. I think it is fake or failed the test samples. I buy it from here: http://www.ebay.com/itm/310629013078?_trksid=p2059210.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

and second from here: http://www.aliexpress.com/item/WTV020-SD-Voice-Module-MP3-Sound-Module-U-disk-Audio-Payer-SD-Card-For-Arduinon-Free/1789995274.html

As we see on photo modules with that kind of inscription, but they send me modules with different inscriptions like this: http://www.aliexpress.com/item/1pieces-lot-XD-10-WTV020M01-WTV020-SD-voice-module-SD-card-voice-module-video-game-voice/1809251467.html

I noticed that all who start this module succesfully use this modules like in first two links, where we see "WTV020-SD-mini" instead "WTV020M01 V1.00". Sorry for my english.

I came here for the same reason my WTV is not working maybe is damaged not sure.

Few questions :"

1) What's the maximum wattage speaker that i can use with this module without an amplifier? 2) Does the SanDisk SD-Cards work for this module? 3) They work only with *.AD4 format and if yes that's the details that i can use for example the Hz..etc?

I use a 3W speaker without an amplifier so i think that's why i can't hear the sound coming out so as in my "1)" question is what the max wat speaker i can use.

I hope i will get some answers.

Thanks

Problem and Solution:

When I first attempted to get a WTV020-SD-16P to work, I like many people had issues. I tried several board and several 1/2GB microSD cards, until eventually it worked, but not sure what the magic was, put it down to voodoo.

The Problem:

However a discovery (from a like minded builder) is that the SD Card Pin 6 (on the board) is not properly connected. The Spec (for Pin 6) says that it should be connected to GND, but it isn't!!! at least not in the boards that we tested.

The solution:

The solution is to connect a wire from Pin6 of the SD Card socket to Pin 8 (GND) of the sound module. As I said I cannot take credit for discovering this. See this post showing the wire that was added.

http://www.tonymacx86.com/imac-mods/130197-mactester57s-imac-g5-17-a1058-model-7.html#post986109

And here is the same modification I did to my own board

https://www.dropbox.com/s/ncp4wbbuirimjem/IMG_3512.jpg?dl=0

The question is: Is this a design/production fault present in all boards? or just isolated to some boards?

Can anyone test their boards, by using a multimeter to check for continuity between Pin 6 (SD) and Pin 8 (module), and report back ?

If after making this modification can anyone report success with SD cards other than the limited once that are known to work ?

Thanks.

kiwisincebirth:
Problem and Solution:

When I first attempted to get a WTV020-SD-16P to work, I like many people had issues. I tried several board and several 1/2GB microSD cards, until eventually it worked, but not sure what the magic was, put it down to voodoo.

The Problem:

However a discovery (from a like minded builder) is that the SD Card Pin 6 (on the board) is not properly connected. The Spec (for Pin 6) says that it should be connected to GND, but it isn’t!!! at least not in the boards that we tested.

The solution:

The solution is to connect a wire from Pin6 of the SD Card socket to Pin 8 (GND) of the sound module. As I said I cannot take credit for discovering this. See this post showing the wire that was added.

http://www.tonymacx86.com/imac-mods/130197-mactester57s-imac-g5-17-a1058-model-7.html#post986109

And here is the same modification I did to my own board

Dropbox - IMG_3512.jpg - Simplify your life

The question is: Is this a design/production fault present in all boards? or just isolated to some boards?

Can anyone test their boards, by using a multimeter to check for continuity between Pin 6 (SD) and Pin 8 (module), and report back ?

If after making this modification can anyone report success with SD cards other than the limited once that are known to work ?

Thanks.

Hi kiwisincebirth,

So you think you fixed it after adding GND to the SD card or you are not sure what fixed it? Can you disconnect the GND wire and check if it still works?

thank you.

So you think you fixed it after adding GND to the SD card or you are not sure what fixed it? Can you disconnect the GND wire and check if it still works?

I'd like to know that too because i spend many hours trying to make it ever get out a bip but nothing