SUNROM ELECTRONICS

Wav Audio Player from SD Card

Controlled from Serial UART for playing wav audio files of 44.1 Khz rate

Sunrom Part# 1200

Available We dispatch same day if ordered by 4PM (excluding holidays), then courier usually takes 2-5 days.
Quantity Pricing
Quantity :
Price (Discount%)
1-4 :
Rs.900/- (0%)
5-9 :
Rs.873/- (3%)
10-24 :
Rs.837/- (7%)
25-49 :
Rs.810/- (10%)
50-74 :
Rs.792/- (12%)
75-99 :
Rs.765/- (15%)
100-249 :
Rs.738/- (18%)
250-499 :
Rs.720/- (20%)
500-999 :
Rs.702/- (22%)
1000+ :
Rs.675/- (25%)

Downloads

Demo Song

HERE IS A IMPROVED VERSION: 1427 WITH SAME PROTOCOL

Board plays wav files from memory card giving CD quality sound output. The board is controlled from an external microcontroller or PC which sends simple ASCII string telling board what to play.

The board is a small Audio-Sound module that can play back pre-stored audio files such as voice and music from a micro-SD memory card. The module supports 8 bit mono uncompress audio files having sampling rate of 44100Hz(44.1Khz). By using the free available software tool, any audio file(WAV, MP3, PCM, etc) can be easily converted to supported format. The compact board takes minimal board space of just 3x6cm and is ideal for any application that required embedded audio.

The board is controlled through simple serial commands. Board is a very flexible, compact and low cost embedded audio solution for any applications.

Accepts any micro SD memory card from 128MB to 32GB. These memory cards are available at very low cost due to wide use in mobile phones. 

Features

  • Low cost module for all embedded audio-sound applications
  • Plays high quality audio of 44.1 Khz
  • Can interface with any microcontroller or PC Serial port
  • Accepts any Micro SD Card from 128MB to 32GB  which is FAT16 or FAT32 formatted
  • Simple to use and low cost
  • Play indicating Status LED
  • Compact size measuring only 3cm x 6cm

Applications

  • General purpose embedded audio and sound applications
  • All voice annunciator systems.
  • Automobile, Parking radar, GPS navigation systems
  • Elevator, Security, Access-Control and Warning devices.
  • Intelligent home automation and domestic applications
  • Robotics and Industrial Control
  • Traffic facilities: Toll gates, parking lots.
  • Toys, learning tools, talking books and all gaming sound effects.
  • MP3 player like simple devices

Board Schematic

Specifications

Name

Typical

Unit

Working Voltage

5

V DC Regulated

Current Consumption

100mA

Peak(20mA Avg)

UART Level

3-5V

Can work directly with 3V or 5V MCU pins

UART baud rate (8 bit data, no parity, 1 stop bit)

9600

bps

Pinouts

Pin

Pin Name

Details

RX-I

Receive Input

Input serial data of 3-5V logic level, Usually connected to TXD pin of microcontrollers/PC/RS232.

TX-O

Transmit Output

Output serial data of 5V logic level, Usually connected to RXD pin of microcontrollers/PC/RS232.

+5V

Power Supply

Regulated 5V supply input. Board has LM1117-3.3V regulator to power all parts.

GND

Ground

Ground level of power supply. Must be common ground with microcontroller / USB / MAX232 board.

Control Commands

Following are the commands you can use to control the board, Commands and response are simple ASCII strings you can send from microcontroller or write directly in terminal.

Command

Name

Response

Details

Pxxx<Enter Key>

Play audio file

K or E

Plays a wav file. Where xxx is the name of audio file without extension. For Ex. If you want to play test.wav

Then send Ptest followed by Enter key ( '\r', 0x0D, 13 in decimal). The file name is not case sensitive.

If play back was started the board responds with ASCII character K. On Error the board returns E as error.

Note: board supports wav files with format of 44.1 Khz, 8 bit mono only

S

Stop playback

K

Stop playing whatever it is currently playing. 
Always returns K, as acknowledgement of the command

?

Query if playing

Y or N

If board is busy playing a file it return Y else N

L

Loop on

K

Default behavior at power up, Once you give file play command it keeps playing from start once it finish playing.
Always returns K, as acknowledgement of the command

X

Loop off

K

Once you give file play command it stop playback when the file ends.
Always returns K, as acknowledgement of the command

Status LED

There is a red led on board which has following meaning

LED Status

Details

LED Blink once Power on

Normal behavior, When you power on board it checks for memory card, and if found it blinks once for 100ms and becomes OFF indicating everything is ok.

LED blinks fast rate, always

Card Error, It means that the memory card is not present or wrong format. Try inserting correctly formatted SD Card.

LED steady ON

Board is playing audio file.

LED off

Board is not playing any audio file and is ready to accept any serial command.

LED steady ON always when power on

If the board has found “auto.wav” file on the card. It immediately starts playing that file and LED comes on steady upon power on.  It keeps looking the same auto.wav file so LED always is on unless you send Stop command to it.

PC side Terminal software

To connect to PC you can use either a simple MAX232 circuit to convert display’s TTL level of 5V to RS232 level of +12/-12V or you can use a USB to TTL UART board. Either way you can get a serial port on PC to connect to and send commands.

We recommend this software which can be used test display by sending serial data from PC side.

Interfacing with microcontroller

It’s very easy to interface with microcontroller having UART at 3V or 5V level. Configure your microcontroller to communicate at 9600 baud rate.

To play a particular wav file send Ascii string in following format. Note the string starts with command character(P) and end with CR (Carriage return, '\r', 0x0D, 13 in decimal).

printf("Ptest\r");         // Play test.wav file from SD memory card

Before approaching to this, we recommend you try on PC first with terminal software.

In Keil C51 compiler you can write simple code as below to play test.wav file. 

#include <REGX51.H>
#include <stdio.h> // for printf

// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// -=-=-=-=- Setup Serial port for printf -=
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
void init_serial( void )
{
  //9600 bps @ 11.059 MHz
  SCON = 0x50; /* Setup serial port control register */
  /* Mode 1: 8-bit uart var. baud rate */
  /* REN: enable receiver */
  PCON &= 0x7F; /* Clear SMOD bit in power ctrl reg */
  /* This bit doubles the baud rate */
  TMOD &= 0xCF; /* Setup timer/counter mode register */
  /* Clear M1 and M0 for timer 1 */
  TMOD |= 0x20; /* Set M1 for 8-bit autoreload timer */
  TH1 = 0xFD; /* Set autoreload value for timer 1 */
  /* 9600 baud with 11.0592 MHz xtal */
  TR1 = 1; /* Start timer 1 */
  TI = 1; /* Set TI to indicate ready to xmit */
}

// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// -=-=-=-=- Delay x ms -=-=-=-=-=-=-=
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
void delay_ms(int x) // delays x msec (at fosc=11.0592MHz)
{
  int j=0;
  while(x>=0)
  {
    for (j=0; j<100; j++);
    x--;
  }
}

// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// -=-=-=-=- Main -=-=-=-=-=-=-=
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
void main()
{
  delay_ms(100); // power stabilize

  init_serial(); // setup C51 serial port

  printf("Ptest\r"); // Play test.wav file

  while(1)
  {
  }
}

 

Managing wav files on memory card

To manage wav files on memory card you can get any low cost memory card reader available in IT or mobile spares shop. Insert card into it and plug it into PC like pen drive. When you insert your SD card into memory reader on PC you can view the files. Once you have put all required WAV files. Note: board supports wav files with format of 44.1 Khz, 8 bit mono only.

Supported Wav file format

Please note that the board supports playback of WAV file having format of 8 bit mono with sampling rate of 44.1 Khz

To perform conversion to supported format, you can use following software which is free

//www.nch.com.au/switch/index.html

Add files or folder, Set output to WAV and Encoder options as 44100Hz, 8 bit mono

Frequently Asked Questions

How to play MP3 files?

Board cannot play MP3 file, only WAV file. You can do the conversion on computer and play. MP3 is a compress format and it will be required to be converted to uncompress WAV files. There will be no loss of quality during this. You can use any free software to do this conversion. Note: board supports wav files with format of 44.1 Khz, 8 bit mono only.

How to amplify Audio

The audio from board is at headphone level only. You should add a external audio amplifier like LM386 or best way is to use a easily available PC Desktop Speaker system. The stereo pin from that can go to the player board instead of PC giving excellent sound output.

Bestselling Products

Sunrom Electronics & Sunrom Technologies are two companies, that are the foremost online e-commerce stores since 2004, providing innovative embedded systems, components & services. Our aim is to empower you to Make In India. We work closely with electronics manufacturing companies & individuals to understand & solve the challenges faced during production. We do not just sell things, We use them ourselves in our products, and provide you with high quality tested components for trouble free experience.

  • Sunrom Electronics
  • GSTIN: 24AFBPT4632H1ZJ
  • Sunrom Technologies
  • GSTIN: 24AJLPP4029L1ZW
Google Reviews