MP3 Player/goal horn?

I'm looking into replacing the existing goal horn on my table hockey game with an Arduino based one and am looking for help as to how, or if I can.

What I have now:
Currently, I had hooked up an over-elaborate system containing an IR trip wire where I replaced the buzzer with a relay and a recordable sound card like you might have in a greeting card.

worked great However the sound got to be to long and I can no longer upload another recording.

What I'd like to have:
A system where an IR (break beam) sensor acts as a switch that signals an Arduino to play a Wav. or Mp3 file Via an micro SD card, thru speakers, while an led flashes (goal light).
Allowing me to change the goal horn sound at will by changing the song while keeping the same file name.
Will need two sets of IR switches each one playing one of two sound files (one home and one away, and only one would play at a time)

I have some SD card readers from another R2D2 project, and the IR sensors from the Scoring system I used in the table, and some nanos (optimal) and an Arduino uno I could use, But am unsure I could have it play the sound files with out an MP3 module/decoder or what I would need to get started.

In a perfect world, I would have all 31 NHL goal horns be selectable via. the same system, for each side, but not sure that level of complexity is something I should start with or if its just over kill. (but is something I'm thinking about. Adding a Pot and Seven segment display modules, down the line)

Is this possible? What would I need to have it work and maintain a good sound quality?

Thank You!

This is definitely possible. I assume you’re going to reuse the IR breakbeam equipment? As for the MP3 player, you can use a DFPlayer Mini via the DFPlayerMini_Fast.h library. You can install the library via the Arduino IDE’s Libraries Manager.

Catalex YX-5300 sound player module. 255 sounds per folder, 255 folders. control it by a serial port. ties up 4 pins.

I built a doorbell that plays about 200 sounds from a folder of innocuous sounds for the public. 320+ sounds from 2 folders for my rowdy obnoxious friends. 19 second long bells and gongs if you enter my 400 foot long driveway. if you cut the bell off by passing the end of driveway folder you need to slow down.

it can play 9 minute long sounds

Power_Broker:
This is definitely possible. I assume you're going to reuse the IR breakbeam equipment? As for the MP3 player, you can use a DFPlayer Mini via the DFPlayerMini_Fast.h library. You can install the library via the Arduino IDE's Libraries Manager.

Yes, I was planing on using two break beam sensors that I have left over from the scoreboard. they act as simple switches.

The module you mentioned above is one I was looking at, However I was unsure about it as it seems made for a music player, where I'm essentially only asking it to play one short sound at a time. And not sure if something like that was necessary because of the Mp3 decoder. Or if it was important to have a module like this to run the speakers.

Thank you, seems a bit of over kill for what essentially will be a sound board, playing a 5-10 second sound.

I guess my main question, is about how or what I would need to run the speakers, and access and play the file. and was looking into SD card readers because I want something that anyone could update the file and change the sound without having to upload to the device.

It's not overkill to use an MP3 player to play even a short sound. You'll save time (and probably money) if you use a cheap MP3 board. I once designed the electronics for a 3D printed RC "Panzer IV F2" tank that had sound effects played via a DFPlayer Mini. Some of the sounds were only a second or two long, but the DFPlayer Mini handled it great.

Note: use uncompressed WAV files instead of MP3 files (both are supported by the DFPlayer Mini)

DF Player Mini is the way to go.

Even if your sound is just a 1-minute, 1 MB file that's looped over and over again... We used a 4GB SD card as smaller is not available any more... it's anyway really cheap, and way easier than trying to do the same on the Arduino (which for starters would require external SD card storage anyway), and really easy to swap out sounds.

The DF Player Mini has stereo line level outputs, and mono speaker output (4Ω, 3W).

Power_Broker:
It's not overkill to use an MP3 player to play even a short sound. You'll save time (and probably money) if you use a cheap MP3 board. I once designed the electronics for a 3D printed RC "Panzer IV F2" tank that had sound effects played via a DFPlayer Mini. Some of the sounds were only a second or two long, but the DFPlayer Mini handled it great.

Note: use uncompressed WAV files instead of MP3 files (both are supported by the DFPlayer Mini)

Thank You,
I'll give it a shot.

@Power_Broker:

A problem I have run into, and seen reported elsewhere, is that the DF player doesn’t always start playing an MP3 file from the very beginning, but randomly up to half a second in.

Did you notice that with wav files?

wvmarle:
A problem I have run into, and seen reported elsewhere, is that the DF player doesn't always start playing an MP3 file from the very beginning, but randomly up to half a second in.

Did you notice that with wav files?

I've never heard of that happening nor have I encountered it. Is that with my library or do you mean it's a problem with the DFPlayer in general?

That appears to be a DF Player problem.

The first time a file is played, it works exactly as expected. Subsequent plays of the same file (we had only one track on the card) it starts usually a little into the track, not at the beginning. Sometimes it starts right at the beginning. I've had the exact same symptoms with all 12 or so tracks we used.