Go Down

Topic: WT5001M02-28P another mp3/wav cheap sound module (Read 18 times) previous topic - next topic

onesky

#30
Aug 18, 2013, 11:08 am Last Edit: Oct 21, 2013, 02:04 pm by onesky Reason: 1

Good afternoon.

as I can do to access the contents of the SD and internal memory module.

I could tell as I connect it to arduino and PIC microcontroller?
There are some example pic done to help me?
is there any example you select the track you want to play and can be controlled with SPI or USB or serial?

sorry for my English, I'm Latino of Colombia
thanks
editronikx@gmail.com


this is the pin assignment scheme to control the micro-SD mp3 files via Arduino Serial line



this is an example (posted before) to control mp3 files via Arduino Serial

the track 002.mp3 will play automatically at startup

the track 001.mp3 will play when push button is pressed

Code: [Select]
const int buttonPinFire = 2;   // FIRE

// variables will change:
int buttonState = 0;         // variable for reading the pushbutton status

void setup() {
 
   // initialize the button pin as a input:
pinMode(buttonPinFire, INPUT);

// initialize serial communication:
   Serial.begin(9600);
   

   
   Serial.write(0x7E);
   Serial.write(0x03);
   Serial.write(0xA7);
   Serial.write(0x1F); //  volume max
   Serial.write(0x7E);
   
   // start sound
   Serial.write(0x7E);
   Serial.write(0x04);
   Serial.write(0xA0); // A0 for SD card
   Serial.write((byte)0x00);
   Serial.write(0x02); // track number
   Serial.write(0x7E);
   delay(3000);
   
   }
   
   void loop()
{
                     
   
 buttonState = digitalRead(buttonPinFire);
if (buttonState == HIGH) {

   Serial.write(0x7E);
   Serial.write(0x04);
   Serial.write(0xA0); // A0 for SD card
   Serial.write((byte)0x00);
   Serial.write(0x01); // track number
   Serial.write(0x7E);
delay(300);
}
 
         }

editronikx

Gracias por la pronta respuesta.

ya realice el montaje como esta en el esquematico, pero no me funciona, solo funciona en modo ADC en modo MP3,
1- le di formato a la sd card en FAT y fat 32 y ninguna funciono
2- copie tres archivos mp3 desde el PC a la sd card
3- monte el circuito anterior
4 conecte el arduino leonardo del TX al modulo, alimente a 5v, conecte el pin 7 del arduino
5- presiono el pulsador y no sucede nada.
6- cambie el pin 7 por el pin 13 de arduino y nada.

ayuda...help...help please.

onesky

the mp3 files must be copied on the root of the SD CARD (without folders)

you should post a photo of your circuit

editronikx

cordial saludo.

ya me funciono todo, hay un error en el codigo por que se debe colocar Serial1.begin(9600); y en todo lo que se use el puerto serial del arduino se debe colocar el puerto correspondiente, serial es para envio de datos al PC pero esto no activa al modulo, lo demas funciono bien, solo falta ensayar SPI, USB
les dejo un video y el tutorial en espaƱol de todo lo que hice
http://editronikx.blogspot.com/2013/08/colocale-sonido-wt5001-tus-proyectos.html
http://www.youtube.com/watch?v=krXnljIt2N8&feature=c4-overview&list=UUUJ6BMwZFHTnBozdGONtIhA

el proyecto consiste en enviar datos por blueooth RN42 desde android el arduino leonardo recibe el codigo y envia los datos al modulo para que reproduzca la pista seleccionada y luego al prender un led se reproduzca el sonido respectivo.

saludos desde colombia.
gracias por su ayuda

onesky

as requested by a friend i add the scheme working with the test code above



onesky


I'm probably very spoiled, but I don't find that module very cheap.

I can buy a car mp3 player/transmitter with USB connector, SD card reader, remote control and decent sound quality for maybe $4.00. But just an mp3 player without FM transmitter, without remote, without USB but with Arduino compatible input pins instead of buttons is $19.99. Why? I guess part of the explanation is the fact that they don't make this in the same quantities. But yet, $20?


on aliexpress now only for 9,99$, i just ordered 2 more for future projects.

Testato

- [Guida] IDE - http://goo.gl/ln6glr
- [Lib] ST7032i LCD I2C - http://goo.gl/GNojT6
- [Lib] PCF8574+HD44780 LCD I2C - http://goo.gl/r7CstH

onesky

#37
Aug 21, 2014, 01:02 pm Last Edit: Aug 21, 2014, 01:05 pm by onesky Reason: 1
this module is one of the best i ever tested

i could finally finish the project with arduino and it's very fast and loud when used with a small mini amp

you can see at work in this video

http://www.youtube.com/watch?v=dJbevWStEUo

as suggested before it's very important the order of the files saved in the microsd that can be done with this small software
http://www.anerty.net/software/file/DriveSort/

sound tracks numbers need conversion to hexadecimal letters/numbers
you can use the script in this website:   http://www.statman.info/conversions/hexadecimal.html    

example:

if track number is "10" ---> "A" hexadecimal

   // start sound
   Serial.write(0x7E);
   Serial.write(0x04);
   Serial.write(0xA0); // A0 for SD card
   Serial.write(0x00); // track high byte
   Serial.write(0x0A); // track low byte
   Serial.write(0x7E);

Go Up