Ever have a gadget build that seems to fight you? This cache took far too long to build for a host of reasons. I was finally able to reveal it at my event a few weeks ago and it was well received.
In the discussion of the musical note cache, I talked about a challenge to use sound in a gadget cache. At the time I found a Halloween soundboard project online that I thought I could easily spin into a song identification cache. (I would share the link here but it is no longer on the web.) I already had an Arduino Nano, all I needed was to order a 4x4 keypad and a DFPlayer MP3 module, make some MP3 files, and crank out a finished gadget.
Yeah, not so much.
That Amazon order put me down the rabbit hole of fake DFPlayer modules. You can explore the many discussion threads online for this, but the short version is many of the modules sold as DFPlayers are not, even when the images on the Amazon sales page show the correct items.
The actual devices I received were labeled MP3-TF-16P. More important, these devices did not use the YX5200 chip of the real DFPlayer. These came with a MH2024K-16SS. No matter which library I used to connect to an Arduino, they only played next/previous. All other commands I tried failed, and returned a bad value response from the MP3 module. That meant no direct file access, no volume control, etc. When I swapped in a real DFPlayer device my code and circuit worked perfectly. Only purchase the modules from a trusted seller. Mine came from Mouser Electronics. Consider yourself warned. The cheaper price on Amazon caused a multiple week delay in the project while I worked out what was wrong. Make sure they look like this image from the DFRobot site.
With hardware issues out of the way, I could finally get on with the build. Four AA batteries would not properly power the device, so I used a single 9V. The low voltage of 4xAA and the low current of a 9V both had me worried, but a fresh 9V battery works well. A Schottky diode provides protection against reversed batteries. These diodes offer some advantages for battery powered builds that I plan to discuss more in a future article.
You will see two speakers used. This came from the selection of parts I had in my junk box. The DFPlayer has a 3W mono amp in the module. My small speakers scavenged from 1970s intercoms were 16 ohms and rated less than 3W. By placing two in parallel, I had an 8 ohm load and the ability to handle the power of the amp. This worked well as I didn’t need to buy speakers but it took up space and that left me without enough space to put all the parts on the panel.
3D printing to the rescue!
This was my first TinkerCad design. I used online tutorials until I was able to create a flat surface for the keypad with a slot for the cable and legs to raise it off the ammo can insert. This had the added benefit of protecting the speakers. I printed the part upside down to give a smooth surface and to avoid needing supports. I secured the riser to the main panel with epoxy. Any interest in more 3D printing info? Please leave a comment if that sounds interesting.
I still needed to wire the module in a way that would survive handling. The plug in breadboard works well for testing but isn’t a finished device. I used a small perf board and mounted both modules along with connector pins for the keypad. To connect the two I used wire wrapping. This technique is faster than cutting and soldering all the jumper wires needed and can be removed and reworked while building. When completed, I soldered the connections to make them permanent, but this is not required. It does take a special tool and wire but they are not expensive. You can see the white and red wire in this photo.
The locked container is the same electrical box and outlet cover I’ve used in other caches. This also provides a place to mount the circuit and keep it close enough to plug directly into the keypad. The pink foam servers as a gasket where the keypad cable enters the inside of the box.
The final construction has the 9V battery holder, keypad, and locked log area revealed when the ammo can is opened. I used JBWeld to attache aluminum angle to the inside of the ammo can as mounting brackets for the plate. If I were to place this in the wild as a real cache, I would switch to tamper-proof screws.
The 4x4 keypad has 16 buttons. These cover the digits 0 through 9, letters A through D, plus * and #. The buttons have different functions.
0-9 play songs
A plays the instructions
B gives info about geocaching
C plays info about the cache construction
D gives a hint
* plays a silent MP3 file to stop all sound. I used a 15 second silent MP3 file.
The # button is not called out in the instructions, but it does play something. I like to hide little things in my puzzles.
When a cacher inserts their 9V battery, the cache powers on with the “Shall we play a game” quote from the movie War Games. After that, the instructions are read by a computer generated voice.
Instructions: The keys 0 through 9 will each play a song. Place the songs in order of the year they were released in the United States and write down their key numbers in that order. For example, if the oldest song was played by key number 8, then the number 8 would be the first on your list. When you have the list of numbers, take the second, fifth, seventh, and last numbers and use them to unlock the box. Press the asterisk key to silence the player. Press A to hear these instructions again. Press B to learn about geocaching. Press C to find out how I built this puzzle. Press D for a hint.
The cacher can choose any of the 10 songs, with each song either playing to the end of the track or when a different key is pressed. I used an assortment of songs that had high Billboard Chart ratings in the United States from the 1957 through 2012. This could be made far more difficult with a mixture of obscure songs.
I will cover the code and the wiring in a second article, along with a video of the cache in operation.
The site I used for the initial info on the MP3 sound board is back on line! https://oneguyoneblog.com/2019/10/29/arduino-halloween-mp3-soundboard/