Arduino Uno & ElecHouse MP3 Shield

for Haunted House Props and Scares

Arduino UnoElecHouse MP3 shield

While playing around on the internet I found a site showing how to control a RGB LED with an Arduino. Run a full range of colors. I thought it was pretty cool and probably useful in the haunted house. I've played with the Prop-1's and the Raspberry Pi. Both you have to order online and hope they can get here in a reasonable amount of time. The Arduinos are readily available. You can find them at Radio Shack or several other local electronics stores. If you have a controller fail during the haunted house season you'd be rather screwed if they weren't available.

After playing around with the Arduino and purchasing a MP3 shield I thought I try to replicate something I had setup with a EFX-TEX Prop-1 and their AP-16+ Audio Player. In 2013 at Milburn's Haunted Manor I was tasked with provided the sound and lighting controls for a smoke belching dragon which attacked guests as they came around a dark corner.

The sequence of events were fairly simple. There was a dim 120vac background lamp on as they came around the corner. When the trigger button was pressed the following events would take place:

  • The 120vac background light would go out
  • The sound effect would start - dragon growl, stomping and roaring
  • A mini LED spot would come on to illuminate the dragon
  • A 120vac fog machine would come on to fill the head with smoke
  • As the dragon moved closer to the guests the operator would open it's mouth
  • A red LED would come on in the dragon's mouth
  • The sound file would end, the LED spot and the LED in the mouth would go out
  • A white LED spot would come on showing the guests how to get out
  • The white LED would go out
  • The 120vac background light would come back on, ready for the next group

  • I've played with the Prop-1 quite a bit over the last several seasons. I have a pretty good understanding on it. The nice thing about a programmable micro-controller is the ease of changing the set up on the fly. If you don't get the time delays correct it easy to adjust them and try again.

    The program I wrote for the Prop-1 last year was not to complex, a series of turning on and off the LED's and relays and starting the sound file via the serial connection.

    Here is a copy of it:

    It appears you don't have a PDF plugin for this browser. Click on link below to download it.

    Click here to open a PDF of the Prop-1 Program

    I ran into the issues with the Arduino. Quite a learning curve as it were. The information on how to get the Arduino and the ElecHouse MP3 is very limited. When you read about how to do it they tend to not really spell out what you need to code to get the Arduino and the MP3 Shield to talk. It's almost like people expect you know know what you're doing even if you are new to programming the Arduino. It's rather like Linux at times, those who know it can't believe you don't understand it. I almost gave up and purchased a different MP3 Shield in hopes it'd be easier. Early on I was able to set up the push button to activate a series of LED flashes and reset back to waiting on the next trigger of the button. Getting it to play a specific sound file was another story. Finally one day something clicked and I tried inserting some code and it worked.

    My code is simple. I'm sure there is some faults in it. Most likely a better way to do it also. I'm more than happy to take creative feedback but please don't be an ass. I was able to wrap my brain around this method and I hope my experiences help others.

    It appears you don't have a PDF plugin for this browser. Click on link below to download it.

    Click here to open a PDF of the Arduino sketch


    The hardest thing to figure out was how to make the Arduino communicate with the ElecHouse MP3 shield. None of the documents tell of a clear way to send a command from the Arduino to the MP3 shield. It turned out after looking at the documents for a while something finally clicked and I was able to get the sound to play when I pushed the button.

    Here is a link to the documents for the ElecHouse MP3 shield.

    Here is part of the sketch ElecHouse offers for their MP3 Shield. If you program this into your Arduino it might play the first song you have on the SD card, maybe. I couldn't get it to work, or understand what they were trying to say. I spent weeks looking for how to push a button and play a sound file.

  • #include SoftwareSerial.h
  • #include MP3.h
  • MP3 mp3;
  • void setup()
  • {
  • mp3.begin(MP3_SOFTWARE_SERIAL);
  • mp3.volume(0x1F);
  • mp3.set_mode(MP3::CYCLE);
  • mp3.play_sd(0x0001);
  • }
  • void loop()
  • {
  • /** function code here */
  • }
  • This is not a complete copy of the code so please don't cut and paste it.

    One of the biggest sticking points I had was what to put in the VOID LOOP section. It's the meat and potatos section where everything happens.

    With my earlier successes getting the pushbutton to activate the timed LED sequence I knew I had to put the code to call the audio file in the VOID LOOP area. It was not clear on how to call an audio file to get it to play on demand. After looking at the code for a while I decided to play with the command. This is the serial command necessary for the Arduino to tell the MP3 player to play the audio file. If you are also having problems I recommend printing out the sketch or opening it in a seperate window or monitor and look what I did. I'll try to explain the method I used to get this to work.

    I altered their VOID SETUP code a bit. I changed the mp3.set_mode from CYCLE to SINGLE, I only wanted the file to play once. I moved the down to the VOID LOOP to allow the Arduino to play the audio file after the Arduino detected the button pushed.

    Since it was small, I loaded the audio file onto the spi_flash and played it from there. This is what the code mp3.play_spi_flash(0x0001); does. It'll play the first song stored on the spi_flash.

    The documents tell you how to name the MP3 files, using a 0000- the next song starts with 0001-. You also need to create a file called iSound.mp3. Mine is simple:

  • sp00//
  • cl00//
  • cf12 34 56 78//
  • You can download it here: iSound.mp3. (I would recommend right clicking on it and using the SAVE TARGET AS feature.)

    There are plenty of directions on how to load this onto the spi_flash. But if you have questions, email me at the contact link above.

    I do not debounce the button. I have not found the need to yet. But if I ever use an Arduino with a PIR I will have to figure it out.

    The next thing I'm going to play with is the ultrasonic distance finder. Place it at the end of a hall to set off a series of cascading effects as people walk down the hall. Lights, sound and motion. It would be a small effect, kind of a background thing. However, it's the details like this that take it form a great haunt to a really awesome experience.

    Good luck, I hope this helps. If not, email me and maybe I can help out. I am in no way an expert at the Arduino. But I am willing to help and I don't expect you know what you're doing just because you had the adacity to spend a whopping $30 on a micro-controller. Oh, and I'll help on the Prop-1 too if you need it. However, John and Jon at EFX-TEK offer great support.