Arduino library for WTV020-SD-16P audio module

Can this module be controlled totally by the arduino? If so what can be eliminated from the circuit? The project that I have in mind for it will require that it operate and change recordings via the arduino. Thanks!

d

Basically anything that uses a button can be replaced by the arduino. Volume, next/prev song, pause/play.

What about the schematic? Does the module only need the three connections to the Arduino and the rest of the schematic can be eliminated? Or do you need additional pins on the Arduino. Thanks

d

Take a look at the attachment below. On page 5, it gives you a layout of what each pin does, and if you look at pin P04 and P05, you will see a secondary function. P04 is the clock, and P05 is the data, so with that, you basically only need two pins to get it to work, but you also need to send the correct data too.

The library was made to send said data, and all you need to do is wire it correctly.

MP3%20Module.pdf (204 KB)

Thanks I'll give that a shot.

d

I am trying to get this working and I have a question re: schematic and sketch. In the schematic it is showing only three pins on the arduino used. Pin 1 of the WTV020-SD-16P going to A3 on the Arduino, Pin 7 of the WTV020-SD-16P going to pin A4 of the Arduino, and Pin 10 of the WTV020-SD-16P going to pin 5 of the Arduino.

But in the sketch there are four pins defined. I wired it up as in the schematic but nothing is working.... What am I missing?

int resetPin = 2;  // The pin number of the reset pin.
int clockPin = 3;  // The pin number of the clock pin.
int dataPin = 4;  // The pin number of the data pin.
int busyPin = 5;  // The pin number of the busy pin.

Thanks

Dan

P06 is the busy pin (pin 5), it lets the arduino know when a audio file has ended.

I guess I am confused about the reset which is defined in the sketch as pin 2 but in the schematic it is A3. And A3 in the sketch is defined in the sketch as the clock pin not the reset. Not clear to me at all.

d

The pins used in the diagram are just examples, it's the pins in the code you want to go by. Then again, you could always changes those too, but as long as you know which pin is what (clk,data,reset and busy) you can code it to work on any combination of arduino pins. Just note, if you plan on using the serial monitor, don't have anything in digital pins 0 & 1 , otherwise you may get incorrect results.

Hello All,

this is my first post so don't kill me for asking.

I've got my module working fine with a 2GB Transcend SD card connected to a 3.3V 8Mhz Arduino Pro Mini. It plays every sound on the SD card but I have a kind of funny behavior: whenever I play a file (synchronously or asynchronously - it doesn't matter) it will play 2 seconds, rewind and play the whole song.

It will always do this and with every file - play 2 to 3 seconds, rewind, play the whole file without a problem...

Any ideas?

P.S: Of course I'm using the library from the first post...

In case anyone wonders - I could solve the problem by applying the fixes mentioned here:

https://www.sparkfun.com/users/395251

insufficient delay after reset. In line 37, changing “delay(300);” to “delay(750);” worked for me;
if you rely on the playVoice() call: sendCommand() returns too soon, when the busy pin is not yet on. In line 94, tweaking “delay(20);” to “delay(50);” worked for me.

It might be better to watch the busy pin than to delay and assume readiness.
Best case with the delay is you wait every time longer than needed.

Yes you are right but for the time being this single delay in the beginning is the easiest way. The documentation is so weird and the findings in this and other forums so different I won't believe a single thing ...

I'm using a Transcend 2GB Micro SD card which is said, does not work most of the time. I've tested it with 2 1.5V AAA batteries as well and it is working for hours together with the 3.3V Arduino Mini Pro ... . All this should not work reading this forum and the documentation :wink:

I know what you mean about the confusion.
A little extra time in initialization hardly impacts speed anyway.

hello ... this is my first time to make an arduino project .........
I just want to ask if audio amplifier is necessary in this module? :smiley:

I guess not, I've tested it with a couple of 8 Ohm speakers and they are loud enough.

You might be safe to feed it to amplified speakers but it would need resistors to feed as Line In to an amp.

thanks for the reply ...

After I made the connection in Arduino Uno, format the 2 gb Sd card into Fat32, and covert my audio files into Ad4 file with 3200 sample rate, I still fail make this module work ...

I thought of adding audio amplifier because my module does not emit any sound ...
but the led connected to the busy pin blinks several times and later become stable at a specific time. and then it blinks again ...
what do you think is the problem in my module
can you suggest something to solve my problem.... :cold_sweat:
any suggestions is deeply appreciated :smiley:

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 ?