close

Overview

This project aims to create a simple MP3 player using the DFPlayer Mini MP3 module and display the songs being played on a TFT Touch Screen LCD display. The device is capable of Pause and Play operations, Next and Previous song selection, with a simple interface that displays the current song playing.

Hardware Used

Software Used

Library Used

Descriptions

DFPlayer Mini Mp3 Module

The DFPlayer Mini MP3 Player For Arduino is a small and low price MP3 module with an simplified output directly to the speaker. The module can be used as a stand alone module with attached battery, speaker and push buttons or used in combination with an Arduino UNO or any other microcontroller with UART RX/TX capabilities. It is also applicable to other voice prompt related projects such as car navigation voice broadcast, road transport inspectors, toll station voice prompts, railway station, bus safety inspection voice prompts, and voice prompts for business halls of electricity, communications, and financial business.
  • supported sampling rates (kHz): 8/11.025/12/16/22.05/24/32/44.1/48
  • 24 -bit DAC output, support for dynamic range 90dB , SNR support 85dB
  • fully supports FAT16 , FAT32 file system, maximum support 32G of the TF card, support 32G of U disk, 64M bytes NORFLASH.
  • a variety of control modes, I/O control mode, serial mode, AD button control mode
  • advertising sound waiting function, the music can be suspended. when advertising is over in the music continue to play
  • audio data sorted by folder, supports up to 100 folders, every folder can hold up to 255 songs
  • 30 level adjustable volume, 6 -level EQ adjustable

2.8″ TFT LCD Display

2.8 TFT LCD Display Module with Touch - Click Image to Close

2.8 inch TFT LCD display with SPI interface using the ILI9341 driver chip. Screen resolution – 240×320 colour pixels.
Touch responsive screen compatible with the URTouch Arduino library.
Graphics compatible with Adafruit_GFX with Adafruit_ILI9341 Arduino libraries.
STM32 compatible.
Uses 3.3V logic and supply.

LM386 Audio Amplifier Module

Image result for lm386 audio amplifier module arduino

The LM386 Audio Amplifier Module is a mono audio amplifier based on the LM386 chip. It operates on a voltage range between 4 V and 12 V. It has an absolute maximum rating of 15 V.

The LM386M version of the chip will provide a typical output of 325 mW, when the supply voltage is 6 V and the speaker load 8 Ω. A 9 V battery power supply will provide an output of around 500 mW. it provides a gain of 200. if you want to adjust the gain, and hence the volume, just rotate the trimmer clockwise or counter clockwise.

Hardware Set-Up

Schematic Diagram

In building the circuit we will be needing 1k ohm resistor for the RX or  the TX part for noise reduction for the audio . Then for the LCD we will be needing 10k ohm resistor since the LCD is 3.3V logic level  and unfortunately it is not 5V tolerant. So, we need to use some 10K resistor if we want to drive it with a board that uses 5V logic levels like the Arduino Uno.
DFPlayer_Mini_Pin
This is the Pinout for the DFPlayer Mini
This the Actual Circuit for the System.

Software Set-up

Code:

This is the entire code for the system.

Code Breakdown

This is for the Notification function for the status of your Mp3 player and as you can see it is inside a Class function so that it can access functions directly from the library. 

This function is for the Touch Screen to get touch points and perform certain conditions. 

This is for the background since the LCD can only read bitmaps in this case we will just convert jpg or png images to byte arrays using http://javl.github.io/image2cpp/.

This function is for the buttons to perform operation when it is touched.

For Converting image to byte arrays:

Select your desired file you want to convert.
Then if you’re finished setting up your image, click Generate Code then Copy to your text editor and Save it with .c extension. Save it on the sketch where your main code is in.
It should be like this.

This is the function to display your bitmap byte array. You can directly copy the routine from your GFX library 

This the Actual Video of the system with its functions.

Conclusion

This project provided a simple integration of the DFPlayer and the TFT Touch Screen but the components used is not only limited for this project. Depending on your desired output, this project can be improved for modification with the code and the layout of the system .

References

Tags : 2.8" TFT LCDamplifierarduinoarduino unoAudio AmplifierdfplayerDFPlayer Mini Mp3ILI9341lcdLM386MP3Touch Screen

Leave a Response


Warning: Cannot assign an empty string to a string offset in /home/createl1/public_html/community/wp-includes/class.wp-scripts.php on line 486

Warning: Cannot assign an empty string to a string offset in /home/createl1/public_html/community/wp-includes/class.wp-scripts.php on line 486