Introduction: Programmable 8 Loops Pedal Switcher With Arduino Mega2560
last update: february 17 2016
This is the second part of my previous tutorial about how to do simple programable pedals switcher (or looper) now with a MEGA2560 Arduino to achieve 8 storable loops on 8 presets.
Note that is possible to improve the number of total loops. Just keep in mind that it add more lines to the code and more cost on hardware. That said, improving the possibilities in the mean time!
Number of max loops = total number of digital pins - 5 /3 (minus 3 pins for selecting mode and the two Rx/Tx)
In this tutorial we have 69 digital pins - 5 /3 = (21.33) so 21 loops available. Just think you can add more interesting options like increasing the number of presets, add a display or read pot values for expression pedals by exemple, thus decreasing the number of available loops. But frankly: "who needs 21 pedals on a pedalboard?"
Sure, they are...
Note: this project DON'T allows to reverse order of the pedals. This involves to matrix all that! That means: number of relays = (quantity of pedals) X (quantity of pedals)!!! and a lot of nightmares and disillusion! But actually you can consider 2 (or more) groups of loops, ie: one before the jack input of your amp and the other on the fx loop, if your amp is provided obviously! The only thing to do is to add a couple of chassis jack between two relays, the choice is yours. This is called the "breaking technique".
We can also use pin D1(Tx) for Midi communication.
So, in order to keep it as simple as wanted, see the schematic of this version of the project.
Caution: some noise issues where experienced by some
builders (me included). I suspect those cheap and chinese relays aren't made for audio signals. The ideal relays should be some called DPDT but for instance few advices can be followed: use shielded cables all along the signal path, ensure all the circuit in a metallic box use caps (usually 10u) for decoupling and/or add some high resistances to all in and outs jacks. Adding a booster pedal in front of the input may strongly reduce these noise...
-1 chinese Arduino Mega 2560 (keep your original for test other projects)
-8 momentary switches
-1 LM7805 regulator (5v.)
-1 three ways selector
-8 double relay modules or
-1 sixteen relays module (9 / 12 volts) or 1 eight dpdt relay bord (it's a lot expensiver)
-18 chassis 6.3 female jack (minimum) / 20 if you want to add the "breaking technique"
-1 9V-12v /3A power supply
-16 leds and 470 ohms resistors
-1 MIDI din + 1 220 ohms resistor (for optional MIDI out)
-spare cable or chinese Dupont wire (male to female)
(not included: the box)
-soldering station/ iron
-position "A" from the selector (cases a,b,c,d,e,f,g,h on the sketch) -> select wich pedal to loop ON (1,2... 8)
-position "B" (cases i,j,k,l,m,n,o,p) -> select the number of the preset (1 to 8) where you want to preserve the loops (the led of the preset you choose will lit 2 or 3 times)
-position "C" (cases q,r,s,t,u,v,w,x)-> read the preset (1 to 8) you stored previously
needed Arduino library:
In case your LCD library doesn't work with this sketch, download these 2 libraries HERE
Step 1: Programmable MEGA2560 Arduino Based 8 Pedals Looper
You can even add some pot reading for expression pedals: there's enough room for it! Or even 8 more leds that can indicate wich effect loop is engaged when in "read" mode (in parallel to relays). Some follower suggested me to implement the possibility to select in wich "pre" or "post preamp" mode each effect can be selected (google for "4 cables" technique). This is also possible but adding a 16 relays module that will take more space and weight on the box. I suggest choosing "16 x DPDT relay module" to limit space waste but I must admit that I didn't found any cheap of these (~100$/piece) !
For this simple project, I suggest you to buy a cheap chinese copy of this board as you can find it for ~7$. You'll save your original board for arduino practicing.
So, here is the code for this beast as an example (choose your own pins):
Many thanx to PascalP3 to have corrected and improved this sketch!
Step 2: Hardware Building
Here's an example with 5 switches and 1 function selector and another 8 loops project by David B1 who gently share pictures of his great job! Thanks to him.