What's in that gift?! Here's a fun and easy way to creatively mislead your next gift recipient with motion-activated sound effects! Use the Adafruit Audio FX board and a vibration switch to make this simple (and reusable) circuit.

Before you begin please read:

The Adafruit Audio FX Sound Board guide walks through connecting the board to your computer and and install WAV or OGG files triggered by different pins. There’s no code required in this project!

For this build you will need:

A vibration switch is connected between the audio board's pin 7 and ground and orientation does not matter.

A 10uF capactitor also connects pin 7 to ground, but be sure to put it in the right way: the shorter leg goes to ground (and is also marked with - signs) and the longer leg goes to pin 7.

Since we’re using pin 7 in this diagram, the corresponding audio file on the board should be named T07.WAV or T07.OGG. You can really use any pin though…just make sure the filename matches. It’s all explained in the Audio FX Board intro guide.

Connect a speaker to one or both of the outputs on the audio board.

Optionally connect a button or switch between Rst and Gnd on the audio board (helps with troubleshooting the vibration switch).

Solder the included screw terminals to the audio FX board.


Turn the board over and solder on your JST battery connector (not included with audio board).

We won't use all the pins near the USB end of the board, and we want the battery connector to hang over the edge of the breadboard, so trim your headers as shown to allow the board to overhang.

While plugged into your solderless breadboard, solder the header pins in place from the top.

Now's also the time to load up your sounds over USB. Read more about how in the Audio FX Board guide. We loaded a bunch to play randomly when pin 7 is triggered.

To prepare your vibration switch, set it up in a pair of helping hands and tin the leads with a little solder.


Also strip and tin two stranded wires.


Apply a small piece of heat shrink tubing and reflow the solder between that wire and the center pole of the vibration switch.

Slide the heat shrink tubing over the joint and solder the other wire to the outer pole of the vibration switch.

Use a larger piece of heat shrink tubing to cover the while union. That outer wire is pretty fragile, so this heat shrink tubing adds some stability by also bridging the can of the switch, so make sure your piece is long enough to cover everything!

Depending on the action you want to trigger your circuit, you might try the fast and slow vibration switches to see what you like best. It is helpful to label them.

We found that the fast switch was triggered by touching the box at all, and even when the subway rumbles past. The slow switch had to be shook very hard and/or flicked to be triggered. You can adjust how much the switch rattles in the box to further adjust sensitivity during the next steps.

Assemble the circuit on your solderless breadboard as shown in the circuit diagram. Shake your switch to test that it triggers your random sounds!

We found that sometimes on power-up the activation light would stick on, requiring a reset to the board. So you may optionally add a switch or button between Rst and Gnd to reset the board manually, or just take a jumper wire and plug/unplug after powering on.

Peel and stick the solderless breadboard to the inside of the box, and tape the battery pack and sensor down.

Optionally, transfer your circuit to a Perma-Proto board for a more permanent arrangement.

Try out both sensors before deciding which one is right for you, and make this sound prank your new family tradition!

Place in a prominent spot and mark "do not open" for maximum curiousity! Flip on the circuit, the batteries will last about 2 days with 1000mAh AAA batteries!

This guide was first published on Feb 04, 2015. It was last updated on Mar 08, 2024.