Build a portable Teensy synth inside a hard case

Wire a battery-powered arcade-button synth into a hard case, with built-in speakers, drum samples, a headphone jack and volume control.

Julian ReedElectronics restorer and tinkerer
5 min read

An open hard case fitted with colorful arcade buttons and two speakers forming a small synthesizer.
Photo by Alexey Demidov / Pexels
Skill
Soldering and basic wiring
Tools
Soldering iron, drill, 1 1/8 and 2 inch hole saws
Keyboard
One octave, C3 to C4, four-voice polyphony
Power
USB battery with external USB-B jack

You will turn a hard case into a self-contained synthesizer with a one-octave arcade-button keyboard, four sample pads, built-in speakers and a battery that runs it anywhere. It takes cutting, soldering and a fair amount of careful wiring, so treat it as a weekend build. Once it is done, anyone can pick it up and start playing within seconds.

What the finished synth does

The keyboard runs a full octave from C3 to C4, with five black buttons for the sharps and flats. Two buttons above the keys shift the octave up or down, and four more beside them trigger drum or other samples. The keyboard plays up to four notes at once, and samples can play at the same time, so one person can handle the keys while a second takes the drums.

On the side you get a 3.5mm audio jack for headphones, recording or a bigger amplifier, plus a USB-B power jack, an on/off switch, a speaker mute button and a volume knob.

What you will need

  • Hard case (one with good dimensions may still be a bit flimsy)
  • Speakers, a 3D-printed speaker grille and an optional 3D-printed button support
  • (8) M3 x 12mm screws and (8) M3 nuts
  • Teensy 4.1, Teensy audio shield (Rev D), Qwiic Speaker Amp, Micro-SD card, USB battery
  • Arcade buttons: (8) white, (5) black, (2) yellow, (2) green, (2) blue
  • (1) SPST momentary button with LED, toggle switch and cover, 10k potentiometer
  • Bulkhead 3.5mm connector and bulkhead USB-B/USB-A connector
  • Solderable breadboard; straight male, long-centered male and female single-row headers
  • Screw terminals: (2) 6-pin, (2) 16-pin, (2) 2-pin
  • Solid-core hook-up wire, spade connectors, Qwiic connector, zip-ties
  • (2) 3.5mm stereo cables and a 3.5mm signal splitter
  • (2) USB-A to USB-C cables, (1) USB-A to USB-B cable for charging, horizontal USB-C breakout
  • Drill, 1 1/8 inch and 2 inch hole saws, soldering iron

Step by step

  1. Build the main board. Solder the Teensy 4.1 with long centered headers. Fit female headers to the solderable breadboard and the audio shield so parts can be attached and removed quickly. Snap the male headers to length and clip the female headers to fit the shield. Set up one pair of rails for 5V and GND and the other for 3V3 and GND.

  2. Cut the lid. Use the 1 1/8 inch hole saw for the buttons and the 2 inch hole saw for the speakers. A printed layout can serve as a template. Drill holes in the side for the jacks, switch, knob and mute button, roughly centered vertically.

Keep the laser off the case

If you have a laser cutter, use it only to make a template. Do not laser directly on the case.

  1. Mount the buttons. Push each arcade button into the lid, adding the 3D-printed support inside if you need more rigidity. Remove and reinsert the microswitches to clear the holes.

  2. Wire the buttons. Link every button's common pin together with wire and spade connectors, then run the last wire to ground. Give each button its own lead and spade connector and attach it to its Teensy GPIO through the main board. Each input is pulled low when the button is pushed.

Color-code the wiring

Use black wire for black buttons, white for white buttons and green for ground, then bundle runs with zip-ties. It makes tracing a fault far easier.

  1. Fit the speakers. Bolt the speakers and grille in place with the M3 screws and nuts. Solder wires to each speaker's positive and ground pins. Leave every wire long enough for the lid to open and close, then connect them to the amplifier's left and right screw terminals.

  2. Add the volume knob. Solder leads to the potentiometer: one side to ground, the other side to +3.3V and the middle to analog pin 17. It works as a voltage divider.

  3. Add the mute button. Solder leads to the SPST button and its LED pin if it has one. Connect the switch common and LED negative to GND (the amplifier's screw terminal works). Run the switch NO pin to Teensy GPIO 16 and the LED positive to Teensy GPIO 17.

  4. Wire the power switch. Solder wires to VBUS and GND on the USB-C breakout and connect them to the switch's + and GND pins. Connect the switch's light icon pin to the +5V rail and its GND pin to the GND rail.

  5. Connect the amplifier. Wire the amp's VIN and GND to the board's +5V and GND. Plug the Qwiic connector into the amp and run its leads to SDA, SCL, GND and +3.3V on the main board.

  6. Hook up the battery. Connect the battery's charge port to the USB-B/USB-A pass-through with a USB-C to USB-A cable, and its USB-A output to the switch breakout with a USB-A to USB-C cable. Your battery may need different cables.

  7. Route the audio. Plug the splitter's input into the audio shield's stereo jack. Use the two 3.5mm stereo cables to run one side to the speaker amp and the other to the audio pass-through.

  8. Strap everything down. When the lid opens and closes cleanly, drill holes in the bottom of the case and zip-tie the main board, amplifier and battery in place. Tidy the remaining wires the same way.

Load the code and samples

Load the synth's code onto the Teensy 4.1 using the standard Teensy setup process. Copy the sample clips onto the Micro-SD card and insert it into the audio shield.

To swap in your own sounds, save each clip at a 44.1 kHz sample rate and 16 bits per sample, using exactly the same file names as the originals. Mono works fine here, though the Teensy can handle stereo. A free audio editor such as Audacity can convert clips to the right format.

Play it

Some USB batteries need a press of their side button before they output power. Close the case and flip the main switch. The mute button lights up when the synth is ready, and then you just start pressing buttons.

For quiet playing, press the mute button to cut the speakers and plug headphones into the side jack.

Adapted from Portable DIY Teensy Synth by SparkFun Electronics, which is published under a Creative Commons Attribution-ShareAlike licence. This adaptation is shared under the same licence.

Filed underElectronicsMusicTechnologyWeekend
Portrait of Julian Reed

Written by

Julian Reed

A vintage electronics restorer and hobbyist tinkerer who walks readers through soldering basics, retro console repairs, and fun weekend gadget builds.

Previous articleFollow a 45-minute beginner aerobics workout at homeNext articleLearn travel photography from seven books and your own street

You may also like

0 comments

    Join the conversation

    Be kind and be specific. Comments are moderated before they appear.