PIPBOY Drum Kit
Greetings everyone, and welcome back!
A few weeks ago, I built my own version of the Pip-Boy, complete with a custom-designed 3D-printed enclosure and a UI that I developed entirely from scratch. It was a pretty fun build, and while the hardware and 3D design are pretty much finalized, the UI is a different story.
Since it's entirely software-based, I can keep adding new features and turning it into practically anything I want!
Recently, I came across a drum kit app on the Apple App Store and thought, wouldn't it be cool if I could build my own version and integrate it directly into the Pip-Boy UI?
Well, that's exactly what I did!
In this Instructables, I'll walk you through how I brought this idea to life and turned my Pip-Boy into a functional digital drum kit.
Let's get started!
Supplies
These were the materials required for this project.
- Waveshare ESP32 P4 4.3-inch Dev Board
- Power Source—3.7V 2000mAh Li-ion cell
- 3D Printed Parts
- Slide Switch
- M2 screws
- M3 Threaded Inserts
- M3 Bolts
- M6 Nut
- M6 Thumb bolt
- Automotive filler
- Sandpapers
- Spray paint
- Spray primer
- Hyper PLA x 2 Rolls for all parts
- Patience and Time
PIPBOY AR MARK 6000 RECAP
A while back, I built my own version of the Pip-Boy from the Fallout game series, complete with a custom 3D-printed enclosure and a UI that I designed entirely from scratch. It was a pretty fun project, combining my love for gaming, electronics, and 3D design into one functional device.
The Pip-Boy features several interactive menus, including a Status screen, a Perks menu, an NTP-powered clock, an SD card-based music player with animated waveforms, and even a map of my hometown redesigned in the style of Fallout: New Vegas. I also added classic Pip-Boy sound effects and multiple UI themes to make the experience feel as close to the original game as possible.
The entire build process was quite tedious. However, one of the best things about building the interface from scratch is that it's completely customizable. While the hardware and 3D design are pretty much finalized, the software opens up endless possibilities for adding new features and experimenting with different ideas.
Check out the full project article linked below.
HARDWARE - WAVESHARE ESP32 P4 4.3-inch DEV BOARD
We are reusing the hardware from the previous Pipboy; I used the Waveshare ESP32-P4-WIFI6-Touch-LCD-4.3 development board.
There were a couple of reasons why I went with this particular board. The first was the built-in 4.3-inch 480 × 800 capacitive touchscreen, which was almost perfect for the Pip-Boy interface. Having the display and touch hardware already integrated also made the overall design much simpler.
The second, and probably more important reason, was the ESP32-P4 itself. It’s one of Espressif’s high-performance ESP32 chips, featuring a dual-core RISC-V processor running at up to 400 MHz, along with AI and DSP instruction extensions, a floating-point unit, dedicated multimedia hardware, and a much more capable memory and peripheral system than the ESP32 boards I’ve traditionally worked with.
For this project, that extra processing power was particularly useful because I wanted the Pip-Boy to handle a fairly graphical user interface, animations, audio, touch interaction, and media playback. The board also includes an ESP32-C6 wireless co-processor, giving the setup Wi-Fi 6 and Bluetooth 5 capabilities.
https://docs.waveshare.com/ESP32-P4-WIFI6-Touch-LCD-4.3
Another thing that made working with this board easier was the documentation. Waveshare has a dedicated Wiki/documentation page for the board, with hardware information, examples, and development resources. I relied on this quite a bit during development, especially while figuring out the display, touch interface, and other peripherals.
Overall, the combination of a large touchscreen, powerful ESP32-P4 processor, and built-in peripherals made this board a really good fit for building my custom Pip-Boy.
WAVSHARE SERVICE
Special thanks to Waveshare for providing the hardware used in this project. The ESP32 P4 4.3-inch Dev Board and supporting accessories were supplied as review units for testing and evaluation.
Waveshare is a leading global provider of electronic components, modules, and development tools used across robotics, IoT, automation, education, and many other fields. With a strong focus on quality, reliability, and continuous innovation, Waveshare has earned the trust of engineers, designers, hobbyists, and makers worldwide.
Their extensive product lineup, from displays and HATs to expansion boards and embedded modules, makes them a go-to choice for both professional builds and DIY projects.
ELECTRONIC DRUMKIT
Before diving deep into the code and build of Drumkit, let's cover some basics.
A traditional drum kit consists of several instruments, each producing a unique sound that contributes to the overall rhythm. The snare drum provides sharp, crisp beats, while the bass drum delivers the deep kick that drives the rhythm. The high, mid, and floor toms add different pitches for fills and transitions.
Cymbals bring their own character to the mix. The hi-hat produces tight, rhythmic sounds in both open and closed modes, while the crash cymbals deliver sharp accents and the ride cymbal provides a steady rhythm. We also included auxiliary triggers for additional sounds, such as claps.
In our virtual DrumKit, each of these instruments has its own dedicated touch area, allowing you to play different sounds simply by tapping the corresponding element on the screen.
DESIGNING FROM THE IMAGE
When studying the reference image, two things immediately stood out.
Real drums don't have text labels.
Drummers recognize each instrument by its size, shape, and position rather than by labels like CRASH or SNARE printed across the drumheads. We wanted to recreate that same experience in our interface without cluttering the screen with text.
Physical drums can overlap, but touchscreen controls shouldn't.
On a real drum kit, cymbals often hang over toms, and the drums sit close together. However, on a capacitive touchscreen using LVGL, overlapping interactive widgets can cause touch events to be intercepted by another element, making accurate drumming difficult.
To solve these challenges, we removed all text labels from the drumheads and recreated each instrument using vector shapes. Each interactive element has its own defined touch area, allowing us to maintain the visual arrangement of a real drum kit while keeping the controls responsive.
CODE
Here's the code we used to build the drum kit interface pipboy_dkit_tab.c / drum_ui.c. While it looks long, the logic is quite straightforward.
CODE BREAKDOWN
Now let's get into the code! The main interface is implemented in pipboy_dkit_tab.c (also referred to as drum_ui.c in the standalone version). While the file contains quite a bit of code, the logic is relatively straightforward. We create reusable functions for each instrument, position them on the screen, and connect them to the audio engine.
Registering the Drum Pads
First, we need a way to associate each graphical element with the sound it should trigger. For this, we use a simple structure that stores the drum ID and a pointer to its LVGL object.
Each pad is assigned a unique drum ID, allowing the software to identify which instrument was tapped. The array stores references to the registered pads, with a maximum capacity of 14 entries.
We then use a helper function to register each pad and attach its touch event callback.
This keeps the implementation modular. Instead of writing separate touch-handling code for every instrument, we can reuse the same callback for all registered pads.
Creating the Cymbals
The make_cymbal() function creates the cymbals using circular LVGL objects. Each cymbal has a dark background, a bright outer rim, and concentric rings that resemble the grooves found on a real cymbal.
The parameters control the cymbal's position, diameter, assigned sound, and number of decorative rings.
The rings are generated using a loop, which calculates their diameters relative to the cymbal's overall size. A smaller circular element is then added at the centre to represent the cymbal bell.
Finally, the cymbal is registered as an interactive pad.
Creating the Shell Drums
The snare, kick, and toms are generated using another reusable function called make_drum().
Similar to the cymbal generator, this function creates a circular drum with a dark background and an illuminated outer rim. We also add four small tuning lugs around the perimeter and an inner ring to give the drumhead more detail.
The is_snare parameter lets us add an extra visual element to the snare drum, distinguishing it from the other drums.
Once the graphical elements are created, the main drum object is registered with the touch handler. This means the entire drumhead acts as an interactive surface.
Creating the Dual-Zone Hi-Hat
The hi-hat required a slightly different approach because we wanted to support both open and closed hi-hat sounds.
Instead of treating it as a single interactive object, we divide it into two separate touch zones.
The left half triggers the closed hi-hat sound, while the right half triggers the open hi-hat sound. A central divider visually separates the two zones, and an additional circular element represents the bell.
This gives us two distinct sounds within the footprint of a single instrument, making the virtual kit more versatile without taking up additional screen space.
Adding Auxiliary Trigger Pads
We also created a make_trigger_pad() function for auxiliary sounds.
These pads use elongated, rounded rectangles with an illuminated outline and a small horizontal accent in the centre.
The function accepts the position, width, height, and drum ID as parameters, allowing us to reuse the same design for different auxiliary triggers.
Like the main drums and cymbals, each trigger pad is registered with the same touch event handler.
Handling Touch Events and Playing Sounds
Now comes the important part: making the interface playable.
Whenever a user presses a drum or cymbal, LVGL calls the pad_ev() event handler. The handler retrieves the drum ID associated with that particular object and passes it to the audio engine.
The drum_trigger() function plays the corresponding instrument sound. At the same time, the drumhead changes to the active Pip-Boy theme colour, producing an instant visual flash whenever a note is played.
When the user releases the screen, or the touch is interrupted, the handler restores the drumhead's background to black.
This small interaction makes the interface feel much more responsive and reinforces the classic Pip-Boy phosphor display aesthetic.
The same event handler also records drum hits when recording mode is active, storing the event timestamp, instrument ID, and velocity for later playback.
Assembling the Complete Interface
Finally, pipboy_dkit_tab_build() brings all the individual elements together.
The function creates the main drum stage, sets its dimensions, and positions each instrument using its coordinates and size.
By adjusting these coordinates and dimensions, we can control the layout of the entire drum kit. Each instrument is drawn using the functions we defined earlier, so changing its size or position doesn't require rewriting its underlying design.
The interface also reserves space for a bottom control bar containing controls for the drum kit selection, BPM, metronome, backing beat, recording, playback, and volume.
AUDIO ENGINE
The UI is only half the story. To make DrumKit feel like a real instrument, we needed an audio engine capable of playing multiple drum sounds simultaneously without noticeable latency or audio glitches.
Instead of reading sound files from a microSD card every time a drum is tapped, we preload the audio samples into high-speed PSRAM during initialization. This allows the engine to access the samples directly from memory, keeping playback responsive even when multiple instruments are triggered in quick succession.
The sound library covers the main instruments in our virtual kit:
- Kick Drum: Deep, punchy bass sounds.
- Snare Drum: Sharp, snappy percussive hits.
- Hi-Hats: Separate open and closed hi-hat sounds.
- Toms and Cymbals: Different tones for fills, accents, and rhythms.
Setting Up the Audio Mixer
The audio engine lives in drum_mixer.c. It uses a voice-based mixing system that supports up to 16 simultaneous audio voices.
Each voice represents an individual sound currently being played. The structure keeps track of the sample data, its total length, the current playback position, the volume gain, and whether the voice is active.
This approach allows the mixer to combine several drum hits into a single audio stream.
For example, you can hit the snare, kick, and cymbal almost simultaneously without the engine having to finish playing one sound before starting another.
Triggering a Drum Sound
Whenever a drum is tapped, the UI calls drum_trigger() with the corresponding drum ID.
The function retrieves the appropriate sample from the currently selected drum kit and prepares a voice for playback. It resets the playback position to the beginning of the sample and applies a gain based on the requested velocity.
Once the voice is marked active, the mixer task is notified that new audio is available.
This keeps the UI interaction simple: the touchscreen identifies the instrument, while the audio engine handles the actual playback.
Mixing Multiple Sounds
The mixer processes audio in small blocks of 256 frames. At a 44.1 kHz sample rate, each block represents approximately 5.8 milliseconds of audio.
Before processing a block, the mixer takes a snapshot of the active voices. It then combines their sample values frame by frame, accumulating the contributions from each active voice.
The mixer uses 32-bit accumulators while combining the samples, giving it more room to handle the combined amplitude of multiple instruments before converting the result back to 16-bit audio.
Once the block has been rendered, it is sent to the audio codec for playback.
Keeping Audio Smooth
Mixing several sounds can cause the combined signal to exceed the maximum range of a 16-bit audio sample. Simply clipping the signal can introduce harsh distortion.
To address this, we use a function called clamp16_fast(), which applies a soft-knee saturation curve when the mixed signal exceeds a defined threshold. This helps control peaks and makes the output less prone to harsh clipping.
The mixer also minimises the time spent inside critical sections. It briefly locks access to the shared voice data, copies the state into a local snapshot, and performs the bulk of the mixing outside the critical section.
This reduces contention between the audio task and other parts of the application.
Prioritising Audio Processing
The audio mixer runs in a dedicated FreeRTOS task pinned to Core 1 at priority 10. This gives audio processing a dedicated execution context and helps it keep up with the incoming playback workload.
The task continuously mixes the active voices into an output buffer and sends that buffer to the speaker codec.
Combined with preloaded samples, short processing blocks, and concurrent voice playback, this architecture helps DrumKit remain responsive when multiple drums are played in quick succession.
The result is an audio engine designed to keep up with the touchscreen, allowing you to play the virtual drum kit without the sluggish response you'd expect from an interface that loads sounds on demand.
TOUCH DRIVER: ENABLING FIVE-FINGER MULTITOUCH
When we first tested DrumKit, we ran into a limitation with the touchscreen driver: only one touch point was being registered at a time. This was a problem for a drum kit, where you might want to hit the hi-hat with one finger and the snare with another, or play several drums simultaneously.
The issue came from Espressif's LVGL touch adapter, esp_lvgl_adapter, which was configured with MAX_TOUCH_POINTS 1. As a result, simultaneous touches were not being handled as required.
Patching the Touch Driver
To fix this, we modified esp_lv_adapter_input_touch.c to support five simultaneous touch points using the GT911 touchscreen controller.
Instead of treating the touchscreen as a single input device, we registered five separate lv_indev_t input devices. On each input update, the driver reads the coordinates of all five fingers from the GT911's hardware registers in a single I²C transaction and caches the results.
The individual LVGL input devices then read their respective coordinates from this shared cache. This avoids unnecessary I²C transactions for each finger while allowing all five touch points to be processed during the same update cycle.
With this modification, DrumKit can register up to five simultaneous touches, allowing us to play with both hands and trigger multiple instruments at once.
This was a crucial improvement because multitouch isn't just an additional feature for a virtual drum kit; it's essential to making the experience feel natural. We can now hit the kick, snare, and hi-hat in quick succession without the touchscreen limiting you to a single finger at a time.
COMBINING DRUMKIT WITH PIPBOY
Once DrumKit was running smoothly as a standalone project, the next step was to integrate it directly into the main Fallout Pip-Boy project.
Inside pipboy_ui.c, we replaced the old Radio tab with a new DKit tab. This lets DrumKit run as part of the existing Pip-Boy interface rather than as a separate application.
The integration also meant bringing DrumKit into the Pip-Boy's existing theme system. Tapping the Vault Boy portrait on the Status tab cycles between three colour schemes: New Vegas Amber, Vault-Tec Green, and Institute Blue. DrumKit follows along automatically, recolouring its drumheads, lathed rings, rims, and bottom console in real time to match the selected theme.
We also wanted the interface to retain that classic Pip-Boy feedback when navigating between tabs. To achieve this, clicks on the other tabs are routed through radio_player_click(), which plays a short, closed-hi-hat-style sound. It's a small detail, but it helps make the entire interface feel more responsive and gives the different sections a consistent audio touch.
FLASH PROCESS
You can flash and run DrumKit independently for testing, or flash the complete Fallout Pip-Boy firmware with DrumKit integrated into the main interface.
Flash the Standalone DrumKit
Open your terminal and run the following commands to navigate to the DrumKit project directory, load the ESP-IDF environment, and flash the firmware.
Flash the Complete Fallout Pip-Boy
To flash the full Pip-Boy firmware, including the integrated DrumKit, navigate to the main project directory and run:
PS: These commands use the local paths and serial port from the development setup. Update them to match your ESP-IDF installation, project location, and connected board's serial port.
Once the firmware was flashed successfully, we installed the ESP32-P4 board back inside the Pip-Boy enclosure and reconnected the battery. With everything in place, the device was ready to go!
RESULT
And here's the end result of the build: our Fallout Pip-Boy, now loaded with a brand-new electronic drum kit! What started as a standalone virtual drum kit is now fully integrated into the Pip-Boy interface, and it's honestly pretty fun to play around with.
The DrumKit interface includes cymbals, a snare, a kick drum, high and mid toms, a floor tom, and auxiliary trigger pads. The hi-hat even has separate closed and open zones, giving you more control over the sounds you can trigger. Every time you tap a drum, it flashes with that classic phosphor effect, making the whole experience feel right at home in the Fallout universe.
But there's more to it than just tapping virtual drums. You can play built-in beats and increase or decrease their playback speed to suit your rhythm. There's also a record and playback feature, so you can record your own drumming and play it back later. And if things get a little too loud, you can adjust the volume directly from the interface.
OVERVIEW
This project is essentially the same Pip-Boy AR Mark 6000 I built earlier, but with one fun new addition: a fully integrated electronic drum kit! It's a small change to the existing UI, but it makes the whole Pip-Boy a lot more fun to use.
And that's the beauty of building a custom interface like this. There's still plenty of room to experiment and add new features. Maybe I'll integrate a few sensors, add a game, or even connect a camera module to the Waveshare ESP32-P4 development board and turn this thing into a Pip-Cam. The possibilities are endless, and I already have a few ideas in mind!
For now, though, this build is complete. You'll find everything you need to recreate the project in this article, including the code, project files, and other relevant details.
A special thanks to Waveshare for providing the hardware used in this build and supporting the project. If you run into any issues while recreating it, feel free to leave a comment below, and I'll do my best to help you out.
That's all for this build. Thanks for following along, and I'll see you in the next project!
Peace!