I learned some electronics knowledge and soldering skills about 15 years ago that I dabbled with from time to time. The basic concept I wanted was LEDs flashing and some speakers playing thunder. However, I wanted to see lightning - not blinking lights. This led me to searching the Internet which led me to some really great Instructables. I wanted bright/flashing lights to edge light some etched acrylic, and the 20W LED-Strobe developed by einyaa seemed to meet those needs. I had never worked with an Arduino and coding before, but the Instructable provided enough information to stumble through it. I purchased the parts and built the circuit. I even managed to tweak the code to generate a random number of blinks on the LEDs. ***WARNING: This produces a very bright light that you should not look directly at without shaded eye protection (or point it away from you).*** See the before and during pictures above.

However, this only got me part of the way. I still needed thunder, and I had a microcontroller that I thought should be able to be the brains of syncing light and sound. I scoured the Internet for syncing light and sound. Didn't find much that was helpful until I just searched for lightning and thunder. Then I found the Instructable by davebodnar for lightning & thunder in a castle for a model train layout. He did a very detailed Instructable that I only had to tweak to meet my needs.

I also used the IRF540N MOSFET/LED combo from einyaa (it works but not for the right reasons) versus the IRL520 MOSFET (use this one or other suitable logic-level MOSFET) that will also work with the 20W LED array. The pinouts are the same for both. I bought a few IRLs that should be arriving soon to swap out. The "L" designation is for logic - the MOSFET gate opens fully at 5V (output of microcontroller) with minimal heat generated in the MOSFET. My lightning only flashed for 14 seconds, and I didn't have an issue with heat from the 10V gate on the IRF540N that only receives a 4-5V signal from the microcontroller. Any longer though, and I can't tell you what will happen. Better off sticking with a logic-level MOSFET.

I wanted very loud claps of thunder so I took apart a pair of 3W computer speakers that already have an amplifier built in (also called 'active speakers'). I found the necessary connection points for the DC voltage on the amplifier board since a batter only puts out DC voltage. You can figure out the amount of voltage needed by looking at the speaker wall wart. It should have a sticker showing the output (ex: 12VAC or 7.5VDC). To get DC voltage (VDC) from AC voltage (VAC), you need a bridge rectifier. If the wall wart isn't already DC, then the amplifier board has 4 diodes (small, black cylinders with a stripe on one end). I used a multimeter to find the output of the rectifier and soldered in new, sturdier wires. I had to order the DFPlayer Mini (has DFPlayer Mini written above the SD card slot and not MP3-TF-16P). The latter is a cheaper version that I couldn't get any of the 3 I bought to work (hardware or library issue). I couldn't find any 1GB - 8GB micro SD cards that were cheaper than a 16GB micro SD card, so I bought a 16GB card. Maybe I can use it in another project or expand the sound library on the hammer.

For the thunder, I used Audacity (freeware) to edit a thunder file and load it on the micro SD card. The file has to start out with 0001 (needs 4 digits), but you can add an underscore and extra after it (eg. 0001_thunder.mp3, 0002_roar.mp3, etc). Also make sure to copy the files to the SD card in the order you want them to play....something about file allocation. Audacity may not be the simplest program, but it is intuitive enough to figure out how to at least clip and convert a sound file.

I used a LM2596 Voltage regulator set for 5V output, but you can use any 12V to 5V converter than can handle at least 2 amps. I had connected the LiPo battery to the RAW pin on the Pro Mini, but it fried the circuit during testing and troubleshooting (oops). Now I run 5V to Vcc. The LEDs and speaker amplifier were both 12V.

With all the pieces gathered, I set up the circuit on a breadboard. Forgot to take a picture, but it finished looking roughly like the above Fritzing picture. The DFPlayer Mini has an internal 3W amplifier built in that can drive a speaker. I wanted something a little more powerful so I connected the computer speaker amplifier signal inputs to the DAC_L and DAC_R pins. I couldn't get any lightning when I sampled off the DFPlayer DAC pins to A0 and A1 on the Pro Mini. After talking it over with a buddy, we figured that the DAC outputs don't provide the same strength signal as the SPK output (internal amplifier). I moved the sample wires back to SPK_1 & SPK_2 and it worked. You could also try reducing the values (666 & 750) in the code to find the right setting, but I was in a hurry to finish.

Below is (or should be) the code I used. Tested and tweaked it once everything was on the breadboard.