Digital Sound Synthesizer for mbed
Overview
We created a digital sound synthesizer that is capable of producing three different types of waveforms (sine, sawtooth, and triangle). Each waveform can be selected by pressing a pushbutton to cycle through the waveforms. A capacitive touch keypad provides the primary interface to select a note to play. An accelerometer on an IMU allows users to modulate the selected note. Additionally, a PWM-driven RGB LED displays the effect of the IMU.
Picture of Layout
Components
The following is a list of components used to build this project:
- 1 x mbed NXP LPC1768 Microcontroller
- 1 x MPR121 I2C Capacitive Touchpad
- 1 x LSM9DS1 IMU
- 1 x Class D Audio amplifier
- 1 x Breadboard compatible 8 Ohm Speaker
- 1 x Pushbutton
- 2 x 4.7k Ohm resistors
- 2 x 100 Ohm resistors
- 1 x 180 Ohm resistor
Wiring Connection Guide
MPR121 I2C 12 Key Capacitive Touchpad

*The I2C connections require pullup resistors to function properly*
| mbed | MPR121 | Pullups |
|---|---|---|
| Gnd | Gnd | |
| p9 | SDA | 4.7k |
| p10 | SCL | 4.7k |
| p11 | IRQ | |
| Vout | Vcc |
LSM9DS1 IMU

| mbed | LSM9DS1 |
|---|---|
| Gnd | Gnd |
| Vout | Vdd |
| p28 | SDA |
| p27 | SCL |
Class D Audio Amplifier

| mbed | Amplifier | Speaker |
|---|---|---|
| Gnd | Pwr - & In - | |
| Vout | Pwr + | |
| p26 | In + | |
| Out + | + | |
| Out - | - |
RGB LED
To prevent the RGB LED from shorting, resistors are used to drop the current to each leg of the LED as shown below:

| mbed | RGB LED | Resistor |
|---|---|---|
| p21 | 1 - Red | 180 Ohm |
| Gnd | 2 - Gnd | |
| p22 | 3 - Green | 100 Ohm |
| p23 | 4 - Blue | 100 Ohm |
Pushbutton
| mbed | Pb |
|---|---|
| p18 | 1 |
| Gnd | 2 |
Program Code
Here is a link to import the program.
Import program4180_lab4
Digital Sound Synthesizer for lab 4
Video
Please log in to post comments.
