BY-8001-16P u-disk audio player

These look like useful little player modules but the information is scant. Anyone know how the audio files on the SD card should be named so that the module knows which track to play?. Is it 0001.wav, 0002.wav 0003.wav or is it something else ?.
Cheers
Mike

It looks similar to the Waytronic 5001 product, but I see the serial op codes are slightly different. Looks like it does playlists and supports 4 ohm speaker.

Probably doesn't matter what your files are named, unless you want to be sure they are in a specific order for serial commanding them to play back. Naming files with a numbering prefix automatically orders them in the file system, so you can command the player to play file number xx.

The picture of the module looks to show resistors for control mode 101 (ABC). Description states UART serial is not available for that mode. So you might need to remove/install a resistor.

It looks like FN-M16P. Maybe you can refer to the datasheet of FN-M16P. Here is a link.
http://flyrontech.com/edownload/6.html

It is produced by Balway Electronic (China).
The datasheet can be downloaded here:
http://www.balway.com/Download/BY8001-16P语音模块使用说明书V1.2.pdf

But the document was written in chinese, probably you can use google to translate.
Seems as the serial control command look similar to DFPlayer Mini: http://www.dfrobot.com/image/data/DFR0299/DFPlayer%20Mini%20Manul.pdf

The BY8001 is cheaper by around $2 as compared to DFPlayer.

Well I tried it and it doesn't seem to care about filenames - it orders them in the order you loaded them on the card. It does, however, seem to be a bit picky about the cards used. All normal (2GB and under) cards work fine, but a 4GB SDHC Kingston produced a quiet random clicking sound in the background of the music recording.
M

mobyd:
Well I tried it and it doesn't seem to care about filenames - it orders them in the order you loaded them on the card. It does, however, seem to be a bit picky about the cards used. All normal (2GB and under) cards work fine, but a 4GB SDHC Kingston produced a quiet random clicking sound in the background of the music recording.
M

That clicking sound might be a problem with your 4GB SDHC card. I don't have a 4GB SDHC to try, but have successfully tested the BY8001's playback of MP3 files with a 8GB SDHC and 32GB SDHC cards. Both performed without clicking or other problems; same with a few of my slower 2GB micro SD cards. You might want to try testing your 4GB card's for read/write errors with a SD-card reader and flash testing PC software.

I prepared an Arduino library for the BY8001-16P player. It should also work with the BY8301-16P but I don't have one of those to test. I also have a re-written the English version of the BY8001-16P datasheet so it makes much more sense. See the attached files. For help with installing the library, see this page for guidance: http://www.arduino.cc/en/Guide/Libraries

Here's my breadboard setup of BY8001, Arduino Pro Mini (8MHz/3.3V), and FDTI Basic USB (3.3V) programmer. The MP3 module is not breadboard friendly, so I'm using a couple of long leg 1x8 female headers (2.54mm spacing) to compensate for the irregular row width spacing of the module. Otherwise, pretty easy to experiment with and very few connections to get it running.

BY8001 Library.zip (10.6 KB)

BY8001 Revised Datasheet - English.pdf (722 KB)

I just created an account to thank you for these files. I'm a beginner at Arduino and bought a BY8001-16P to add to my alarm clock. With the help of these files I got it to work :smiley:

I encountered only one problem that took me a while to solve. At first it produced loud popping noises while playing. It turned out that it really needed that 1k ohm resistor at the rx port, that is shown in figure 8.2 of the manual. After I added one it sounded fine.

I'm a noob. I'm trying to compile the first example. The version I use Arduino compiler is 1.6.4 The library arduino.h think it is implemented in the compiler. For this reason the include delete this file. The program does not compile. What am I doing wrong?

Thank you.

Sorry my bad English.

Jummi,

With 1.6.4 or 1.6.5 (latest), don't delete the include for arduino.h in BY8001.h file. What complier errors are reported?

Make sure you have installed the library correctly. Best is to use the "Add .ZIP Library" menu feature.

Which Arduino board do you have? Uno?


Here's a photo of my completed project that includes the BY8001-16P module. It's my MP3 Pedestrian Backup Warning device for my hybrid electric vehicle. The device plays suitable MP3 files (train crossing bells, fog horns, steam locomotives, Star Trek red alert, etc.), randomly selecting a different file each time the car's transmission is put in reverse. I have over one hundred tracks (MP3 files) on the micro SD-card, so I always hear something different. It has a one button volume level control.

The warning device is powered from the car's 12 volt reverse lamp circuit and uses an Arduino Pro Mini (8Mhz/3.3V), 5V power supply module, and 8 ohm speaker inside X-Mini speaker enclosure. For the PCB, I used CadSoft Eagle PCB design software and fabrication was done by OSH Park pcb services.

Take back the files that you have put into this thread. Use the Arduino Uno. I put the libraries in the directory where you ran the program to find them when compiling. The error that tells me is:
" ex1PlaybackSequentially.ino: 21: 20: fatal error: BY8001.h: No such file or directory"

Thank you for your patience.

Not recommended, but If you insist on compiling with all files from the same directory, you must change all the #include statements to include double quotes instead of angle brackets. Like this:

#include "BY8001.h"

Best to install the library per the Library Guide in the above link.

I am new and I did not know that could be problems compiling the program like I did. I added to the arduino libraries as you said. Now if compile perfectly.

Thank you for your attention and time.

New to just about everything Arduino and programming. I'd like to use this MP3 module the same way this person had setup a BY-8301-16P but slightly different. (see video below)

Summary of desired functions:

  1. LED 1 - Always on
  2. LED 2 - Constantly Pulsating
  3. LED 3 - Flashes synchronized with sound
  4. Remotely trigger random tracks
  5. Remotely trigger specific tracks

I'd like to use a R/C remote to trigger if possible.

Can anyone assist me in trying to accomplish the same thing?

Here's the sketch he uses: I assume replace MP3FLASH16P.h with BY8001.h

r0n_dL,

The BY8301-16P should be serial command compatible with BY8001-16P. So, you can use his code as-is, or just change the #include to <BY8001.h> and replace his MP3 serial commands with the BY8001 library functions. The file storage device shouldn't matter (the BY8001 has a micro-SD card, while the BY8301 has only a small flash memory). Either way, should be easy to do.

However, for the flashing LED, Critters doesn't provide a schematic showing how he connects the speaker wire to the Arduino. Also, looking at his code, he is not synchronizing the LED flash with the sound, he's just flashing it if sound is detected by a input pin on Arduino.

For a newby project, you should break the project into several easy-to-accomplish tasks so you will not be trying to debug everything together in one sketch. Otherwise your project would be very confusing. Later, you incorporate all those little pieces together into one sketch.

borland:
r0n_dL,

The BY8301-16P should be serial command compatible with BY8001-16P. So, you can use his code as-is, or just change the #include to <BY8001.h> and replace his MP3 serial commands with the BY8001 library functions. The file storage device shouldn't matter (the BY8001 has a micro-SD card, while the BY8301 has only a small flash memory). Either way, should be easy to do.

However, for the flashing LED, Critters doesn't provide a schematic showing how he connects the speaker wire to the Arduino. Also, looking at his code, he is not synchronizing the LED flash with the sound, he's just flashing it if sound is detected by a input pin on Arduino.

For a newby project, you should break the project into several easy-to-accomplish tasks so you will not be trying to debug everything together in one sketch. Otherwise your project would be very confusing. Later, you incorporate all those little pieces together into one sketch.

Thanks! From my understanding he has the speaker hooked direct to the speaker leads on the MP3 board. I believe he's just sending serial commands to trigger.

On his MP3FLASH16P library he included this diagram:

Based off his code and video I assume he may be wired mapped below. I know I probably missed something...maybe pin 3 (Arduino) to Busy (soundboard)

from his sketch:
myPlayer.init(2); // Init the player with the busy pin connected to Arduino pin 3

I am using a BY8001 via a level shifter and a Nano and am having trouble interrogating the module. I am using the ex1playbacksequentially sketch.

When commanded, the module will return its firmware version, play the next track, return the track length, return the trackname and set the volume but returns 0 for the number of tracks and the volume setting.

I have tried bypassing the level shifter with a resistor in the module Rx lead but nothing changes. I have increased the time allowed for the card to boot from 800 to 5000 mS. The card is a 2GB card.

ex2playbackfromfolders.ino behaves the same.

Any clues?

raysputin:
Any clues?

No. I seem to recall a bug with Firmware version 0001, where the 8001 always reported zero files in the current folder (different command than your finding trouble with), but nothing with volume level errors. Serial monitor should be set to 9600.
Could try pressing the nano's reset button to restart the program. Also try having mp3/wav files only in root directory.
To debug device, could try hooking the 8001 to your PC's USB using 3.3v FTDI Basic with terminal program (like AccessPort) and sending commands to 8001 per the datasheet.

Thank you for the advice - it is all welcome.

Apologies for omitting some info (I forgot). The datasheet recommends that to use an MCU to control the BY8001, the Key Control Modes be set to 111 by removing the 3K3 SMD resistors on the ABC solder pads. I removed the two resistors that were installed on the board.

By removing the resistors, have I made the board incompatible with the library?

raysputin:
Thank you for the advice - it is all welcome.

Apologies for omitting some info (I forgot). The datasheet recommends that to use an MCU to control the BY8001, the Key Control Modes be set to 111 by removing the 3K3 SMD resistors on the ABC solder pads. I removed the two resistors that were installed on the board.

By removing the resistors, have I made the board incompatible with the library?

Not exactly. By not removing the two factory installed 3.3K resistors (A and C), some serial command functions may be disabled or provide incorrect results. I did all library development and testing without resistors installed in A, B, or C.
I didn't test extensively to see what serial command functions were disabled with factory ABC configuration or other variations. Those keypad control modes are just intended for stand alone (No MCU) startup/button functionality.

Thank you Borland. You have confirmed my interpretation of the situation. Nice to know the old brain (70YO) is still near the mark. I can work around the board responses. When I have finished my backlog of projects (there is always one more) I will try to find the time to explore the board and see what it can do.