wtv020SD-16P aka/or wtv020-SD-mini

Hi all!

Download my experiment | jd_wtv020-SD-mini_starterKit

I’m relatively new to Arduino…well not mush but enough to always want to see tutorials first then plan my works…..
When i saw the wtv020-SD-mini audio modules i was really amaze by his size and right away knowing and having seen
that peoples around the net can do video of it working. So I decide to buy 10 modules for my students…
Nah…| After all is seems not that easy to make it work….. A lots a bit and pieces in some Arduino forum with diagram not working …..
or else i should simply said it didn’t work for us….

So through a lots or try and error here some information gather about this audio Modules that make it work for me…. Now let pump up the chair…

wtv020SD-16P  a.k.a. / or wtv020-SD-mini

  • Yes Size Matters…. A 2Gig micro-SD card always work fine… micro-sd and not micro SD-HC
  • Most of the diagram showing to power the modules with 3.3V, but i change it to 5V out from the Arduino..
    I may have to re-solder the modules on the 5V but for now it work nicely
  • In the download your can see my Fritzing and Arduino code (Confirm Working) and the sample .ad4 files to
  • test if the connection is working before you expand to a better project
Experiment04 with Fritzing for Wtv020sd16p

Experiment04 with Fritzing for Wtv020sd16p

 

 

 

 

 

 

 

#include <SD.h>
#include <Wtv020sd16p.h>
/*
 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. Modified  and match wiring by Jacques Deschambeault Jr
 */
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.
/*
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);

// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int ledPin = 13;
const int buttonPin = 7;     // the number of the pushbutton pin
// variables will change:
int buttonState = 0;         // variable for reading the pushbutton status

// the setup routine runs once when you press reset:
void setup() {                
  // initialize the digital pin as an output.
  pinMode(ledPin, OUTPUT);     
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT); 
  // Initializes the module.
  wtv020sd16p.reset();
  // Play dummy Sound white noise
  wtv020sd16p.playVoice(0);
  //wtv020sd16p.asyncPlayVoice(0);
  Serial.begin(9600);
}

// the loop routine runs over and over again forever:
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) {     
    // turn LED on:    
    digitalWrite(ledPin, HIGH);
    wtv020sd16p.playVoice(1);
  } 
  else {
    // turn LED off:
    digitalWrite(ledPin, LOW); 
  }

}

/*
Others Possible example how to control the sound

// Plays synchronously an audio file. Busy pin is used for this method.
wtv020sd16p.playVoice(0);
// Plays asynchronously an audio file.
wtv020sd16p.asyncPlayVoice(1);
// Plays audio file number 1 during 2 seconds.
delay(5000);
// Pauses audio file number 1 during 2 seconds.  
wtv020sd16p.pauseVoice();
delay(5000);
// Resumes audio file number 1 during 2 seconds.
wtv020sd16p.pauseVoice();
delay(5000);  
// Stops current audio file playing.
wtv020sd16p.stopVoice();
// Plays synchronously an audio file. Busy pin is used for this method.  
wtv020sd16p.asyncPlayVoice(2);
delay(2000);   
// Mutes audio file number 2 during 2 seconds.
wtv020sd16p.mute();
delay(2000);
// Unmutes audio file number 2 during 2 seconds.
wtv020sd16p.unmute();
delay(2000);    
//Stops current audio file playing.
wtv020sd16p.stopVoice();
*/

 

Others Tips:

Preparing an Audio files before conversion

To obtain the best .ad4 audio quality. Here the requirement before the conversion from a .mp3 or .wav to to .ad4
From Audacity, Sound Forge or others audio software simply meet those requirement and save a .wav as a final before conversion.

  1. The sound should be converted to mono
  2. The sample rate should be set to 32000Hz
  3. Bit depth is set to 16
  4. The db should not top higher then -6db… else noise may occur…
  5. Trip unnecessary blank at the beginning or the end or the sound files.

 Conversion to .ad4

1- Copy the file AD4CONVERTER.EXE into a folder containing all your audio source to be converted.
2- Open a command Prompt cmd
3- Then navigate to the desired location examples c:\audio
4- Wrote and execute ad4converter,  then you will see the help files for the commands..
5- The final command shoud look like below

ad4converter -E4 c:\audio1.wav

6-Simply repeat those step for all the audio to convert….

7- Copy all .ad4 into a 2gig micro-sd card or other relevant medium.

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>