Arduino Synth V3
Hey guys what's up!
So this is my Arduino Synth V3 which is a DIY Synth powered by an Arduino Nano.
It has 12 push switches along with two ON/OFF switches for changing modes and two potentiometers that change pitch and tempo.
By changing the Pitch Potentiometer, we can change the output waveform that makes cool sci-fi sounds by pressing any 12 buttons. It works pretty much like a normal keyboard synth.
I've been making synths for a while now, made two synths that work identically to this one but they all use Mozi Library to run but this one uses simple code that modulates output by the state of buttons and switches.
Links for previous versions-
https://www.hackster.io/Arnov_Sharma_makes/simple-arduino-piano-4e51d7
https://www.hackster.io/Arnov_Sharma_makes/arduino-atari-punk-synth-2934e8
https://www.hackster.io/Arnov_Sharma_makes/atari-punk-synth-v2-8b9dd3
This article is about the whole built process of this synth so let's get started.
Material Required
Following were the things I used in this build-
- Custom PCB
- Arduino Nano
- Potentiometer
- ON-OFF SWITCH
- Push Buttons
- Speaker 4 Ohms
- Header Pins Female
SCHEMATIC
The schematic of this Board is a simple one, Arduino Nano is connected with 12 Push Buttons. each of the Push Buttons is connected with an IO Port, when we press any button, it pulls down the IO Port to GND.
The same is with two ON-OFF Switch but when we press them, they keep the IO Pin pulled down for a longer duration. then two Pots are connected with A4 and A5.
PAM8403 Module is connected with output Pin A2, it amplifies the signal and makes it louder.
PCB Design
After finalizing the Schematic, I exported the netlist and started working on the PCB Design.
As for the shape, I took the aesthetics and overall looks from a generic keyboard, Arduino Nano is placed on the TOP right corner, and the speaker is placed on the TOP left side.
I've added a few fake keys in the design as well, I placed buttons on these fake keys. maybe the future version will have actual capacitive touch keys.
Also, I've removed soldermask from fake keys so the copper area will be unfilled which will give a super cool silver look as the board will be covered by HASL.
Getting PCBs from PCBWAY
After finalizing the PCB, I send the Gerber data to PCBWAY for samples.
I choose white soldermask with black silkscreen as white PCB looks cool in general if we add silkscreen patterns in black color.
I received the PCBs in a fast week. As for the PCB Quality, it was superb.
Been using their service for a while and I have to say, it's pretty decent for getting started.
Just see the intricate design of mine, I placed many unusual patterns on the PCB like irregular outlines and shapes of soldermask which is hard to make but they did an awesome job of making the PCBs with no problem whatsoever.
Checkout PCBWAY from here- https://www.pcbway.com/
PCB ASSEMBLY
Before starting the PCB Assembly, we need to gather all the components we will use in this project.
Adding Header pins, Switches, and Pots
We start first by adding Header Pins for Arduino Nano, switches, and pots in their place.
Adding Push Buttons
Next, we add 12 Push Buttons in their place one by one.
Soldering the components
After placing all the switches and header pins in their place, we solder their terminals to the PCB by using a regular soldering iron and solder wire.
Adding PAM8403 Module
Next, we add the PAM8403 Module in its place by using some male header pins, we add male header pins on the PCB and then add PAM8403 on the header pins.
at last, we solder the pins and secure the module in its place permanently.
Adding Speaker
At last, we add a speaker in its place.
I added a hole on the PCB, the goal here was to add a speaker from the backside through this hole. Speaker is glued to the PCB and then we connect the terminals of the speaker with PAM8403 CON2 Port through two jumper wires.
After doing this, the PCB is completed.
Result of PCB ASSEMBLY
Here's the result so far, all the components are soldered and the board is completed. It looks pretty much like an Arduino Nano Sheild or addon board.
The next step is to add Arduino Nano to this board and flash the main sketch into the MCU.
Main CODE
Here's the main Sketch that I used.
int C = 2;
int CS = 3;
int D = 4;
int DS = 5;
int E = 6;
int F = 7;
int FS = 8;
int G = 9;
int GS = 10;
int A = 11;
int AS = 12;
int B = 13;
int octabajo = 0;
int octarriba = 1;
int tiempo = analogRead(A4);
int pitch_bend = analogRead(A5);
int c = 262;
int cs = 277;
int d = 294;
int ds = 311;
int e = 330;
int f = 349;
int fs = 370;
int g = 392;
int gs = 415;
int a = 440;
int as = 466;
int b = 494;
void setup() {
// INPUT CONFIG
pinMode(C, INPUT_PULLUP);
pinMode(CS, INPUT_PULLUP);
pinMode(D, INPUT_PULLUP);
pinMode(DS, INPUT_PULLUP);
pinMode(E, INPUT_PULLUP);
pinMode(F, INPUT_PULLUP);
pinMode(FS, INPUT_PULLUP);
pinMode(G, INPUT_PULLUP);
pinMode(GS, INPUT_PULLUP);
pinMode(A, INPUT_PULLUP);
pinMode(AS, INPUT_PULLUP);
pinMode(B, INPUT_PULLUP);
pinMode(octabajo, INPUT_PULLUP);
pinMode(octarriba, INPUT_PULLUP);
pinMode(A4, INPUT_PULLUP);
// OUTPUT CONFIG
pinMode(A2, OUTPUT);
// start serial port
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
digitalRead(0);
digitalRead(1);
Serial.println(analogRead(A4));
if (!digitalRead(C)) {
tone(A2, c+(analogRead(A5)/5));
delay(analogRead(A4));
digitalRead(C);
}
if (!digitalRead(C)&&!digitalRead(octabajo)) {
tone(A2, c/2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(C);
}
if (!digitalRead(C)&&!digitalRead(octarriba)) {
tone(A2, c*2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(C);
}
digitalRead(CS);
if (!digitalRead(CS)) {
tone(A2, cs+(analogRead(A5)/5));
delay(analogRead(A4));
digitalRead(CS);
}
if (!digitalRead(CS)&&!digitalRead(octabajo)) {
tone(A2, cs/2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(CS);
}
if (!digitalRead(CS)&&!digitalRead(octarriba)) {
tone(A2, cs*2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(CS);
}
digitalRead(D);
if (!digitalRead(D)) {
tone(A2, d+(analogRead(A5)/5));
delay(analogRead(A4));
digitalRead(D);
}
if (!digitalRead(D)&&!digitalRead(octabajo)) {
tone(A2, d/2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(D);
}
if (!digitalRead(D)&&!digitalRead(octarriba)) {
tone(A2, d*2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(D);
}
digitalRead(DS);
if (!digitalRead(DS)) {
tone(A2, ds+(analogRead(A5)/5));
delay(analogRead(A4));
digitalRead(DS);
}
if (!digitalRead(DS)&&!digitalRead(octabajo)) {
tone(A2, ds/2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(DS);
}
if (!digitalRead(DS)&&!digitalRead(octarriba)) {
tone(A2, ds*2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(DS);
}
digitalRead(E);
if (!digitalRead(E)) {
tone(A2, e+(analogRead(A5)/5));
delay(analogRead(A4));
digitalRead(E);
}
if (!digitalRead(E)&&!digitalRead(octabajo)) {
tone(A2, e/2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(E);
}
if (!digitalRead(E)&&!digitalRead(octarriba)) {
tone(A2, e*2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(E);
}
digitalRead(F);
if (!digitalRead(F)) {
tone(A2, f+(analogRead(A5)/5));
delay(analogRead(A4));
digitalRead(F);
}if (!digitalRead(F)&&!digitalRead(octabajo)) {
tone(A2, f/2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(F);
}
if (!digitalRead(F)&&!digitalRead(octarriba)) {
tone(A2, f*2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(F);
}
digitalRead(FS);
if (!digitalRead(FS)) {
tone(A2, fs+(analogRead(A5)/5));
delay(analogRead(A4));
digitalRead(FS);
}
if (!digitalRead(FS)&&!digitalRead(octabajo)) {
tone(A2, fs/2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(FS);
}
if (!digitalRead(FS)&&!digitalRead(octarriba)) {
tone(A2, fs*2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(FS);
}
digitalRead(G);
if (!digitalRead(G)) {
tone(A2, g+(analogRead(A5)/5));
delay(analogRead(A4));
digitalRead(G);
}
if (!digitalRead(G)&&!digitalRead(octabajo)) {
tone(A2, g/2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(G);
}
if (!digitalRead(G)&&!digitalRead(octarriba)) {
tone(A2, g*2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(G);
}
digitalRead(GS);
if (!digitalRead(GS)) {
tone(A2, gs+(analogRead(A5)/5));
delay(analogRead(A4));
digitalRead(GS);
}
if (!digitalRead(GS)&&!digitalRead(octabajo)) {
tone(A2, gs/2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(GS);
}
if (!digitalRead(GS)&&!digitalRead(octarriba)) {
tone(A2, gs*2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(GS);
}
digitalRead(A);
if (!digitalRead(A)) {
tone(A2, a+(analogRead(A5)/5));
delay(analogRead(A4));
digitalRead(A);
}
if (!digitalRead(A)&&!digitalRead(octabajo)) {
tone(A2, a/2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(A);
}
if (!digitalRead(A)&&!digitalRead(octarriba)) {
tone(A2, a*2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(A);
}
digitalRead(AS);
if (!digitalRead(AS)) {
tone(A2, as+(analogRead(A5)/5));
delay(analogRead(A4));
digitalRead(AS);
}
if (!digitalRead(AS)&&!digitalRead(octabajo)) {
tone(A2, as/2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(AS);
}
if (!digitalRead(AS)&&!digitalRead(octarriba)) {
tone(A2, as*2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(AS);
}
digitalRead(B);
if (!digitalRead(B)) {
tone(A2, b+(analogRead(A5)/5));
delay(analogRead(A4));
digitalRead(B);
}
if (!digitalRead(B)&&!digitalRead(octabajo)) {
tone(A2, b/2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(B);
}
if (!digitalRead(B)&&!digitalRead(octarriba)) {
tone(A2, b*2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(B);
}
noTone(A2);
}
We first add Arduino Nano in its place and then flash it with the code, result will be a working synth playing random humms, we can alter the sound by pressing buttons or modulating the potentiometers or ON/OFF Switch.
RESULT
Here's the overall result, watch the video for the demo.
This is it for today folks, stay tuned and I'll be back with a new project soon.
Special thanks to PCBWAY for supporting this project, Check them out for getting great PCB Service for less cost.
Peace
int C = 2;
int CS = 3;
int D = 4;
int DS = 5;
int E = 6;
int F = 7;
int FS = 8;
int G = 9;
int GS = 10;
int A = 11;
int AS = 12;
int B = 13;
int octabajo = 0;
int octarriba = 1;
int tiempo = analogRead(A4);
int pitch_bend = analogRead(A5);
int c = 262;
int cs = 277;
int d = 294;
int ds = 311;
int e = 330;
int f = 349;
int fs = 370;
int g = 392;
int gs = 415;
int a = 440;
int as = 466;
int b = 494;
void setup() {
// INPUT CONFIG
pinMode(C, INPUT_PULLUP);
pinMode(CS, INPUT_PULLUP);
pinMode(D, INPUT_PULLUP);
pinMode(DS, INPUT_PULLUP);
pinMode(E, INPUT_PULLUP);
pinMode(F, INPUT_PULLUP);
pinMode(FS, INPUT_PULLUP);
pinMode(G, INPUT_PULLUP);
pinMode(GS, INPUT_PULLUP);
pinMode(A, INPUT_PULLUP);
pinMode(AS, INPUT_PULLUP);
pinMode(B, INPUT_PULLUP);
pinMode(octabajo, INPUT_PULLUP);
pinMode(octarriba, INPUT_PULLUP);
pinMode(A4, INPUT_PULLUP);
// OUTPUT CONFIG
pinMode(A2, OUTPUT);
// start serial port
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
digitalRead(0);
digitalRead(1);
Serial.println(analogRead(A4));
if (!digitalRead(C)) {
tone(A2, c+(analogRead(A5)/5));
delay(analogRead(A4));
digitalRead(C);
}
if (!digitalRead(C)&&!digitalRead(octabajo)) {
tone(A2, c/2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(C);
}
if (!digitalRead(C)&&!digitalRead(octarriba)) {
tone(A2, c*2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(C);
}
digitalRead(CS);
if (!digitalRead(CS)) {
tone(A2, cs+(analogRead(A5)/5));
delay(analogRead(A4));
digitalRead(CS);
}
if (!digitalRead(CS)&&!digitalRead(octabajo)) {
tone(A2, cs/2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(CS);
}
if (!digitalRead(CS)&&!digitalRead(octarriba)) {
tone(A2, cs*2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(CS);
}
digitalRead(D);
if (!digitalRead(D)) {
tone(A2, d+(analogRead(A5)/5));
delay(analogRead(A4));
digitalRead(D);
}
if (!digitalRead(D)&&!digitalRead(octabajo)) {
tone(A2, d/2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(D);
}
if (!digitalRead(D)&&!digitalRead(octarriba)) {
tone(A2, d*2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(D);
}
digitalRead(DS);
if (!digitalRead(DS)) {
tone(A2, ds+(analogRead(A5)/5));
delay(analogRead(A4));
digitalRead(DS);
}
if (!digitalRead(DS)&&!digitalRead(octabajo)) {
tone(A2, ds/2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(DS);
}
if (!digitalRead(DS)&&!digitalRead(octarriba)) {
tone(A2, ds*2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(DS);
}
digitalRead(E);
if (!digitalRead(E)) {
tone(A2, e+(analogRead(A5)/5));
delay(analogRead(A4));
digitalRead(E);
}
if (!digitalRead(E)&&!digitalRead(octabajo)) {
tone(A2, e/2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(E);
}
if (!digitalRead(E)&&!digitalRead(octarriba)) {
tone(A2, e*2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(E);
}
digitalRead(F);
if (!digitalRead(F)) {
tone(A2, f+(analogRead(A5)/5));
delay(analogRead(A4));
digitalRead(F);
}if (!digitalRead(F)&&!digitalRead(octabajo)) {
tone(A2, f/2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(F);
}
if (!digitalRead(F)&&!digitalRead(octarriba)) {
tone(A2, f*2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(F);
}
digitalRead(FS);
if (!digitalRead(FS)) {
tone(A2, fs+(analogRead(A5)/5));
delay(analogRead(A4));
digitalRead(FS);
}
if (!digitalRead(FS)&&!digitalRead(octabajo)) {
tone(A2, fs/2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(FS);
}
if (!digitalRead(FS)&&!digitalRead(octarriba)) {
tone(A2, fs*2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(FS);
}
digitalRead(G);
if (!digitalRead(G)) {
tone(A2, g+(analogRead(A5)/5));
delay(analogRead(A4));
digitalRead(G);
}
if (!digitalRead(G)&&!digitalRead(octabajo)) {
tone(A2, g/2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(G);
}
if (!digitalRead(G)&&!digitalRead(octarriba)) {
tone(A2, g*2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(G);
}
digitalRead(GS);
if (!digitalRead(GS)) {
tone(A2, gs+(analogRead(A5)/5));
delay(analogRead(A4));
digitalRead(GS);
}
if (!digitalRead(GS)&&!digitalRead(octabajo)) {
tone(A2, gs/2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(GS);
}
if (!digitalRead(GS)&&!digitalRead(octarriba)) {
tone(A2, gs*2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(GS);
}
digitalRead(A);
if (!digitalRead(A)) {
tone(A2, a+(analogRead(A5)/5));
delay(analogRead(A4));
digitalRead(A);
}
if (!digitalRead(A)&&!digitalRead(octabajo)) {
tone(A2, a/2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(A);
}
if (!digitalRead(A)&&!digitalRead(octarriba)) {
tone(A2, a*2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(A);
}
digitalRead(AS);
if (!digitalRead(AS)) {
tone(A2, as+(analogRead(A5)/5));
delay(analogRead(A4));
digitalRead(AS);
}
if (!digitalRead(AS)&&!digitalRead(octabajo)) {
tone(A2, as/2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(AS);
}
if (!digitalRead(AS)&&!digitalRead(octarriba)) {
tone(A2, as*2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(AS);
}
digitalRead(B);
if (!digitalRead(B)) {
tone(A2, b+(analogRead(A5)/5));
delay(analogRead(A4));
digitalRead(B);
}
if (!digitalRead(B)&&!digitalRead(octabajo)) {
tone(A2, b/2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(B);
}
if (!digitalRead(B)&&!digitalRead(octarriba)) {
tone(A2, b*2+((analogRead(A5)/5)));
delay(analogRead(A4));
digitalRead(B);
}
noTone(A2);
}
Arduino Synth V3
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
- Comments(0)
- Likes(1)
- Andrei Varabyou Aug 07,2023
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by Arnov Arnov sharma
- Delete Button XL Greetings everyone and welcome back, and here's something fun and useful.In essence, the Delete Butt...
- Arduino Retro Game Controller Greetings everyone and welcome back. Here's something fun.The Arduino Retro Game Controller was buil...
- Super Power Buck Converter Greetings everyone and welcome back!Here's something powerful, The SUPER POWER BUCK CONVERTER BOARD ...
- Pocket Temp Meter Greetings and welcome back.So here's something portable and useful: the Pocket TEMP Meter project.As...
- Pico Powered DC Fan Driver Hello everyone and welcome back.So here's something cool: a 5V to 12V DC motor driver based around a...
- Mini Solar Light Project with a Twist Greetings.This is the Cube Light, a Small and compact cube-shaped emergency solar light that boasts ...
- PALPi V5 Handheld Retro Game Console Hey, Guys what's up?So this is PALPi which is a Raspberry Pi Zero W Based Handheld Retro Game Consol...
- DIY Thermometer with TTGO T Display and DS18B20 Greetings.So this is the DIY Thermometer made entirely from scratch using a TTGO T display board and...
- Motion Trigger Circuit with and without Microcontroller GreetingsHere's a tutorial on how to use an HC-SR505 PIR Module with and without a microcontroller t...
- Motor Driver Board Atmega328PU and HC01 Hey, what's up folks here's something super cool and useful if you're making a basic Robot Setup, A ...
- Power Block Hey Everyone what's up!So this is Power block, a DIY UPS that can be used to power a bunch of 5V Ope...
- Goku PCB Badge V2 Hey everyone what's up!So here's something SUPER cool, A PCB Board themed after Goku from Dragon Bal...
- RGB Mixinator V2 Hey Everyone how you doin!So here's a fun little project that utilizes an Arduino Nano, THE MIXINATO...
- Gengar PCB Art Hey guys and how you doing!So this is the GENGAR PCB Badge or a Blinky Board which is based around 5...
- R2D2 Mini Edition So here's something special, A Mini R2D2 PCB that speaks ASTROMECH.Astromech is a fictional language...
- C-3PO Blinky Board Hey guys and how you doing!So this is the C3P0 PCB Badge or a Blinky Board which is based around 555...
- WALKPi Breadboard Version Greetings everyone and welcome back, Here's something loud and musical.Similar to a traditional walk...
- BOXcilloscope Greetings to everyone, and welcome back.This is BOXcilloscope, a homemade portable oscilloscope that...
-
-
Helium IoT Network Sensor Development board | H2S-Dev V1.2
91 0 0 -
-
-
-
-
-
3D printed Enclosure Backplate for Riden RD60xx power supplies
176 1 1