Arduino Programable 5 Pedal Switcher: by Carran
Arduino Programable 5 Pedal Switcher: by Carran
by CarraN
-5 x chinese double relay modules (~ 15$) or better, -eventually some tools for wood/metal/plastic working
DPDT version (much less noisy)
-------------------------------------------------------------------------
-12 x chassis 6.3 female jack (~20$) -----------
-10 x leds (half of a different color) Here's the code part: (many thanks to Anton Efremoff
for his feedback and suggestions) Tip: don't forget to
-5 x 220 to 560 ohms resistor (peanuts...) add "//" on these two lines if you want to save your
preset after booting it up!
-some spare cable (...)
//for (int =0;i<512;i++)
~70$ if you don't have any of these as spare //EEPROM.write(i,0); It's here just for initialize
EEPROM memory in case of debugging Another vid from follower Massam here showing
working simulation
You''l have first to download and install the keypad.h
library here: -------------------------------------------------------------------------
-----------
A big THANK YOU to Armando Colangelo aka
4Knobs Effects for this code . Note his project is check out the outstanding band I play with:
based on a different approach that ommit the 3
positions switch and therefore adds 1 more selecting ZeK
switch (6 instead of 5).
1. made by livewir3
1 1
Download
https://www.instructables.com/ORIG/FCW/KPWD/IN7QVT3A/FCWKPWDIN7QVT3A.ino
…
Download
https://www.instructables.com/ORIG/FZ0/6RVH/ITWR8KIG/FZ06RVHITWR8KIG.ino
…
Did you use the code of five_pedal_looper.ino that comes at the end of the post ..?
neither popping, nor delay, just some noise without booster and some distortion pedals...
I am starting this project soon. However, I have a question. Why do I need the VOltage regulator
LM7805?
In this project it states buying one separately. I am looking at using an Arduino Mega and that
seems to have one built in. Will I still need a separate one?
Also will the power supply power everything including the Relays or does the relay need a
separate power supply. I am thinking of getting the dpdt relays as some people seem to have
experienced noise issues with the cheap ones.
Regards
Jim
Yes the regulator included in the Mega doesn't have enough power for the relays in my opinion but
It's your to test it and your welcome to share if it does. And yes I confirm the relays I've choosen in
this instructable had some noise issues. Take the ones Liwewire3 installed in his project. Cheers!
hi all did a quick write up on the looper build and use. may do an update later for now here it is.
including schematic and code. cheers
https://tt305.wordpress.com/
nice!
hey guys. here some pictures and the nearly finished product. 5 loops , 5 presets, 3 banks for now
but could be expanded for more. went with different dpdt relays as the spdt took to much space
and a lot of current.
NIIICE! good work mate! Can I include some of your pictures in this instructable?
I too have ordered the same dpdt and add some midi new features but all this soon..
This, to my surprise, manifests no switching noise whatsoever. What I've noticed instead is that it
picks hum like crazy and acts like a giant antenna. Me not putting things in an enclosure might be
the culprit, so I'll try to fix that and post and update as well.
I'm also waiting for the ready-made relay modules to compare them to my own solution.
I'm pretty sure you're right: a lot of noise come from those chinese relay modules! Hey, they're
aren't cheap for any reason...
I ordered other type, in fact dpdt ones, this way only half of the relays involved here are needed.
https://fr.aliexpress.com/item/DR21B01-2-2x-Ultra-...
cheers
ps: please send us some pictures of your work when finished
There we go, managed to upload it this time. I've drawn the board by hand for this one, so it's kinda
wonky, but I couldn't wait until monday to print it at work, lol.
Just got back from a trip, will try to fit an enclosure this week and see if it helps.
Oh and for the DPDT ones, I've ordered them as well, but might buy a few locally and try to make a
driver for them as well, to compare to the ready modules. The circuit in the Chinese modules looks
perfectly fine, so if they're really that bad, I'm suspecting the build quality issues as well. Perhaps
worth rechecking all the paths and components?
I put it in an enclosure and it seems to be working flawlessly. Still waiting for the parts for the big
prototype.
cheers
im using a l7805 2A to power the relay coils which is powered to a 9V 1A boss psa power suply. if i
turn all 8 relays on and leave them on after a minute or so the relays go of as the voltage has
droped to 3V from 5V regulator. im thinking that alot of power its been drawn to cause the voltage
to drop. the connections are the same as you have but if you are not seeing any issues im thiking
is these relays im using.
forget your boss power supply right now and go for a 9 or 12v, 3A ! Relays naturally eat a lot of
power. And put your l7805 a eatsink or fix it to the chassis (if it's made of metal).
My relays take around 80mA at 5V when closed (and they're the bulky ones capable of hundreds
of volts). 3A for 8 of them doesn't really sound right, unless the assembled relay boards are realyl
that bad.
hi bananu7 that's more acceptable. i got these cheap from ebay to try them but not worth it. 80mA
is still a lot but if it is no causing issues i would have gone with it. i think the 8 relay module i have
is faulty and im going with DPDT relays. thanks for the msg
thanks for the reply CarraN. I wanted to know if anyone seen similar problems with these relay
types. Throwing more power is not a solution for me. I'm powering my hole board with 5A supply
and using 3A to power a switcher is not a good solution. These relay coils are expected to draw 35
mA each going by spec. So all 8 ON you would expect no more than 0.5 A current draw. Not that I
believe the spec And you can't put more than 5V on them or the coil would go if they are speced at
5V. If no one here seen this issue I have a faulty relay module. thanks again for your help.
Great project! Is it possible to control the relays direct from the Arduino without the use of
footswitches?
---------------------
TLDR (and not entirely related to this project)
I'm building a switcher that controls the FX for every patch on my Boss MS-3 via an Arduino USB
Host. Why you ask? Mainly because switching between patches causes a ~28ms audible delay,
and while it has a stereo output, you can't select what effects go out of which output (ie FX left,
clean right). Sounds superfluous, but delving into this project has unlocked so many more
possibilities for my MS-3!
The MS-3 has 3 loop send/returns which is very cool, however, I'd also like to split the signal
before the MS3, sending a clean signal to an acoustic simulator->DI (and notreturning back to the
signal chain). It's basically simulating the MOEN GEC9, except it's not handling any audio signals -
yet! I'm setting presets like I do with the GEC9, except they toggle the FX on the MS-3's currently
selected patch giving one MS-3 patch multiple presets within it (in my case it'll be 5, just like this
project).
Arduino Programable 5 Pedal Switcher: Page 9
SO if Arduino can manage the relays directly this could open up more possibilities, namely
expanding the MS3's loops from 3 to ...well, the sky is potentially the limit! ;)
Oh yeah! sounds interesting, I dream it and they build it! I didn't know that MS-3 until you told me
about, thank you Alex!
So now your question: if I understood well, you'd want to "pilot" 5 external relays by the 4 presets
footswitches of the MS-3? is that right? Obviously you'll must add an arduino between and (surely)
It'll respond to midi messages thru usb... You're a lucky man because I've done another
instructable that can handle midi messages between arduino and boss devices, it's here:
https://www.instructables.com/id/Arduino-Based-Bos...
It'll be interesting to melt this two projects in another new one! If you have more questions don't be
affraid to ask.
see you
carraN
Almost right! It's a bit confusing I know. I want to pilot both MS3 and a relay (or multiple relays)
from a separate pedal board (with Adruino) with 5 footswitches which are programmable
subpatches (using buttons, like the GEC9) of the currently selected MS3 patch.
I am currently toggling 12 MS3 effects and save them to Arduino - success! - but I'm now thinking I
could make a 13th to toggle a relay that essentially allows/disallows a clean signal to be sent to my
acoustic simulator. So my question is: will a digital out from Arduino be able to toggle the relay
state? *fingers crossed*
ok! so yes!
Hi !
regarding the block diagram of the ms3 you can already do that, see below!
This is true - this was one of the first things I tested when I realised the in-built acoustic sim wasn't
able to be routed to a separate main output. So yes this approach works! But it means I sacrifice
one precious loop. 3 is already not enough (yes I know, I'm greedy) ;) Being able to have a 4th
would be great. There's even potential to expand to many more loops, where you could send from
MS3 L1 into a new chain managed by arduino, and back to MS3 L1 -- but this is really going to
crazy town... or is it?
Every time I have questions about some "new" hardware to aquire or whatever , I apply this simple
rule: Do I want it or do I need it ? So the answer come like the rain in springtime!
cheers
hi CarraN,
thanks for the fun project and great instructions. I made some changes/updates to the code to use
a click/hold button to substitute the 3way switch so the control can be done by foot (one click =
#include <Wire.h>
#include <EEPROM.h>
#include <Keypad.h>
#if LCDSCREEN == 1
#include <LiquidCrystal_I2C.h>
/**********************************************************/
LiquidCrystal_I2C lcd(0x3F, 16, 2); // set the LCD address to 0x3f for a 16 chars and 2 line display
/*********************************************************/
#endif
void setup() {
for(i=0; i<numberOfPedal; i++)
{
pinMode(ctrlButton, INPUT_PULLUP);
pinMode(relayPin[i], OUTPUT);
pinMode(ledPin[i], OUTPUT);
digitalWrite(relayPin[i],LOW); //pullup all relay outputs in case off low level relayboard
digitalWrite(ledPin[i],HIGH); //pullup all relay outputs in case off low level relayboard
delay(100);
digitalWrite(relayPin[i],HIGH); //pullup all relay outputs in case off low level relayboard
digitalWrite(ledPin[i],LOW); //pullup all relay outputs in case off low level relayboard
#if LCDSCREEN == 1
lcd.clear();
lcd.init(); //initialize the lcd
lcd.backlight(); //open the backlight
lcd.print("| DIY FX 5 |");
lcd.setCursor(0,1);
lcd.print("| LOOPER |");
delay(3000);
lcd.setCursor(0,0);
lcd.print(" | |: ");
lcd.setCursor(0,1);
lcd.print(" | |: ");
lcd.setCursor(5,0);
lcd.print("Pset");
lcd.setCursor(0,0);
lcd.print("Bank");
lcdprint ();
#endif
}
/*********************************************************/
boolean debounce(boolean last,int ctrlButton) {
boolean current = analogRead(ctrlButton);
if (last != current) {
delay(50);
current = analogRead(ctrlButton);
}
return current;
void loop() {
currentRead = debounce(lastRead,ctrlButton);
// int currentRead = digitalRead(ctrlButton);
//first pressed
if (currentRead == LOW && lastRead == HIGH ) {
onTime = millis();
}
singlePress();
doublePress();
}
holdPress();
}
switch (key)
{
case '0': // a to x
writeOut(0); // relay
break;
case '1':
writeOut(1);
break;
case '2':
writeOut(2);
break;
case '3':
writeOut(3);
break;
case '4':
writeOut(4);
break;
switch (key)
{
case '0':
memory(100+(bank*bankVariable),0); //addr, led
break;
case '1':
memory(200+(bank*bankVariable),1);
break;
case '2':
memory(300+(bank*bankVariable),2);
break;
case '3':
memory(400+(bank*bankVariable),3);
break;
case '4':
memory(500+(bank*bankVariable),4);
break;
}
}
/****************************** READ PRESET MODE */
if(key && preset == 3||preset == 0) // Check for a valid key.
{
switch (key)
{
case '0':
readPreset(100+(bank*bankVariable), 1, 0); // addr, pcNum, relay
break;
case '1':
readPreset(200+(bank*bankVariable), 2, 1);
break;
case '2':
readPreset(300+(bank*bankVariable), 3, 2);
break;
case '3':
readPreset(400+(bank*bankVariable), 4, 3);
break;
case '4':
readPreset(500+(bank*bankVariable), 5, 4);
break;
}
}
delay (100);
lastRead = currentRead;
void singlePress() {
// Serial.println("single press");
bank++;
#if LCDSCREEN == 1
lcdprint ();
#endif
if (bank == 1) { ledtoggle(8); }
if (bank == 2) { ledtoggle(9); }
if (bank == 3) { ledtoggle(10); }
if (bank == 4) { ledtoggle(11); }
if (bank == 5||bank == 0) { ledtoggle(12); }
}
single = 0;
}
}
void doublePress() {
digitalWrite(8, LOW);
digitalWrite(10, LOW);
digitalWrite(12, LOW);
#if LCDSCREEN == 1
lcdprint ();
#endif
single = 0;
lastSwitchTime = millis();
}
}
void holdPress() {
ledtoggle(A3);
#if LCDSCREEN == 1
lcd.setCursor(5,0);
lcd.print("Set ");
#endif
}
if (preset == 2) {
ledtoggle(A2);
#if LCDSCREEN == 1
lcd.setCursor(5,0);
lcd.print("Prog");
#endif
}
if (preset == 3||preset == 0) {
ledtoggle(A1);
#if LCDSCREEN == 1
lcd.setCursor(5,0);
lcd.print("Pset");
#endif
}
hold = 0;
}
}
/*********************************************************/
void midiProg(byte status, int data)
{
Serial.write(status);
Serial.write(data);
}
/*********************************************************/
}
ledtoggle(ledPin[led]);
#if LCDSCREEN == 1
lcd.setCursor(8,1);
lcd.print(led + 1);
#endif
/*********************************************************/
#if LCDSCREEN == 1
lcdprint ();
#endif
/*********************************************************/
#if LCDSCREEN == 1
lcdprint ();
lcd.setCursor(8,1);
lcd.print(led + 1);
#endif
void lcdprint() {
#if LCDSCREEN == 1
loop1 = !digitalRead (8);
loop2 = !digitalRead (9);
loop3 = !digitalRead (10);
loop4 = !digitalRead (11);
loop5 = !digitalRead (12);
lcd.setCursor(3,1);
lcd.print(bank);
lcd.setCursor(8,1);
lcd.print(">");
lcd.setCursor(11,0);
lcd.print("Loops");
lcd.setCursor(11,1);
lcd.print(loop1);
lcd.setCursor(12,1);
lcd.print(loop2);
lcd.setCursor(13,1);
lcd.print(loop3);
lcd.setCursor(14,1);
lcd.print(loop4);
lcd.setCursor(15,1);
lcd.print(loop5);
#endif
Armando did that yet (see the loopino code here) but thanks mate!
cheers
I did check armondos interestning work but i wanted something simple for what i needed to do and
get to speed with arduino :)
that is my plan
hein66
Hi CarraN,
Ok, that is a good idea,
So I have made a short image.
Additional
I will mention, that always must be a connect through between input jack
and output jack.
Is your
solution suitable for me ?
Hein66