Introduction: Musical Microwave (Arduino Project)
Want to turn your boring microwave into a supercharged*, nuclear** jukebox that plays tunes while irradiating*** the food item of your choice?!?
** false advertising
*** more false advertising
Since it is Christmas Eve, I loaded the MP3 Shield with some of my favorite Christmas songs, but obviously you can use whatever songs you like (provided they meet certain bit rate, sample rate, and filename requirements)
Q. But it's already Christmas Eve?? How am I supposed to finish this in time to spread holiday cheer and goodwill towards all men?!
A. Have no fear, for haven't you ever heard of THE TWELVE DAYS OF CHRISTMAS!!!
(queue the tone-deaf uncle who always shouts "5 GOLDEN RINGGGGSSSSSS..." at max volume)
Let's get started...
Step 1: Materials/Tools
Below are the materials and tools that you will need for this project.
I've linked the materials that I used for your convenience, but feel free to shake things up!
- 1 Arduino UNO
- 1 AC Adapter with
- Center Positive 2.1mm x 5.5mm male barrel jack plug
- and 12V, 1-2A DC Output
- approx. 0.125" x 0.125" x 1.0"
- 8.3 filenames (8 characters + '.mp3')
- bit rates of no more than 320 kbps
- samples rates of no more than 48 kHz
- Soldering Iron + Solder
- Needle-Nose Pliers
- USB 2.0 Cable Type A/B
- Multimeter (optional)
Step 2: Assembly
Assembly should be straightforward.
Connect SparkFun MP3 Player Shield to Arduino UNO
1. Solder header pins onto SparkFun MP3 Player Shield (make sure they match the pictures above)
2. Line up the MP3 Player Shield's header pins with the Arduino UNO's header pins.
3. Firmly(but gently) push the MP3 Player Shield and Arduino together.
Connect 3-Pin SPDT Micro Switch to SparkFun MP3 Player Shield
Using the male-to-female jumper wires...
1. Connect the Micro Switch's Common (C) Pin to one of the GND Pins on the MP3 Player Shield.
2. Connect the Micro Switch's Normally-Closed (NC) to Pin 10 on the MP3 Player Shield.
Note: You can either solder the female ends of the jumper wires to the Micro Switch's pins or crimp those ends with a pair of needle-nose pliers. In either case, you will want to first remove the plastic connectors from the female ends of the jumper wires...
Now when the Micro Switch's lever arm is depressed...
the Micro Switch's C and NC pins will be diconnected creating an open-circuit and the Arduino UNO will measure a value of HIGH (or ~5V) on Pin 10.
When the Micro Switch's lever arm is raised...
the Micro Switch's C and NC pins will be connected creating a closed-circuit and the Arduino UNO will measure a value of LOW (or ~0V) on Pin 10.
Note: In order to ensure reliable behavior from our Micro Switch, we also need to handle switch bouncing and add a pull-up resistor. In this case, we will handle both issues in our code by implementing a simple debouncing algorithm and taking advantage of the Arduino UNO's built-in circuitry.
Connect SparkFun MP3 Player Shield to Speaker
1. Connect MP3 Player Shield and speaker using 3.5mm male-to-male stereo audio AUX cable.
Connect AC Adapter to Arduino UNO
1. Plug AC Adapter's male barrel jack plug into Arduino UNO's female barrel jack plug.
Step 3: Mount on Microwave
Place the device on/near the microwave of your choice.
Note: Make sure the Arduino UNO is resting on an electrical insulator (e.g. a piece of dry cardboard) and not a electrical conductor (e.g. the metal microwave). Since the Arduino UNO has exposed pins on its underside, placing it on a conductive surface can result in unintended effects/short circuits.
Attach the striker blocks to the microwave door.
1. Use Command Strips to attach the striker blocks to the microwave door (as shown in the pictures above).
2. The blocks should be parallel to and flush with the seam between the microwave door and the microwave
3. Use a Command Strip to attach the Micro Switch to the microwave (as shown in pictures above).
The Micro Switch should be placed so that its lever arm is depressed when the microwave door is closed and raised when the microwave door is open.
Now when the microwave door is closed...
the Arduino UNO will measure a value of HIGH (or ~5V) on Pin 10.
and when the microwave door is open...
the Arduino UNO will measure a value of LOW (or ~0V) on Pin 10.
Note: If you'd rather a more discreet setup, you can...
1. Place the Micro Switch and striker blocks on the bottom side of the microwave (door). This will make the trigger much harder to notice.
2. Use longer wires to connect the Micro Switch to the MP3 Player Shield. This will let you hide the device farther away from the microwave.
Step 4: Program the Arduino
The code and step-by-step instructions for programming the Arduino and setting up the Micro SD are located in this GitHub repository:
After you complete all the steps, go to the next step in this Instructable!
Step 5: Power On
At this point, you should have already...
- Assembled the device.
- Mounted it on the microwave.
- Programmed the Arduino
- Configured the Micro SD
- Insert the Micro SD into the slot on the MP3 Player Shield.
- Turn on the speaker.
- Connect the speaker to its charger (optional).
- Plug the AC Adapter into a wall socket.
The Arduino should power on and play the first song. Open and close the microwave door once and your device is ready to go!
The device assumes a simple use pattern:
open microwave door > put food in > close microwave door > play song > open microwave door > stop song > take food out > close microwave door > repeat
How do you think we can make this better? Let me know.
Step 6: Support & Additional Resources
For code related problems, please open an issue in the GitHub repository.
For everything else, please comment below.
I'll do my best to help.
- Official Website
SparkFun MP3 Player Shield
- MP3 Player Shield Hookup Guide V15- Great comprehensive tutorial by SparkFun