Go Down

Topic: Arduino library for WTV020-SD-16P audio module (Read 114 times) previous topic - next topic

mr_haiko

I would like to give a question related to WTV020SD-16P.
I follow of all steps I can't understand is the module in mp3 mode or may be in another mode, also after power on if i pull down Play On/Off pin
the busy pin goes to high a few second and returns to low even the music in SD card is quite long. Could anybody give me any advice?
For example after power on in which mode is the module?
I need to use mp3 mode how can i set this mode?
Best regards,
Haik.

HazardsMind

#151
Sep 27, 2013, 12:56 am Last Edit: Sep 27, 2013, 01:01 am by HazardsMind Reason: 1
This is my setup for using tact buttons. I appologise if the picture is too big, it is an HD shot.
Here is the pin layout.
 
                                         
    2->|RESET           U           VDD|
         |AUDIO-L             BUSY/P06|<-5         
         |NC                              NC|
         |SPK+                 NEXT/P02|
         |SPK-                  PREV/P03|
         |NC                              NC|
    3->|P04/CLK/VOL+      VOL-/P05|<-4
         |GND                   PLAY/P07|
My GitHub:
https://github.com/AndrewMascolo?tab=repositories

michaelsngws

Hi guys,

I have no knowledge of electronics, and this is one of my very earliest attempts at playing with this, so please bear with me, I might need things explained slowly.

I am trying to get one of these WTV020-SD-mini V1.5 to work but so far failed to get any sound. Currently trying to troubleshoot by trying a variety of Micro SD cards. Like everyone else, I am finding it hard to find sub 2gb SD cards these days.

2 questions:

1) I understand that there are different versions of this module, 2 Line controlled and Button controlled, etc. Is there a way to visually identify what version it is? Since I bought it off a vendor on AliExpress, I am not completely sure which version I got.

2) Can this module output audio through 32ohm 0.1W speakers? I've got one of those and a 32ohm 0.2W speakers I found at give-away prices at a hardware shop. I tested them with the simple Arduino buzzer sound sketch and they work, just wondering if they work with this module.

Thanks!

HazardsMind

Is your module the same one as in my picture? The module I have can be controlled from the arduino too, from certain pins. See my pin layout.
I don't know if it can drive that speaker directly, so it would probably be wise to get an amplifier.
My GitHub:
https://github.com/AndrewMascolo?tab=repositories

michaelsngws

Yes, HazardsMind, the module looks exactly like the one in your picture.

I have wired it like yours and several other diagrams floating around on the web. I have hooked up a "Busy" LED and have noticed that the frequency of the "Busy" light flickering is different when the module does not have an SD card, and when it has a 128mb SD card inside. It also flickers slightly differently when I insert a 2gb SD card. This leads me to conclude that it does actually detect the SD card.

Just reading up a bit about speakers, and my guess is that mine have too high impedence. Will be ordering or looking for lower ones.

This process of elimination is quite annoying. :D

michaelsngws

Weee, I have sound!

What I did, in my attempt to troubleshoot was to hook up the module to the Arduino Starter kit piezo buzzer to test if it was a problem with my speaker. And lo and behold, while I didn't get music, I got a very soft clicking sound when I paired it with my 128mb Nokia branded sd card, but not from my 2gb sd cards. Well, at least that eliminated the possibility that my WTV module was bad.

So I went in search of a speaker: I got the speaker out of an old Gameboy Color (forgive me, the screen was already melted). A quick Google and I found out it was 8ohm 0.1w.

My conclusion that I arrived at for my module is this:

1) My 128mb Nokia branded micro sd card work. Neither my Kingston nor no-name (that came with a Nokia phone) 2gb sd card works.
2) The 128mb sd card works at 3.3v. It also works with 5v through 2x N4007 diodes (again from the Arduino starter kit) in parallel. Neither 2gb works at either voltages.
3) The speaker from the Gameboy Color 8ohm 0.1w works. My previous ones 32ohm 0.1w did not. I think the datasheet mentioned 8ohm 0.5w as a limit. I have ordered some to see if they work.

My sound module is now playing the-rebel-agent's Star Wars music! Weee!

HazardsMind

My GitHub:
https://github.com/AndrewMascolo?tab=repositories

GoForSmoke

You can try getting a set of ear buds at a dollar store and soldering direct to the plug. The wires will be so thin it takes special work to connect but the plug is easy enough.

If you can get a plug that you can solder to the wires with, pop that into a set of powered speakers. OTOH there's an amplifier chip with number 386 in the name that can give you 20x to 200x boost....

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

HazardsMind

Quote
OTOH there's an amplifier chip with number 386 in the name that can give you 20x to 200x boost....


@michaelsngws:
GoForSmoke is correct and that chip is also in the picture, just follow the yellow wire.
My GitHub:
https://github.com/AndrewMascolo?tab=repositories

GoForSmoke

I got a few from Yourduino at 5 for 75 cents,
http://yourduino.com/sunshop2/index.php?l=product_detail&p=312

Circuit and datasheet are here,
http://arduino-info.wikispaces.com/Popular-ICs

but I had to wait until I got enough other parts to justify the shipping, ended up spending $30-some. Everything came back but be aware that whoever makes the chips has the names and info molded into the top instead of painted on. One one hand the label won't rub off, OTOH it's hard for old eyes to read even with a magnifier! I haven't tried but maybe painting the top with whiteout and then scraping will leave the stuff in the grooves. It's that or I crank up the printer-scanner at 600 DPI to see which chips I want off the foam!

But hey, at those prices I get more for my dollar even with the shipping. Not just chips, but support with full explanations.

No, I'm not part of Yourduino or related or in the same state as anyone from Yourduino. I just like the deals so far.

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

hills603

Hi, maybe i'm being dim, (i'm still a novice when it comes to using arduino, But i have downloaded the zip file and copied it to the arduino libraries folder, open it in the editor and when trying to upload it, or even verify it, I get an error. Im sing an arduino uno, if that makes a diffrence. It says:

It always Highlight this line of the script:

Wtv020sd16p wtv020sd16p(resetPin,clockPin,dataPin,busyPin);

and always says the following:

'Wtv020sd16p' does not name a type

Wtv020sd16pExample:21: error: 'Wtv020sd16p' does not name a type
Wtv020sd16pExample.ino: In function 'void setup()':
Wtv020sd16pExample:25: error: 'wtv020sd16p' was not declared in this scope
Wtv020sd16pExample.ino: In function 'void loop()':
Wtv020sd16pExample:30: error: 'wtv020sd16p' was not declared in this scope


What / where have I gone wrong???
Any help most appreciated, many thanks,
Andy :)

HazardsMind

You may need to change #include <Wprogram.h> to #include <Arduino.h> in the .h and/or .cpp file. To do this you will need a text editor like notepad or notepad++, save it then recompile sketch.
My GitHub:
https://github.com/AndrewMascolo?tab=repositories

GoForSmoke


You may need to change #include <Wprogram.h> to #include <Arduino.h> in the .h and/or .cpp file. To do this you will need a text editor like notepad or notepad++, save it then recompile sketch.


Another thing I've found to work is to Select All and Copy the sketch then start a new sketch in the newer IDE and Paste to that. There may still be some editing needed, of course.
I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

HazardsMind

Not saying that's wrong to do, but some of the older sketches don't know to look for either Wprogram.h or Arduino.h, some are just set for Wprogram.h.

I always check anyways.
My GitHub:
https://github.com/AndrewMascolo?tab=repositories

GoForSmoke

Start a new sketch, it will already include the files that match the IDE version. Paste in the old sketch as a text copy from clipboard. Debug. Repeat until no bugs. There will be differences and one or more might or might not matter. Usually simple sketches just run the same for me.

You can #include <Arduino.h> //  just to be sure whichever way you load the sketch

To what extent does the compiler not include unused functions, etc? IIRC if you only use one function in <string.h> then the rest don't get compiled. If nothing calls <Wprogram.h> then it won't be in the final image.
I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Go Up