Elementzonline Wikia
Advertisement

Playback modules are used when sound files are to be played in an electronic project. The assistance of sounds often makes a project more attractive and different. This playback module allows playing sounds which can be controlled by Serial data interface or through address selection and control pins

Introduction[]

Sdplay cover


Features[]

  • 5 Volt operation
  • UART and adrress selection support
  • Supports all SDHC cards
  • Maximum usable memory of 4GB
  • Supports WAV file format - Uncompressed, 8-bit
  • Supports both Stereo and mono sounds
  • Free MP3 to WAV file converter for SD card playback module
  • Compatible with PIC, ARM, AVR, 8051 ICs and supports Arduino platform.


Pin Details[]

The control pins and address pins are labelled at the bottom of the Playback module.

The picture shows the pins available for connection of the playback module for the external circuitry.

Sdplay bottom

Producing the compatible sound files[]

The module requires using 8-bit Uncompressed WAV file for the playback to work.

Sdplay sd

Formating SD card[]

It's mandatory to format the SD card as FAT32 format.

Using the windows utility[]

A Windows utility is provided for the easy conversion of MP3 files to the compatible WAV file. The utility can be downloaded from the below link.

ELEMENTZ SD Playback Converter Software

Download and navigate to dist folder and double click SDConverter.exe.

Sdplay software

Open the Playback converter utility, browse for the MP3 file. Make sure the MP3 file name doesn't contain any spaces or special character.

Sdplay file select

After browsing press the Convert button and wait for the conversion to finish.

Sdplay mp3file

If the conversion is successful, a screen like the below is obtained.

Sdplay conversion status

The resultant WAV file is stored in the same name and location as that of the MP3 file used for the conversion.

Sdplay result

Playing sound files[]

using UART-Serial communication[]

Using PC[]

For connecting the SD card playback board to a PC, USB to Serial converters are required. TTL pins of the USB to Serial converters are to be connected to the SD card board as follows. Baud rate required is 9600.

Connecting to a USB to TTL converter
SD Payback USB to TTL Function
TX RX Receive response
RX TX Send command
GND GND Make ground common
VCC 5V Module working voltage

Using Microcontroller[]

For connecting the SD card playback board to Microcontroller. Any microcontroller having UART communication at 9600 baud rate is used for the communication. Software serial library in Arduino can be used for controlling the board with any IO pin of the Arduino boards through UART communication.

Connecting to a Microcontroller
SD Payback Microcontroller Function
TX RX Receive response
RX TX Send command
GND GND Make ground common
VCC 5V Module working voltage

using Address pins[]

For connecting the SD card playback board to a PC, USB to Serial converters are required. TTL pins of the USB to Serial converters are to be connected to the SD card board as follows. Baud rate required is 9600.

Controlling using Address pins
Control pin Function
PLAY Play the selected address file
AD0-AD4 5 Bit address selection pin
Additional controls
Control pin Function
PREV Select the previous file for playback
NEXT Play the next file for playback

Note: The previous file and next file highly depends on the memory organisation and the order in which the file is saved in the SD card.

Output play back[]

The playback module supports both Mono and stereo files. Simply connect the SPKL, SPKR and GND to the headset and enjoy the sounds being played.

Headset connection
Pin Name Function
SPKL Left speaker output
SPKR Right speaker output
GND Common ground

AT Command examples[]

For playing a wav file called fileName.wav, Simply send fileName.wav<cr>.

Note1 : Its mandatory to send the <cr>(('\r', 0x0D in hexadecimal, 13 in decimal)) after each command or filename

Note2: WAV files supported are 8-bit, uncompressed mono/stereo types. Use SD card Playback converter software available in this link for avoiding problems due to WAV file incompatibility.

Other AT commands include:

  • AT+MODE=0 - Change to normal playback mode
  • AT+MODE=1 - Change to External trigger mode using address pins
  • AT+PLAY, AT+PREVIOUS, AT+NEXT, AT+PAUSE etc.

For details about all the AT commands available, see the usermanual available at our GitHub channel

Advertisement