Arduino library for WTV020-SD-16P audio module

Having now tried a number of SD Cards at various voltages (3.3v, 3.40v, 3.48v, 3.57v):
Kingston 2Gb: 1 card, doesn't work at all
Transcend 2Gb: 1 card, doesn't work at all
Sandisk 2Gb: 3 cards, 1 works at 3.3v, 2 require 3.4v+
No-Name 2Gb: 1 card, works perfectly at 3.3v
No Name 128Mb: 8 cards, 7 work perfectly at 3.3v, 1 skips some plays at 3.3v, works at 3.4v+
Nokia 128Mb: 3 cards, 2 work perfectly at 3.3v, 1 skips some plays at 3.3v, works at 3.4v+

Conclusions (from my admittedly limited sample):
128Mb cards do better at 3.3v than 2Gb cards
Moving slightly above 3.3v seems to help with some cards (but is not a sure-fire cure)
Once you hit 3.4v, increasing further doesn't help with any more cards from the sample

Drilling down on one of the Sandisk 2Gb cards that needs more than 3.3v, it works at 3.38v or above, and not at 3.35v or below. So less than 0.1v is making the difference here.

I have a Samsung 1Gb and it works fine. I bought a 5 pack on eBay, just in case the card stops working.

Hi,
Recently I bought a WTV020-SD-20SS module from http://emartee.com/product/41928/MP3%20SD%20Card%20Sound%20Module. But it is not behaving properly.When I gave command wtv020sd16p.asyncPlayVoice( 0) or wtv020sd16p.asyncPlayVoice(2) it does not play any sound. Again if I give wtv020sd16p.asyncPlayVoice(1) or wtv020sd16p.asyncPlayVoice(3) or wtv020sd16p.asyncPlayVoice(5) it play both 0002.ad4 and 0003. ad4 alternatively. I tried changing the mask HEX value (eg. unsiggned int mask = 0xFFFF) in the .cpp file it again behave differently.
Previously I was using WTV020-SD-16 p module from Sparkfun and it was working properly with the library.

What I feel is that , probably the timing or the mask value is not correct for WTV020-SD-20SS module. Can you help in resolving the issue?

-neel

Has anyone been able to get the volume command working properly with this device? According to the spec, commands 0xfff0 through 0xfff7 should set one of eight volume levels, but only mute (0xfff0) and full volume (0xfff7) work properly. Intermediate values cause the audio to become very choppy, randomly changing volume, like maybe the ADPCM can't sync up? This happens with this library (if I change, say, VOLUME_MIN from 0xfff0 to 0xfff3 and call mute()) as well as an interrupt-based one I'm working on.

I'm using 32Kb/s ADPCM files from the UsbRecorder utility.

Joe

Has anyone been able to get the volume command working properly with this device? According to the spec, commands 0xfff0 through 0xfff7 should set one of eight volume levels, but only mute (0xfff0) and full volume (0xfff7) work properly. Intermediate values cause the audio to become very choppy, randomly changing volume, like maybe the ADPCM can't sync up? This happens with this library (if I change, say, VOLUME_MIN from 0xfff0 to 0xfff3 and call mute()) as well as an interrupt-based one I'm working on.

I'm using 32Kb/s ADPCM files from the UsbRecorder utility.

Joe

I modified the library to increase and decrease the volume, and it works great. I added three new functions to the library. Hope these help.

Wtv020sd16p.cpp (2.74 KB)

Wtv020sd16p.h (717 Bytes)

keywords.txt (566 Bytes)

HazardsMind:
I modified the library to increase and decrease the volume, and it works great. I added three new functions to the library. Hope these help.

Thanks. Didn't help unfortunately--I still get very choppy volume when trying to modify the volume. Here's scope trace of what's supposed to be a constant 440 Hz tone, after a call to volume(3):

Turns out that it only happens with 32 Kb/s ADPCM files (created by the UsbRecorder v1.3 tool). Setting the volume with 24 Kb/s or lower sampling rate files works fine, even though 32 KB/s file play fine at full volume. Weird. Anyway, the solution is to use 24 Kb/s max.

I'm a bit confused with the busy light. According to the specs, the busy pin goes low when the module is playing a voice. Since one pin of the busy light is tied to Vcc, the light should turn on when playing a voice. So, how come the library is checking for a HIGH? Also, it has been posted that the light turns off when playing a voice. So is the specification document wrong, ie busy pin goes high when playing a voice? I'm still waiting for a Sandisk card coz mine doesn't work.

The busy pin goes high when sound is playing.

Thanks - whoever wrote that specification document should be shot. Anyway, I feel stupid because my micro SD card was working all along. Problem was that I was simply sliding the card into the slot - like what you do with the big SD cards and some micro slots with press-to-eject. Turns out I have to open the latch, put the card in, then close and lock the latch :blush:. So now I have 2 Sandisk cards coming which I don't need. I might have to buy 2 more modules so I can use them :grin:.

That's silly. SD cards are as good as flash drives for storing backup PC files. They take less space and many of the full size ones have a write-protect tab which I have yet to see on a USB flash stick.

They're removable media, the new paper. I have AVI movies on some.

Especially micro-SD, you can get cheap USB adapters for those. Otherwise you need a media reader. They go great in phones to cameras to MP3 players to whatever if you get the right size, I even had a camera and MP3 player that took full size SD cards.

Get the micro-SD's with full-size adapters and you can turn an adapter into an SD reader for Arduino by soldering right to the tabs. Hardest part is the 5V to 3.3V leveling which you can get plenty of help with right here and learn maybe 3 or 4 ways to do that cheap!

New to this - but I seem to be progressing.

  1. You need >3.5V for the module from a source that can give 100mA while it talks without dropping out.
  2. WAV files play OK. I have a set of numbers that are very clear, others seem distorted. Will work on that.
  3. NB! as delivered 2 of the pins were dry solder jointed to the card!!!!! - Scratch off the paint round the pin and resolder.
  4. An old Sandisk 2GB worked for a while off the Arduino 3V - today it stopped.
  5. New identical Sandisks also failed on the Arduino supply - but all OK now on the beefy supply
  6. Kingston 2GB failed on any power supply

Further to my last post.

I tried to use an emitter follower transistor power supply but it was not steady enough.

I now use an LM350 variable supply with 6.5 volts in and 3.55 volts out.
Google the data sheet - I have 120 ohms across the 1/2 pins and 227 ohms from pin 1 to earth (on a 350 ohm variable potentiometer).
On a 'scope it is rock solid 3.55 volts. At a bit below 3.4 volts it stops talking.

I record WAV files in Audacity on my Mac and the signal is up to 0.7 on the scale.
I need numbers - you can speak several then "record selection as wav" to cut them out one by one.

Why bother with .ad4 files and the Somo tool?

Many thanks to all who got us this far!

NB! you have to slide back then flip open the lid on the micro SD card holder - you can't just push the card in like on most holders.

You can run 5V through 2 diodes to get 3.6V. If the 5V drops a bit you get less, it's up to the amps the power supply can deliver and how hungry the device is. VS10xx docs I remember (just a DSP example) gave a max draw at 800 mA, Arduino max out is 200 Ma. I'd give it an Amp just for that.

I tried the 2 diode trick but on the 'scope the volts were all over the place between talking and not talking
I have put some notes here -

http://www.sunspot.co.uk/Projects/Arduino/speaking-vario/Arduino-Vario-WTV020.html

Would a bypass cap on the audio module help?

Hi

Can anyone help me!!!
Is it possible to change operating mode of WTV020SD-16p module? I read the datasheet several time but there is nothing mentioned about mode selection. And also i can't get the current mode.
Actually for this module i don't use arduino module so I want to make code for AVR microcontroller manually (without using Arduino functions).

mr_haiko:
Hi

Can anyone help me!!!
Is it possible to change operating mode of WTV020SD-16p module? I read the datasheet several time but there is nothing mentioned about mode selection. And also i can't get the current mode.
Actually for this module i don't use arduino module so I want to make code for AVR microcontroller manually (without using Arduino functions).

I don't know that module.

But just checking, you do know that Arduino code works on stand-alone AVR chips? The board has the USB interface and some bits but that is all, it is for development even though it often gets used in hobby level end products.

Here are projects that use V-USB to access USB directly from even small AVR's:
http://www.obdev.at/products/vusb/projects.html

mr_haiko:
Hi

Can anyone help me!!!
Is it possible to change operating mode of WTV020SD-16p module? I read the datasheet several time but there is nothing mentioned about mode selection. And also i can't get the current mode.
Actually for this module i don't use arduino module so I want to make code for AVR microcontroller manually (without using Arduino functions).

What operating mode? It can be controlled from either the Arduino, or manually from tact buttons.
Look at this page WTV020SD-16P. There is also a downloadable PDF on that page in the top left of the screen.

Good to see that there is interest in this small device after all this time. :stuck_out_tongue:

How exact serial timing is for this chip ?.
I have ordered these modules from 2 different placies and none is working via serial commands.
AD4 format audio files used in 2GB cards and I/O keys are working.
Controlled serial via LPT port with Windows XP, so timing is what it is, quite slow thoug.
Next connecting to PIC18F252 (not arduido..) so I'm sure that timing is ok.