Bluetooth Enabled Synthesizer for mbed

Group Members: Mark Pinion, Jake Campbell, John Aspinall

Description:

This notebook page covers a design project involving a sound synthesizer for the mbed that is controlled via a bluetooth module. The mbed outputs the sounds via the AnalogOut pin to an amplifier circuit, and from there to a small speaker mounted on a breadboard with the rest of the components. An LCD is also included in the design, and displays the current values of a few parameters that will affect the sound that the mbed outputs. These parameters include the current octave, the current duration that the note will play, the current shape of the waveform (sine, square, sawtooth), as well as the current ADSR (attack, decay, sustain, and release) envelope that modulates the amplitude of the wave to give different sounds. An Adafruit low energy bluetooth module allows communication to the mbed, either from a PC with a compatible bluetooth dongle running Adafruit's software, or via Adafruit's app available on the app store as well as for Android devices. In addition, there is a GUI which gives the user visual information regarding the current state of the parameters previously mentioned that affect the sound that is played. The GUI also displays two graphs, one showing the type of waveform and the other showing the shape of the 'envelope'. The last note played is also displayed to the user. The synthesizer covers all the full octaves that can be heard on a piano, and all notes except for the sharps are included (A, B, C, D, E, F, G). All inputs are passed through the bluetooth module to the mbed by sending certain characters through Adafruit's application in UART mode. The bluetooth module must also be set to UART mode with a small switch that is mounted to the board containing the bluetooth hardware.

A link to the Adafruit software used to communicate with the module can be found here: https://github.com/adafruit/adafruit-bluefruit-le-desktop

The dongle we bought to enable our computer to communicate with the module can be found here: https://www.adafruit.com/products/1327

Hookup Guide:

For the Adafruit LE Bluetooth Module:

MbedAdafruit Bluetooth Module
GndGND
GndCTS
p14 (Any serial Rx Pin)TXO
p13 (Any serial Tx Pin)RXI
Vout (5V)VIN
Not UsedMOD
Not UsedDFU
Not UsedRTS

For the Speaker and Audio Amp Breakout Board:

mbedTPA2005D1Speaker
gndpwr - (gnd), in -
Vout (3.3V) or 5Vpwr +
p18 (Any PWM or D/A)in +
out ++
out --
Any DigitalOut pin(optional)S (low for shutdown)

You can also hook-up a potentiometer to the three volume terminals on the TPA2005D1 in order to be able to adjust the volume on the fly.

SparkFun MicroSD Breakout Board:

MicroSD Breakout Boardmbed
CSp8 (DigitalOut)
DIp5 (SPI mosi)
VCCVout (3.3V)
SCKp7 (SPI sclk)
GNDGND
DOp6 (SPI miso)
CD

DO NOT HOOK UP VCC TO 5V, IT COULD DAMAGE YOUR SD CARD.

uLCD:

uLCD jumper wiresmbed
+5VVU (5.0v)
RXp14 (any Serial rx pin)
TXp13 (any Serial tx pin)
GNDGND
RESp11 (Any DigitalOut pin, Optional)

The code for the synthesizer can be found here;

Import programBlueSynth

Bluetooth Enabled Keyboard/Synthesizer

Here is a picture of the complete setup on the board: /media/uploads/jmpin/board_layout.jpg

Here is a picture of the GUI: /media/uploads/jmpin/maingui.png

Here is a video demonstrating the capabilities of the synthesizer:

Here is the link to our GUI code: https://github.com/guidingarrow/BlueSynth

One last thing to note is that in order to have the GUI function correctly in tandem with the Adafruit application that sends the characters to the mbed, we wrote a script that causes a few things to happen when a button is pressed. The mbed will behave correctly as long as you send characters to it through the Adafruit program, but in order to have our GUI work at the same time, some extra steps are needed. The software we used to develop the script can be found at the following website: https://autohotkey.com/


Please log in to post comments.