Project showcase
Arduino Synth

Arduino Synth

Arduino Synth is a project that consists of creating an 8-bit capacitive synthesizer.

  • 499 views
  • 1 comment
  • 4 respects

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)

Apps and online services

About this project

Video

This is a video that demonstrates how the capacitive synthesizer is working.

Demonstration of our Arduino Synth

Electronics

During this project, we will need:

  • ATmega328-PU
  • 3.5mm audio jack
  • ATmega328-PU holder
  • PCB copper
  • USB port type B
  • 1KΩ resistance
  • 1 Quartz 20 MHz

Arduino Programming

Program the ATmega328-PU using the Arduino Uno, then take it carefully as shown in the picture to install it on our new capacitive synth.

Code

Synthesizer.inoArduino
/*
  Synthesizer
  creating sound from electronics
  
  This example is part of the Fritzing Creator Kit: www.fritzing.org/creator-kit.
*/

int buzzerPin = 8;                             // piezo pin declaration
int potPin1 = 0;                               // potentiometer 1 pin declaration
int potPin2 = 1;                               // potentiometer 2 pin declaration

int toneHeight;                                // store the tone height
int lfo;                                       // store the frequency speed

/* lfo is a "low frequency oscillator" - so a frequency change depending on time */

void setup() {
  pinMode(buzzerPin, OUTPUT);                  // buzzerPin as output
}

void play(int myToneHeight) {                  // play method
    digitalWrite(buzzerPin, HIGH);             // piezo is switched on
    delayMicroseconds(myToneHeight);           // stopping time influenced by toneHeight 
    digitalWrite(buzzerPin, LOW);              // piezo is switched off
    delayMicroseconds(myToneHeight);           // stopping time influenced by toneHeight 
}

void loop() {
  toneHeight=analogRead(potPin1);              // toneheight is value of potentiometer 1
  lfo=analogRead(potPin2);                     // lfo is value of potentiometer 2
  
  for (int i = (lfo/10); i > 0; i--) {         // toneheight rising depending on lfo
    play(toneHeight);                          // execute play method
  }
  delayMicroseconds(lfo);                      // break
  for (int i = 0; i < lfo/10; i++) {           // toneheight sinking depending on lfo
    play(toneHeight);                          // execute play method
  }
}

Schematics

Arduino Synth Board On Eagle software
uploads2ftmp2f0eb3a433-4524-4da9-9a9a-aade0e96a7bc2fcapacitivesynth_T9CzIreh1l.brd

Comments

Similar projects you might like

Arduino MIDI Stepper Synth

Project tutorial by Jonathan Kayne

  • 20,253 views
  • 23 comments
  • 61 respects

Minimal MIDI Drum Kit with 3D Printer

Project tutorial by ryokosaka

  • 13,271 views
  • 1 comment
  • 35 respects

Controlling Servos with a Stylophone: Pitch Detection

Project tutorial by Keith

  • 643 views
  • 3 comments
  • 6 respects

Arduino UNO Guitar Pedal

Project tutorial by electrosmash

  • 55,823 views
  • 29 comments
  • 168 respects

Music Reactive LED Strip

Project showcase by buzzandy

  • 50,418 views
  • 74 comments
  • 117 respects
Add projectSign up / Login