Open Source Desktop Synthesizer Benjamin Miller, Mouser Electronics
Licensed under CC BY-SA 4.0
Download Full Project
BOM
Assembly
Compared to the software, the hardware of our synthesizer is pretty simple.
Figure 2: The unwired protoboard showing components.
Protoboard
The protoboard will hold all of the components which stand between the inputs/outputs and the Arduino 101. This includes the MPR121 Capacitive Touch Sensors, the mode switch, the IR sensor, and the output filters.
Figure 3: Labeled protoboard. See Legend in Table 1 below.
If you decided to use the proto-board that I used, the long, outer columns will serve as our power strips while the topmost and bottommost rows will connect to the Arduino. The volume slider, LED, mode switch, and speaker out will come from various nodes in the middle of the strip board so pay close attention to the picture above. Otherwise, you are of course free to build off the schematic however you wish.
The black dots are normal insulated wire, red dots are breadboard wires (with the header pin side attached to the Arduino 101 and the other side stripped and soldered to the protoboard. The dark blue dots are the leads of components and the light blue dots are the short header on the MPR121 breakout board.
If two dots share the same number, this means that these dots represent the end points of the same wire or component, while dots without a partner attach to some external component. Start by soldering all of the components (blue) to the board, then continue reading, referring back to this diagram for wire connections.
Table 1: Legend for protoboard landing wires.
Number
Name of Connection
Connection Type
1
IR Vout
Wire
2
IR Ground
Wire
3
IR Vcc
Wire
4
Power Jumper
Wire
5
220 Ω resistor
Component
6
220 Ω resistor
Component
7
To A0
Header Pin Wire
8
To A1
Header Pin Wire
9
220 Ω resistor
Component
10
220 Ω resistor
Component
11
To A2
Header Pin Wire
12
Ground Jumper
Wire
13
To 5V
Header Pin Wire
14
To GND
Header Pin Wire
15
220 Ω resistor
Component
16
220 Ω resistor
Component
17
3-Way Switch: 6
Wire
18
3-Way Switch: 3
Wire
19
3-Way Switch: 5
Wire
20
3-Way Switch: 2
Wire
21
3-Way Switch: 4
Wire
22
3-Way Switch: 1
Wire
23
From Pin 7
Header Pin Wire
24
From Pin 8
Header Pin Wire
25
From Pin 9
Header Pin Wire
26
From Pin 10
Header Pin Wire
27
From Pin 11
Header Pin Wire
28
From Pin 12
Header Pin Wire
29
From Pin 13
Header Pin Wire
30
220 Ω resistor
Component
31
220 Ω resistor
Component
32
220 Ω resistor
Component
33
220 Ω resistor
Component
34
220 Ω resistor
Component
35
220 Ω resistor
Component
36
220 Ω resistor
Component
37
Slide Pot GND (3)
Wire
38
Slide Pot Vin (1)
Wire
39
Slide Pot Vo (2)
Wire
40
100 kΩ resistor
Component
41
1 µF capacitor
Component
42
1 µF capacitor
Component
43
220 Ω resistor
Component
44
220 Ω resistor
Component
45
10 µF capacitor
Component
46
10 µF capacitor
Component
47
Output to ¼”
Wire
48
Ground for ¼”
Wire
49
SCL line (to Arduino)
Header Pin Wire
50
SDA line (to Arduino)
Header Pin Wire
51
SCL
MPR121 header
52
SDA
MPR121 header
53
ADDR Jumper (underside of board)
Wire
54
ADDR
MPR121 header
55
GND
MPR121 header
56
3Vo
MPR121 header
57
Vin
MPR121 header
58
SCL Line
Wire
59
SDA Line
Wire
60
GND Line
Wire
61
Vin Line
Wire
62
SCL
MPR121 header
63
SDA
MPR121
64
ADDR
MPR121
65
GND
MPR121
66
3Vo
MPR121
67
Vin
MPR121
68
SCL Line
Wire
69
SDA Line
Wire
70
GND Line
Wire
71
Vin Line
For the MPR121 breakout boards I wired the SCL, SDA, GND, and VIN headers to their respective partners on the other breakout board before connecting that header to the outer rows of the proto-board (from there they will be wired to the Arduino.) Take care in wiring the headers to each other. I connected the ADDR pin on the second board to the SDA pin because of how the breakout board assigns I2 C addresses. A small, bare jumper connects the two on the bottom side of the board.
Figure 4: The output filter components, with main output wires (brown is the signal, white is the ground). These go to the 1/4" jack.
Enclosure
Our input and output devices (from the keys to the speaker outs) have to be mounted onto the enclosure before we can wire them up to the protoboard. I have chosen this Hammond enclosure because of it is made of ABS plastic and is the perfect length for a portable keyboard.
I used a Dremel tool and power drill extensively to cut holes in my enclosure. If you do not have access to these tools, you can make your enclosure out of something thinner, like cardboard. Once you have your circuit built, feel free to throw it in any kind of box that you like. For this reason, I will not provide schematics for the enclosure.
Attach Inputs and Outputs to Enclosure
Figure 5: Enclosure lid with peripherals' holes drilled.
The keys are standard piano key shapes, carefully cut out of thin copper sheets. I used epoxy to glue the keys in place. When placing the keys on your enclosure, make sure to place them carefully; no keys should touch, and each needs to be straight. Once the keys are placed, we need to use a very small drill bit to drill a hole through the top of each key and through the enclosure.
Figure 5: Loose keys after soldering
To attach the 3-way switch, I drilled a hole the size of the toggle (but smaller than the actual red base) and hot glued the switch in place from the bottom of the enclosure.
Figure 7: Mode switch wired and glued.
The volume pot on my enclosure is similarly glued to the underside of the plastic, with the slider sticking out through a thin rectangular hole I chiseled out with the Dremel tool. You can just as easily stick the potentiometer on top of the enclosure and drill holes for the wires to slide through.
Figure 8: Volume Slider glued and wired up.
The IR sensor has two holes on the sides to accommodate drilling to the enclosure. I took a different route by drilling and carving two holes into the top of the box before gluing the IR sensor to the bottom side. This makes the enclosure look more seamless but is not necessary.
Figure 9: IR sensor glued and wired.
You will need to drill at least two more holes: The output jack needs a hole where the signal will go out to an amp, while the power adapter needs a hole to plug into the Arduino. I also drilled and carved an opening for the USB port on the Arduino in case I need to connect it to a computer for debugging.
Figure 10: The USB port hole and a marking for the power port.
Figure 11: The output jack.
Wire I/O to protoboard
Once we have the inputs and outputs attached to our enclosure, we can start wiring them up to the protoboard. All of the user interface elements are attached to the enclosure and will be wired to the protoboard in some way.
First, the keys. For each key, solder a wire to one of the numbered holes in the Adafruit breakout board. Strip about a centimeter off the other end and feed it from the bottom of the enclosure through the hole so that it touches the corresponding key. Then solder the wire to the copper key. Be careful, the copper gets hot quickly. Repeat for all 24 keys.
Next, we need to wire the volume potentiometer. There are six pins on our Bourns slide potentiometer, but we only need three of them. Looking at the bottom of the slide pot with the 4-pin side to the left, the bottom pin is the “2,” meaning that it is the output of the potentiometer. This should be wired to the protoboard right before the high-pass filter. The pin above it is the “1,” the input, which, as you can see from the schematic, is wired to the output of the summer. Our summer’s output is soldered to the rail running parallel to the power rails. The bottom pin on the right side (with the two pins) is the ground pin. Wire that to the ground rail.
Figure 12: 3-way switch pin numbering.
The 3-way switch has six pins on the bottom of it, so this step can get confusing. Each of the pins has a number designated to it, though they are not printed on the switch, so you will need to refer to Figure 12 or the datasheet (specifically page F-38) to understand where to wire the ends of the switch. Our switch is the second table of the datasheet. The pins are labelled 1-6, with 1-3 on one side and 4-6 on the other. Once you identify the pins from the datasheet, you can solder wires from the pins to their corresponding places on the protoboard (See Table 1).
Figure 13: The digital pins (in rainbow) and the 3-way switch (in white).
The IR sensor is fairly straightforward. Three wires will connect the pins on the back of the IR sensor to its region on the protoboard. When soldering wires to the pins on the back of the IR sensor, be VERY careful not to solder two pins together. Look at the datasheet to learn which pin is which. The middle pin is ground, so solder that wire to your ground strip on the protoboard. Similarly, the Vcc pin will be connected to your 5V strip. The last pin, Vo, is your data wire. This should be soldered to the designated place on the protoboard.
Figure 14: The volume slider wires (on left) and the IR sensor wires (on right).
The ¼” jack has two tabs with small holes in them. One of these pins (the sleeve, or the shorter one) should be wired to ground. The other one (the tip, or the longer one, needs to connect to the output row on the protoboard.
The MPR121 boards need to be powered and grounded as well as connected to the I2 C pins of the Arduino. I used jumper wires to connect the 5V, GND, SCL, and SDA pins of one MPR121 to the corresponding pins of the other board to “tie” the boards together. Then I wired the pins of the second board to their ultimate destinations (5V and GND to the protoboard power strip, SCL and SDA to the Arduino).
Connect Protoboard to Arduino
The Arduino has 7 note pin outputs (digital pins 7, 8, 9, 10, 11, 12, and 13) which are summed on the protoboard. You can use breadboard cables with male ends to plug into the Arduino header and solder the other ends to the protoboard. The Arduino will also supply 5V and a ground (GND) reference to the protoboard using breadboard cables as well.
Figure 15: Digital Pin outs (7-13) and I2C jumpers (SDA in purple, SCL in blue).
The protoboard routes the I2C data from the MPR121s to the Arduino while routing the power and ground from the Arduino to both MPR121s. This is why we brought the SDA and SCL nodes from both boards together and soldered them to the protoboard. Soldering a breadboard cable to these nodes and plugging the male pin ends to the respective SDA and SCL header slots will allow the breakout board to communicate information about the keys to the Arduino.
Figure 16: A fully wired synthesizer. The rest of the header wires (the power, ground, and analog ins) can be seen in the foreground.
The 3-way mode switch will be directing voltage into two of the Arduino’s analog pins. The top two rows on the right side of the board (the side of the breakout boards, where the boards take up most of the bottom) will be wired to analog pins A0 and A1.
Figure 17: The wired protoboard and Arduino.
Once you have the Arduino connected to the right places on the protoboard, the peripherals all soldered to the protoboard, and the keys all attached and not touching, you can load the code onto your Arduino 101 (if you haven’t already), connect the Arduino to power, and plug your synthesizer into an amplifier or a pair of headphones with a 1/8” to ¼” adapter.
OPTIONAL: If you would like some indication that the synthesizer is on and working, you can wire up the LED on the volume slider. Simply solder a 220Ω resistor to a free space on our solder board and wire the slide pot like you would a normal LED.
Figure 18: Schematic of slide pot LED.
Connect one end of the resistor to the 5V power strip on the protoboard and connect the other end to the “B” pin of the slide pot. The B pin is on the side of the pot with 2 pins, on the outside. The “E” pin is the only remaining pin on the opposite side of the side pot. This one should be connected to ground.
We would love to hear what you think about this project; please tell us in the comments section below.