New library for the BY8001-16P/BY8301-16P audio module, feedback welcomed!


In the past month, I have rewritten a new library to control the BY8001-16P/BY8301-16P audio module. The library can be found and downloaded here:

The BY8001-16P module can be viewed/bought here: (although there are a lot of different suppliers).

Likewise, the BY8301-16P module can be viewed/bought here: (although, again, there are a lot of different suppliers).

The reasoning behind rewriting this library had much to do with the fact that existing libraries did not correctly handle many of the edge cases nor the response functionality of the chip. That it talks over an RS232 Serial line makes it particularly difficult to deal with, especially in terms of keeping the response buffer cleaned and state variables updated.

This library has a lot of additional functionality that existing libraries do not expose, as well as handles the various hardware revisions and their differences in a more intelligent fashion. When doing long waits, it allows usage of talking through the Scheduler to yield time to other loops, as well as handles some of the odd weirdness of the audio module itself.

While the library was written primarily for the BY8001-16P, the BY8301-16P uses the exact same instruction set (just uses a micro USB connection to a data source instead of a MicroSD card). They both have a 3W internal amplifier, which can be hooked up to a nice 3W 4Ohm or 2W 8Ohm mono speaker, or hooked up to non-amplified L/R audio lines. I personally gutted a Veho360 and have its speaker hooked directly up to the mono output, which works quite well.

The BY8001-16P/BY8301-16P is actually a very handy and inexpensive little MP3/WAV player, and easily allows one to play audio files with their Arduino.

Feedback is of course welcomed, as is requests for additional functionality, etc.

Thanks for looking!

Hello NachtRaveVL!

I came across your library while searching for the pin assignment of the BY8001-16P and tried to use your “SimpleExample”-sketch. I’m new to all this, but it seems the code will only compile when “Serial1” gets replaced by “Serial” and the constructor of “audioController” gets “Serial” as argument as well. - Or do I have to use the code differently (with an arduino mega perhaps)?

Anyway - my most important question: Would you happen to have a pin assigment for the BY8001-16P by any chance? I tried the ones you I found on google, but the module I have only powers on if 5V are connected to pin 1 and ground is connected to pin number 11 (see pictures). (The ebay-seller wasn’t able to really help me with this).

With kind regards