Arduino library for WTV020-SD-16P audio module

I haven't read the previous posts yet, but have you tried a WAV file?

HazardsMind:
I haven't read the previous posts yet, but have you tried a WAV file?

yes i tried it ... I notice that led blinks when the music is played and it become stable when the music ends. this is based on the duration of the music... did your module play wav file ?

Yea, its weird, some play as WAVs and others as AD4

Added: Im using a Sandisk 1GB memory card fat32 format.

yes its true ... by the way ... do you think using an 8 ohms speaker with 0.5 w will work ? ...

I'm not sure what speakers it can handle, but it should be fine.

okay ... I hope that It will be fine I will look for another speaker and sd card ... did have some sample codes out there can I have it ? :smiley:

Im using the same code and library provided on page one of this thread.

ok thanks a lot XD ....

at last I finally made it ... thanks to all suggestions :grin:
it is tru ... sd card is the problem ... I bought san disk 2gb sd card and it works :slight_smile:

Dear all, i tell you my experience with this great and cheap module and at the end, one problem i am having.
I plays ad4 ok, converted from mp3 using somotool.
Memory card was difficult to get one working finally checked two 2gb microsd one generic, the other one, kingston. And one generic 128mb microsd also worked, all of them fat formated.
I needed to play 2 short voice sounds one after the other, but could not get it with only one module, there was a gap (about 1 second) between each sound. So i used 2 modules conected to arduino Uno in diferent pins.

Problem: I cant get the amplifier output to work, when i connect the amp out to the amplifier,after inserting a 0.01uF between module output and amplifier input, i get a static noise in high volume and the voice sounds in a very low volume over the static.
Do you know which could be the problem?
Could I use the speaker out as amplifier input? Or I would damage the amp input?

Thanks!!!!

I got it working, and directly connected the module to the Arduino 3,3V Output and the digital Pins set in the program.
The SD Card is a cheap 64 mb from my cellphone formated to FAT.
The files are wave (Mono, 16 bit, 12 khz (16 khz didnt work and caused a "chopper"-like noise).

What I don't get is what the difference between
wtv020sd16p.asyncPlayVoice(0); and
wtv020sd16p.playVoice(0);
with both modes I can do things, blink Led's ... while the sound is playing. What is the difference?

I was hoping to be able to play two sounds at the same time, or at lease pause one sound, play the second an than continue.
But this isn't possible, right?

?Hello,

I tried this tutorial but no sound are played in the B mode (with arduino) (two line serial mode).
I've used the arduino code and library indicate in this forum (the program run and the serial console indicate the sound should be played) but no sound.
I think the wtv020sd-16p module stay in mp3 mode and don't want run in two line serial mode.

The MP3 mode work properly on my wtv020sd-16p module (without arduino) (MP3 Mode). But not the two line serial mode of this tutorial...
I've verified all the wire...

Some idea of the issue of this problem ?

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

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