Page 1 of 1

DFPlayer

Posted: Tue Jan 21, 2025 2:09 pm
by bdjbuster
Hello, I have an open smart serial control USB MP3 board, and I would like to control it with an Arduino Uno. However, I am unable to get it to work with the DFPlayer. Could someone take a look at what I might be doing wrong? Or is the board I have not supported? If it is not supported, could I get it working myself with UART communication?

Re: DFPlayer

Posted: Tue Jan 21, 2025 2:52 pm
by mnfisher
If it uses DFPlayer commands then it should work - files do need to be correctly named and stored too.

I recently got a batch that didn't seem to work (they were cheap Temu) See viewtopic.php?p=15950#p15950
and viewtopic.php?p=16175#p16175

Martin

Re: DFPlayer

Posted: Tue Jan 21, 2025 3:59 pm
by bdjbuster
I know the device works well because I uploaded a sketch using a demo of the Arduino IDE, and it works perfectly. However, I would like to use Flowcode instead. How can I check if my version is also supported? I have this one: https://www.tinytronics.nl/nl/audio/aud ... uidspreker

Re: DFPlayer

Posted: Tue Jan 21, 2025 10:09 pm
by mnfisher
Looking at the datasheet it seems to have a slightly different command set to the dfplayer. The basic format of commands is the same though, so it wouldn't be a difficult task to modify the component to work with your board.
Matrix kindly make all the components open source - so you could take a look at that (or I can post the source to my component - which implements more of the dfplayer commands)

Martin

Re: DFPlayer

Posted: Wed Jan 22, 2025 6:55 am
by bdjbuster
"Thank you for your response. I looked into the possibility of ordering a DSPlayer, and that could work, but they all only have a speaker output and no headphone output. I would like to modify the source code, but I’m not sure how to access the code or how to work with it. Could you explain how I can access the source code and how it works, or is there a document that explains this?"

Re: DFPlayer

Posted: Wed Jan 22, 2025 10:44 am
by mnfisher
The source for the FC component is at https://www.flowcode.co.uk/wiki/index.p ... io_Output)

The datasheet for the board is in the downloads page on the product link.

You can 'experiment' with the component easily - open it in FC and edit and test as a program. You'll need to check the pins etc are set correctly for your MCU - and then check initialise sends the correct data. Then test individual commands by calling SendCommand - which will write the header command and parameters to the UART connected to the player - hopefully resulting in some sound when you send 'play'.

An alternative is to load an an Arduino as a SCADA target and then you can run the program on the PC (in simulation) - whilst still sending the data to the board from the Arduino. This takes a little more setting up but is a very neat trick.

Have a play - I don't have the same board so it's difficult to test - but if you upload your progress we can take a look and assist if needed.

Martin

Re: DFPlayer

Posted: Wed Jan 22, 2025 12:37 pm
by bdjbuster
I managed to get it working. I eventually used a UART (CAL) under the 'Creation' section and sent the hexadecimal numbers one by one.

Re: DFPlayer

Posted: Wed Jan 22, 2025 1:13 pm
by mnfisher
That's good - take a look at the component. You really just need a checksum function to make sending 'general' commands easier.

Martin