MIDI-Controlled Analog Synthesizer

40410

Intro: MIDI-Controlled Analog Synthesizer

Synthesizers are electronic instruments which can turn notes played on a keyboard into sounds. With these instructions, you can make your very own analog synth which takes input from an electronic keyboard, converts the MIDI data into an analog signal using a Raspberry Pi, and outputs the sound through a headphone jack.

A huge thank you goes out to Moritz Klein for publishing his CD40106 VCO series, which this project is based on. Check him out on Youtube!

Big thank you to Ms. Berbawy and Berbawy Makers, who made this project possible through her Principles of Engineering class!

STEP 1: Assemble the Circuit

I used a breadboard for the final design of my circuit because it's easy to add more functionality and fix any mistakes. You will need all the electronic components, a soldering iron, wire cutters, and wire strippers for this step. I used jumper cables for connections within / between the breadboards and solid core wire for connections to the potentiometers and headphone jack. Follow the schematic and use the pictures of my final breadboard as a reference.

After this, test your circuit using an oscilloscope and a pair of headphones. If it doesn't work as intended, turn the potentiometers and test for short circuits using a multimeter. Test all your components and check that there are no unintended or loose connections in the circuit. If both of these do not work, try replacing the ICs.

STEP 2: Setup and Program the Raspberry Pi

You will need to flash an SD card with the Raspberry Pi Operating System. Go to raspberrypi.com/software/ using a laptop / PC and download the correct app for your system. Plug in a microSD card using the adapter. Choose "Raspberry Pi 32-bit OS" for the operating system and your microSD for the Storage. Once it installs, set up the Pi using the MicroSD card.

Connect to a valid Wi-Fi network. Open the terminal app and type the following commands:

sudo pip3 install python-rtmidi
sudo pip3 install adafruit-circuitpython-mcp4728

Next, open Thonny. The code is at github.com/abhay-harpalani/analog_synthesizer/tree/main. It uses the rtmidi python library and the Adafruit DAC to convert the digital MIDI signals into an analog voltage. Download this code and paste it in a file in Thonny.

STEP 3: Make the Box

I designed a box in Autodesk Fusion 360 and moved the sketches over to Adobe Illustrator by downloading the faces as DXF files. I then used Ms. Berbawy's VLS3.5 Universal laser cutter to make the box from the Illustrator files. Depending on what laser cutter you use, you will need to follow different instructions to cut the parts. It's important to note that there is rastered text, a vector engraved circle around the headphone jack, and cut lines everywhere else. The headphone jack needs the vector engrave to be able to screw it onto the acrylic. I used 3 mm green edge acrylic to create the box.

STEP 4: Assemble It All Together

Use 4 M3 screws and nuts to connect the bottom piece to the 4 small joint pieces. Use M2 screws and nuts to screw the Raspberry Pi on. Then, peel off the backing from the breadboards. Attach the batteries clips using the velcro, sticking one side to the bottom and the other to the clips. Screw on the top frame using the remaining M3 screws and nuts. Finally, screw on the potentiometers and headphone jack.

To play the synth, connect the keyboard, headphones, and 2 9V batteries. Start the Python program on the Pi and you will be able to use your synthesizer. Congratulations on completing this project!

Here is a video of the final product working.