Audio Arduino shield for project

I'm working on a senior group project involving a whack - a - mole game device. We are currently doing the audio part of the device and we need to get music played and a sound to make when the user hits the target. Originally, we planned to use two separate audio Arduino shields with two separate Arduinos. One that does the music and the other that makes the sound for the target.

Our mentor thought if we could put both audio Arduino shields into the same Arduino so that it would work the same way and save money, but we don't know if it does work because we never heard of anybody actually doing that. I just need to know if it can work or not.

It will probably be helpful if you post a link to where you bought the audio shield from.

We didn't buy them yet. We just need to know if it's generally possible to do it.

You can certainly do what you want. There are inexpensive sound generator chips that can be run from the Arduino that produce sounds as well as music if you want them to. I did some experimentation with one type that was used in early 8 bit computers (1980's) and build it onto a shield. You can read about it here if you are interested.

Right. That should work. Most audio shields are 99% "stand alone". The Arduino just sends a few "commands" to start & stop the sound, maybe to adjust the volume, and to choose which file is played, etc.

I don’t think you should use 2 Shields- I think you should use 2 Df Mini MP3 players. The problem with the Arduino MP3 shields is that so much of the pins are taken up by the player- I don’t think 2 Shields would work together. Here’s the hookup schematic and link for the Sparkfun VS1053 Arduino Shield:

https://learn.sparkfun.com/tutorials/mp3-player-shield-hookup-guide-v15/all

Here’s the link to the DF Mini MP3 players. Please don’t use their recommended libary. I have had great success with PowerBroker2’s Df Mini Fast Library. That way you would only tie up 2 of the digital pins on the Arduino. MIGHT be able to power both off the Arduino as well, but may need external power source.

https://wiki.dfrobot.com/DFPlayer_Mini_SKU_DFR0299

Can also find these on Amazon and Ebay. Hope this helps.

I appreciate the answers. Out of curiosity, can certain audio shields be able to do both the music and target noise?

Like we want the audio to play in a certain order/sequence. This is the ideal order:

  1. Player presses start button, music plays before game starts.
  2. Game starts, targets make noise when getting whacked while no music is played.
  3. Game ends, music plays before playing again.

Then this repeats itself for every time the start button is pressed. Apologies if this seems confusing.

Yes, but for that you could use just one Shield or DF Mini player. There are several examples of that in the Completed Project page or on Instructables. Look for any project where the MP3 players plays ambient noise, then changes at a button press/input change, then back to ambient noise. If you had needed the ambient music AND the Whack A Mole noise at the same time- that may have required 2 players/shields. The way you have described it only needs one as the MP3 player can store many MP3 files to be played on demand.

Here’s the DF Mini Fast Example code. I have adapted this with a button push for one of my halloween props. I’m at work without access to my IDE, but here’s the example code from https://github.com/PowerBroker2/DFPlayerMini_Fast

#include <SoftwareSerial.h>
#include <DFPlayerMini_Fast.h>

SoftwareSerial mySerial(10, 11); // RX, TX
DFPlayerMini_Fast myMP3;

void setup()
{
  Serial.begin(115200);
  mySerial.begin(9600);

  myMP3.begin(mySerial);
  
  Serial.println("Setting volume to max");
  myMP3.volume(30);
  delay(20);
  
  Serial.println("Playing track 1 for 5 sec");
  myMP3.play(1);
  delay(5000);

  Serial.println("Sleeping for 5 sec");
  myMP3.sleep();
  delay(5000);

  Serial.println("Waking up");
  myMP3.wakeUp();

  Serial.println("Looping track 1");
  myMP3.loop(1);
}

void loop()
{
  //do nothing
}

Add in an input for a push button, add a few MP3 files (0002, 0003, etc.) and you should be on your way from here.

It depends on the where you want to use them. If the surrounding is noisy and If you want to use them oudside you need more db than the shield can provide. But in your case... I would choice to keep and use only one tone, Like an alarm sound. ON/OFF.