One day I thought it'd be fun to take something ordinary that isn't electronic, and make it so, just for fun.
Enter the Electronic Cowbell.
It's a simple electronic motion-activated cowbell that when you turn it on and gently shake it, it responds to your movement and jingles like a real cowbell. It's a wholly unnecessary object to have, but it's all for fun.
The Electronic Cowbell uses an Adafruit RP2040 Prop-Maker Feather with built-in LIS3DH accelerometer to detect movement, and a built-in I2S amp that plays a WAV file through an attached speaker.
This project is also coded using CircuitPython.
Required Parts
The following parts are needed for the project.
In addition to the parts below, you will need to 3D print the cowbell enclosure. The cowbell enclosure is available for download on Thingiverse: Electronic Cowbell
Downloading the Project Files
After you've collected all the necessary parts, the project files can be downloaded on github: Electronic Cowbell Project Files
To download the cowbell files, do the following:
- On the main github page for the project, click the Code button.
- Click Download ZIP. This downloads all the project files needed.
- Make note of where you saved the file.
Installing the Project Files
Before installing the cowbell files, your Feather must have the latest version of CircuitPython 10 installed. For information about how to install CircuitPython on your Feather, visit this page: Installing CircuitPython
If your Feather already has CircuitPython installed and is already configured to be a CIRCUITPY device, you can continue installing the project files.
To install the cowbell files on your CIRCUITPY device, do the following:
- Extract the ZIP file you downloaded previously.
- In the extracted ZIP, open the Cowbell_app folder.
- Copy the contents of the Cowbell_app folder to the root of your
CIRCUITPYdevice.
Configuring the Feather
The files don't require any configuration, however, if you are adventurous you can play with the motion settings in code.py.
Changing the configuration of the motion settings is not necessary and should be done at your own risk. Make a backup of the code.py file before you change the values in case you need to revert the changes.
Printing the Cowbell Enclosure
The .STL file for the cowbell enclosure can be found here on Thingiverse: Electronic Cowbell
The following print settings are recommended when printing the cowbell:
- Infill 100%
- Tree supports (tree supports break away from the inside a little easier)
The cowbell model also has standoffs inside for attaching the Feather.
Assembling the Cowbell
Assembling the cowbell is done in two parts. First, attach the peripherals to the Feather. Then, attach the Feather and the peripherals to the inside of the cowbell.
The following diagram shows how the speaker and the power switch should be wired to the Feather.
Soldering the On/Off Switch
You attach the power switch by soldering two wires from the switch to the Feather. To attach the power switch:
- Cut off one of the side pins on the power switch (not the middle pin). You should be left with one side pin and the middle pin.
- Solder one wire to each pin.
- Solder the other ends of the wire to the Feather.
- Solder one wire to the Ground (G) pin.
- Solder the other wire to the Enable pin (EN).
- Double-check that the wires are properly soldered.
Attaching the Speaker
The speaker is attached to the Feather board by using the screw terminals.
- Cut the male connector off of the end of the speaker wires.
- Gently strip the ends of the two speaker wires.
- Unscrew the + and - screw terminals on the Feather.
- Place the red wire in the + terminal and the black wire in the - terminal.
- Screw each terminal shut.
Attaching the Battery
Attach the battery by plugging it in to the battery terminal on the Feather.
Testing the Cowbell
Now is a good time to test the assembly. After the battery is plugged in, turn the switch to on. Then, make some movement with the device. If you hear a sound, it's working correctly!
Attaching Everything to the Cowbell Enclosure
To attach everything to the inside of the cowbell:
- Cut 4 small squares of double-sided foam tape.
- Place a square in each corner on the back of the Feather.
- Peel the protective paper off and stick the Feather to the standoffs inside the cowbell, making sure that the USB-C port is facing the cowbell opening.
- Cut small pieces of foam tape for the battery and for the on/off switch.
- Place a piece of foam tape on the battery and the on/off switch.
- Peel the protective paper off and stick the battery and the on/off switch to the inside of the cowbell.
The following photo shows an example of how the parts can be taped to the enclosure.
Using the Cowbell
Turning It On
To turn on the cowbell, change the switch from off to on.
Ringing The Cowbell
To ring the cowbell, while it's on, give it a gentle shake.
Charging the Cowbell
The Feather's USB-C port can be used to charge the cowbell when its battery is low. Simply plug in a USB-C cable to charge it back up.
This page (Electronic Cowbell) was last updated on August 17, 2026.
Text editor powered by tinymce.