Arduino library for WTV020-SD-16P audio module

Oh ok THANKS got it

Just let me know If you need anything else. Always a pleasure to help.

zargnut:
FAT formatted on windows 7
File is named 0.ad4, and located in the root directory

use the sd card formatter utility, and rename the file as 0000.ad4

first try to use the ad4 files that have been tested by others , it will help u

Hello, congratulations for the work.
You can select a track between the files on the sd.
Create a sort of mp3 trigger.

:slight_smile: :slight_smile: :slight_smile:

Hey guys, anyone using it at 5V? Cause I moved the soldered pin from 3.3 to 5 and could not get it to work. Quite erratically. I did not use any diode cause I believe they are soldered in the pcb board. Any idea?

Posted a new library here http://arduino.cc/forum/index.php/topic,133013.new.html#new for an audio amplifier that works with this audio module.

I am running it on 5V supply without changing the jumper , and using 2 diodes.

dmsherazi:
I am running it on 5V supply without changing the jumper , and using 2 diodes.

So, your board is working fine, cause I tried that setup and could not make it work. Functionality was erratically.

You are abs right. Tried that with my two modules and did work. Maybe I tried that in the past with the defective one I had. Good!

Just a note in case anyone else tries this.

I bought one of these modules on eBay and following some instructions from someone on YouTube, I resoldered the jump link to set the voltage to 5V instead of 3.3V (there are 3 solder pads and you join 2 of them).

I did this because I could not get the module to make any sounds, even though the (busy) LED was flashing as if it was receiving commands etc.

Anyway. Following switching the module to 5V, it still didn't work, but when I tried to re-load the AD4 files, the SD card was no longer readable.

So it looks like the module may work on 5V, but not all SD cards (well not mine).
Hence I'd not advise anyone to try this unless the know their SD card is 5V tolerant.

Well, I don't think any micro sd card works at 5V. So, basically If does not work, It is not weird. If you need your wtv working at 5V, interconnect the diodes 4007 and go back that soldered pin to 3.3v.

Here you have the wtv working at 5V with two diodes:

it seems it's working fine, also sound quality
what diode did u use and where did u soldered?

1N4007. Connected in series as you will do with two power supplies to add its volts.

5V entering to the + lead of the first diode and connecting the - lead of the second diode to the wtv.

um, i think i am going to test again the board with 3volts pin and diodes
want to see if it will work better

I did not notice any difference in quality working at 5v or 3.3v.

By placing the two diodes in series with the 5v supply your dropping the voltage at the module input to 3.8v.
Essentially just feeding the module .5v over the recommended 3.3v.

I'm using an Arduino Uno to drive one of these boards (Embedded Adventures - Products - WTV020-SD SoundOut audio module - MOD-1007) based on the same chipset - the library works in as much as a single file play results in audio being played, however, when I try to queue up files in my code (to announce different digits, words, etc, like a talking clock, for example), the busyPin detection does not seem to be working.

I added a couple of lines of code to the playVoice() function to light up the on-board LED (pin13) when the busy loop was waiting but even on a four second audio file, the LED doesn't come on, indicating that I'm not getting the right busyPin status somehow... I've tried two modules (I had a spare) but so far no luck... I have to resort to putting delays between playouts (commented out below to demonstrate the problem) but no luck. each audio file is simply the spoken words "one", "two", etc, with 100msec of silence before/after the word.

any ideas appreciated!

/*
 Example: Control a WTV020-SD-16P module to play voices from an Arduino board.
 Created by Diego J. Arevalo, August 6th, 2012.
 Released into the public domain.
 */

#include <Wtv020sd16p.h>

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.

int ledPin = 13;

const int buttonPin = 8;     // the number of the pushbutton pin
int buttonState = 0;         // variable for reading the pushbutton status


/*
Create an instance of the Wtv020sd16p class.
 1st parameter: Reset pin number.
 2nd parameter: Clock pin number.
 3rd parameter: Data pin number.
 4th parameter: Busy pin number.
 */
Wtv020sd16p wtv020sd16p(resetPin,clockPin,dataPin,busyPin);

void setup() {
  //Initializes the module.
  wtv020sd16p.reset();
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT);    
  wtv020sd16p.unmute();

  pinMode(13, OUTPUT);
//  digitalWrite (13, HIGH);
		digitalWrite(13, LOW);

}

void loop() {
  // read the state of the pushbutton value:
  buttonState = digitalRead(buttonPin);
  // check if the pushbutton is pressed.
  // if it is, the buttonState is HIGH:
  if (buttonState == HIGH) {    
  
  //Plays synchronously an audio file. Busy pin is used for this method.
//  delay(25);    
//  wtv020sd16p.setVolume(7);
  wtv020sd16p.playVoice(1);
//  delay(5000);
  wtv020sd16p.playVoice(2);
//  delay(5000);
  wtv020sd16p.playVoice(3);
//  delay(5000);
  wtv020sd16p.playVoice(4);
//  delay(5000);
  //  wtv020sd16p.mute();
  }
}

Busy pin is not always detected when using synchronous playback (playVoice), so add a delay of 50 ms before the detection of busyPin.
Add delay(50) in the line 42 of Wtv020sd16p.cpp

Good Luck!

i lu9jmg,

thank you for the suggestion - that makes perfect sense - the vendor made a similar suggestion overnight (emailed from o/s while on vacation, that's service)! I'll give it a go after Christmas is over - my wife is mad at me for spending too much time on this as it is right now :slight_smile: