|
Autodesk Fusion 360Autodesk
|
|
|
arduino IDEArduino
|
|
|
OrCad Cadance |
Neko Punk Synth V2
Hey guys and welcome back, this is my Neko Punk Synth Version 2 which is a cat-themed Synth powered by an Arduino Nano and Mozzi Library.
By Changing the position of 5 sliding pots, Mozzi can produce much more complex and interesting growls, sweeps, and chorusing sounds. These sounds can be quickly and easily constructed from familiar synthesis units like oscillators, delays, and filters.
You can check out Mozzi Library from here- https://sensorium.github.io/Mozzi/
The Previous edition that I made a few weeks ago was based on the original Atari Punk Console was first made by Forrest Mims In 1980. It utilizes an astable multivibrator setup which triggers a monostable setup. by combining these two setups, we get a Stepped Tone Generator or an atari punk synth.
This was easy to make but I was not pleased with its result.
https://www.hackster.io/Arnov_Sharma_makes/atari-punk-synth-v2-8b9dd3
A year ago, I've made a similar synth with Mozzi Library which worked quite nicely so I thought why not use Mozzi in the V2 of Neko Punk Synth, to make things super cool, I used sliding pots which gives this synth its cyberpunk-ish looks.
Material Required
These were the things used in this built-
- Arduino Nano
- PAM8403 Audio AMP
- Custom PCB which was provided by PCBWAY
- Li-ion 5V Boost Module
- 3.7V Li-ion Cell
- 3D Printed Enclosure
- 4Ohm Speaker
- Slider Pots
Circuit Designing
V2 PCB was probably the simplest Circuit board that I have ever made.
It uses an Arduino Nano as a base Microcontroller, five slider pots are connected with Arduino nano.
D9 goes into the input of the PAM8403 Audio AMP Module and the output of PAM8403 is connected with two CON2 Pins so we can add Speaker with it.
This whole setup requires 5V to work.
To Power this setup, I have to use this Li-ion Cell Boost module that you can find online, these modules are very inexpensive and work pretty well.
It Boosts 3.7V of Li-ion Cell to constant 5V 1A or 2A for our MCU setup to work.
I prepared the PCB in my OrCad PCB Suite and added a few graphics to increase the aesthetic of the Board.
Getting the board from PCBWAY
I used PCBWAY PCB Service for this project. I uploaded the Gerber file of this project on PCBWAY's quote page.
For this Synth Board, I choose white solder mask color as I have added Quite a few round graphics and custom art on the TOP side of the Board.
Black silkscreen looks awesome with white soldermask color.
I received the PCBs in a week and the PCB quality was pretty great, This PCB is Huge and I like how the quality of these PCBs was not compromised because of size.
Checkout PCBWAY from here- https://www.pcbway.com/
PCB ASSEMBLY
Now this Board doesn't have any SMD Componenets so we only had to place everything on this board manually and solder them with a soldering iron.
I first gather all the materials and started the assembly process with Slide Potentiometers.
I then put all the Pots in their place from the top side and solder their pads from the bottom side of the PCB.
After this, I added Arduino Nano and PAM8403 modules in their place, and the assembly was pretty much completed.
Uploading Code
This is the main sketch of this project which is based on Mozzi Library.
/*
Example using 2 light dependent resistors (LDRs) to change
FM synthesis parameters, and a knob for fundamental frequency,
using Mozzi sonification library.
Demonstrates analog input, audio and control oscillators, phase modulation
and smoothing a control signal at audio rate to avoid clicks.
Also demonstrates AutoMap, which maps unpredictable inputs to a set range.
This example goes with a tutorial on the Mozzi site:
http://sensorium.github.io/Mozzi/learn/Mozzi_Introductory_Tutorial.pdf
The circuit:
Audio output on digital pin 9 (on a Uno or similar), or
check the README or http://sensorium.github.com/Mozzi/
Potentiometer connected to analog pin 0.
Center pin of the potentiometer goes to the analog pin.
Side pins of the potentiometer go to +5V and ground
Light dependent resistor (LDR) and 5.1k resistor on analog pin 1:
LDR from analog pin to +5V
5.1k resistor from analog pin to ground
Light dependent resistor (LDR) and 5.1k resistor on analog pin 2:
LDR from analog pin to +5V
5.1k resistor from analog pin to ground
Mozzi help/discussion/announcements:
https://groups.google.com/forum/#!forum/mozzi-users
Tim Barrass 2013.
This example code is in the public domain.
*/
#include <MozziGuts.h>
#include <Oscil.h> // oscillator
#include <tables/cos2048_int8.h> // table for Oscils to play
#include <Smooth.h>
#include <AutoMap.h> // maps unpredictable inputs to a range
// int freqVal;
// desired carrier frequency max and min, for AutoMap
const int MIN_CARRIER_FREQ = 22;
const int MAX_CARRIER_FREQ = 440;
const int MIN = 1;
const int MAX = 10;
const int MIN_2 = 1;
const int MAX_2 = 15;
// desired intensity max and min, for AutoMap, note they're inverted for reverse dynamics
const int MIN_INTENSITY = 700;
const int MAX_INTENSITY = 10;
// desired mod speed max and min, for AutoMap, note they're inverted for reverse dynamics
const int MIN_MOD_SPEED = 10000;
const int MAX_MOD_SPEED = 1;
AutoMap kMapCarrierFreq(0,1023,MIN_CARRIER_FREQ,MAX_CARRIER_FREQ);
AutoMap kMapIntensity(0,1023,MIN_INTENSITY,MAX_INTENSITY);
AutoMap kMapModSpeed(0,1023,MIN_MOD_SPEED,MAX_MOD_SPEED);
AutoMap mapThis(0,1023,MIN,MAX);
AutoMap mapThisToo(0,1023,MIN_2,MAX_2);
const int KNOB_PIN = 0; // set the input for the knob to analog pin 0
const int LDR1_PIN=1; // set the analog input for fm_intensity to pin 1
const int LDR2_PIN=2; // set the analog input for mod rate to pin 2
const int LDR3_PIN=4;
const int LDR4_PIN=3;
Oscil<COS2048_NUM_CELLS, AUDIO_RATE> aCarrier(COS2048_DATA);
Oscil<COS2048_NUM_CELLS, AUDIO_RATE> aModulator(COS2048_DATA);
Oscil<COS2048_NUM_CELLS, CONTROL_RATE> kIntensityMod(COS2048_DATA);
int mod_ratio = 5; // brightness (harmonics)
long fm_intensity; // carries control info from updateControl to updateAudio
// smoothing for intensity to remove clicks on transitions
float smoothness = 0.95f;
Smooth <long> aSmoothIntensity(smoothness);
void setup(){
// Serial.begin(115200); // set up the Serial output so we can look at the light level
startMozzi(); // :))
}
void updateControl(){
// freqVal = map(LDR3_PIN, 0, 1023, 1, 100);
int freqVal = mozziAnalogRead(LDR3_PIN); // value is 0-1023
int FRQ = mapThis(freqVal);
int knob2 = mozziAnalogRead(LDR4_PIN); // value is 0-1023
int knob2Val = mapThis(knob2);
// read the knob
int knob_value = mozziAnalogRead(KNOB_PIN); // value is 0-1023
// map the knob to carrier frequency
int carrier_freq = kMapCarrierFreq(knob_value);
//calculate the modulation frequency to stay in ratio
int mod_freq = carrier_freq * mod_ratio * FRQ;
// set the FM oscillator frequencies
aCarrier.setFreq(carrier_freq);
aModulator.setFreq(mod_freq);
// read the light dependent resistor on the width Analog input pin
int LDR1_value= mozziAnalogRead(LDR1_PIN); // value is 0-1023
// print the value to the Serial monitor for debugging
//Serial.print("LDR1 = ");
// Serial.print(LDR1_value);
// Serial.print("\t"); // prints a tab
int LDR1_calibrated = kMapIntensity(LDR1_value);
// Serial.print("LDR1_calibrated = ");
// Serial.print(LDR1_calibrated);
// Serial.print("\t"); // prints a tab
// calculate the fm_intensity
fm_intensity = ((long)LDR1_calibrated * knob2Val * (kIntensityMod.next()+128))>>8; // shift back to range after 8 bit multiply
// Serial.print("fm_intensity = ");
// Serial.print(fm_intensity);
// Serial.print("\t"); // prints a tab
// read the light dependent resistor on the speed Analog input pin
int LDR2_value= mozziAnalogRead(LDR2_PIN); // value is 0-1023
// Serial.print("LDR2 = ");
// Serial.print(LDR2_value);
// Serial.print("\t"); // prints a tab
// use a float here for low frequencies
float mod_speed = (float)kMapModSpeed(LDR2_value)/1000;
//Serial.print(" mod_speed = ");
// Serial.print(mod_speed);
kIntensityMod.setFreq(mod_speed);
// Serial.println(); // finally, print a carraige return for the next line of debugging info
}
int updateAudio(){
long modulation = aSmoothIntensity.next(fm_intensity) * aModulator.next();
return aCarrier.phMod(modulation);
}
void loop(){
audioHook();
}
The code is pretty long but basically, it runs on Mozzi Library which generates algorithmic music without the need for additional shields, message passing, or external synths. This library is pretty well documented so you can check that out from here and download it. install this library before uploading this sketch.
https://sensorium.github.io/Mozzi/
const int KNOB_PIN = 0; // set the input for the knob to analog pin 0
const int LDR1_PIN=1; // set the analog input for fm_intensity to pin 1
const int LDR2_PIN=2; // set the analog input for mod rate to pin 2
const int LDR3_PIN=4;
const int LDR4_PIN=3;
The POTs are connected on A0, A1, A2, A3, A4 and the Audio Out is D9.
Testing
Now after uploading the sketch, I added a 4ohm speaker with CON2 of the PAM8403 Module.
To power this setup temporarily, I've used a power bank to supply 5V 2A to Arduino Nano.
To Modulate sound, we just have to change the position of all 5 sliding pots and that's pretty much the whole testing process.
Next, we move on to the final assembly process.
3D Printed Enclosure
As for the Body of the Synth, we generally use a Box like enclosure that will house the speaker and electronics.
I had this idea of making a cat face on the front side to make it look like a BOX CAT, I added the cat's facial things like whiskers, nose, eyes on the front side.
I modeled the body in fusion360 and then 3D Printed each part on my ender 3.
I prepared the main body with Orange PLA and pupil, eyebrows, whiskers, and nose from BLACK PLA and the eyes from white PLA.
The print setting was normal as well, I used a 0.8mm nozzle with a 0.32mm layer height with an infill of 20% and support for the base body.
After printing all the parts, I used super glue to attach all the face parts to the base body.
FINAL ASSEMBLY
Now we start the main assembly by first adding we add a speaker onto the Base body with nuts and bolts.
Next, I added DC Jack and the rocker switch into the base body.
then we connect the Lithium Boost module with the DC jack and switch.
I then place all the stuff inside the body and add the main PCB from the bottom side with some M2 Screws and the assembly is completed.
RESULT
To Turn ON this setup, we just have to press the Rocker Switch and change the sliding pot position to modulate sound.
Check out my previous Synth Project from here- https://www.hackster.io/Arnov_Sharma_makes/a-better-arduino-synth-with-pam8403-audio-amplifier-f7561c
Thanks for reading this article and I'll be back with another project soon.
Peace
Neko Punk Synth V2
*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(0)
- 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
- WALKPi PCB Version Greetings everyone and welcome back, This is the WalkPi, a homebrew audio player that plays music fr...
- 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...
-
-
kmMiniSchield MIDI I/O - IN/OUT/THROUGH MIDI extension for kmMidiMini
72 0 0 -
DIY Laser Power Meter with Arduino
84 0 2 -
-
-
Box & Bolt, 3D Printed Cardboard Crafting Tools
120 0 2 -
-
A DIY Soldering Station Perfect for Learning (Floppy Soldering Station 3.0)
415 0 1 -
Custom Mechanic Keyboard - STM32
241 0 3