Arduino Synthesizer

by ignargomez in Circuits > Arduino

2930 Views, 12 Favorites, 0 Comments

Arduino Synthesizer

WhatsApp Image 2022-12-26 at 11.56.09 (3).jpeg

An Arduino Nano-based 3D printed synthesizer that produces a wide range of amazing sounds generated using FM synthesis technique and ADSR envelope control.


This project has been created by the students of the Electronic Engineering Degree Adrián and Oscar in the Creative Electronics course, together with the students Miguel, Enrique and Nacho of the Sound and Image Engineering Degree for the Musical Acoustics course, at University of Málaga, School Of Telecommunications.


For this project we have relied heavily on John Bradnam's project.


Supplies

Things used in this project


Hardware components:

  • Arduino Nano R3
  • x17 Tactile Switch, Top Actuated
  • x8 10k Potentiometer
  • Audio amplifier. We use a stereo one (PAM 8610, 2x15W) but a mono one is enough, because we only have one audio signal.
  • Speaker 5W
  • PCB

Software:

  • Arduino IDE

Hand Tools:

  • Soldering Iron
  • 3D Printer

3D Printing

To create a custom box that would be easy to assemble and that would fit perfectly without a lot of work time, we decided to make the structure in a 3D printer. For the design of the box we based on John Bradnam`s project.

At the beginning we had problems because we modified some sliding faders for round potentiometers and after printing we realized that we had to enlarge the box to fit all the potentiometers. We also had to make a slot for the sound to come out of the speaker. We also included the initials of the function of each potentiometer on the box.


Here are the print files.

Electronics

WhatsApp Image 2022-12-26 at 11.56.09 (1).jpeg
WhatsApp Image 2022-12-26 at 11.56.09.jpeg

The power supply of our synthesizer is a 9V battery, which will be connected on one side to our audio amplifier PAM 8610 and on the other side to a voltage regulator that will give us 5V to power the Arduino. The audio amplifier can be powered with 8-12V, that's why we can't use the voltage that the regulator takes out. 


The audio signal that comes out of the Arduino has two paths, on the one hand goes directly to the audio amplifier to sound through the speaker, and on the other hand the signal is connected to a miniJack port anchored in a side of the box to get the audio signal to a possible external speakers or even a recorder.

FM & ADSR Envelope

A synthesizer is characterized by being able to "create" sounds through additive or subtractive synthesis starting from simple sine waves or modifications of this. 

In this case we wanted our synthesizer to have FM synthesis which means a secondary oscillator is able to modulate in frequency the main oscillator and be able to create super interesting and original sounds. In the box we can find four potentiometers that are responsible for modifying the FM synthesis.

FM: ratio of the modulation frequency to the carrier frequency (range 0.06-16) values below 1 result in undertones, higher values in overtones

B1 : amplitude of the FM modulation at the beginning of the note (range 0.06-16) small values result in minor variations of the sound texture. large values result in crazy sounds

B2: amplitude of the FM modulation at the end of the note (range 0.06-16) Give Beta2 a different value than beta1 to make the sound texture evolves in time.

T: speed at which the FM amplitude evolves from beta1 to beta 2 (range 8ms-2s) Small values give a short bang at the beginning of a note, large values a long and slow evolution.


The next thing we can control is the envelope of the sound generated by the synthesizer, the envelope plays a fundamental role in identifying and classifying sounds.

If we want a sound to sound more percussive, it will have a very fast attack and a very fast decay as well. If on the other hand we want a more ambient sound, we will have to have a much slower attack and decay of the signal. All this can be controlled with the envelope and the four potentiometers assigned to it.

A=attack: time for a tone to reach its maximum loudness (range 8ms-2s)

D=decay: time for a tone to go down to its steady level of loudness (range 8ms-2s)

S=sustain: steady level of loudness (range 0-100%)

R=release: time for a tone to die out (range 8ms-2s)

Code

To write the code we were inspired by a similar project. We hardly had to modify anything, because it had everything we needed. 

Downloads

Final Assembly

Proyecto Sintetizador Con Arduino
WhatsApp Image 2022-12-27 at 15.41.28.jpeg

In the final assembly we had several problems associated with the electronics, for example, musical notes sounded without touching any key. Besides, we had to modify the 3D printed box several times to fit all the internal components. 

STL Files