Programmable FX Switcher Looper, DIY low cost, using Arduino  [documentation]

Original effects with schematics, layouts and instructions, freely contributed by members or found in publications. Cannot be used for commercial purposes without the consent of the owners of the copyright.
Post Reply
User avatar
floris
Cap Cooler
Information
Posts: 474
Joined: 14 Oct 2007, 12:05
Has thanked: 231 times
Been thanked: 72 times

Post by floris »

Programmable FX Looper with Arduino Uno, Momentary Foot-switches and DPDT Relays boards - by Flo - 2016-03-19:

See attachment (FX_Switcher_Flo_v11.zip) for the source code.

You can use and modify it for private purposes, please not for commercial usage without proper contacting me.
Please be gentle with her! :D
// Copyright (c) by Floris van Rijswijk (aka floris, Flo, floris0987654321, flo0987654321).
// This work is licensed under a BSD style license.

// What's this program about:
// FX switcher:
// - Is a program for the Arduino Uno.
// - To enable or bypass "true-bypass" guitar effects Loopers via relays controlled by Arduino output pins.
// - With footswitch Buttons connected to Arduino input pins, using stored Presets and Banks of Presets.

You need:
- Arduino Uno is a low cost preassembled uController that can be programmed to do all sorts of iterface jobs with the "real world", like handling buttons and driving (relay) outputs.
Note: Probably other Arduino boards are fine to use, but I have only used the Arduino Uno.
- Relays DPDT boards can be found on eBay, low cost, preassembled (with LEDs) and good for FX switchers.
- Momentary footswitches (simple SPST will do) can be found on eBay. They can be pricey if you want quality, but low buget ones are there too.
- Enclosure. Hammond box or something that will fit the footswitches, jacks, electronics.
- Jacks, DC bus, etc.
- Beware that Arduino Uno also needs a power supply. 5V DC. I have only run it from USB, not standalone yet.
- Power supply for the relays boards. Those relays can use a lot of current, so to have a good 5V DC power supply is a must.
- A lot of time to make the enclosure and wire the thing up.

---

FX_Switcher_Flo_v11.zip contains 1 directory, containing 5 source files:
Electronics\Arduino\Projects - Flo\FX Switcher - Flo\FX_Switcher_Flo_v11\
FX_Switcher_Flo_v11.ino
ManyButtons.cpp
ManyButtons.h
OneSoftButton.cpp
OneSoftButton.h

---

Load the project (FX_Switcher_Flo_v11.ino) into the Arduino Uno IDE and use to upload the program into the Arduino Uno:
https://www.arduino.cc/en/Guide/Environment

---

Documentation is in the source files.
Documentation starter:

// What's this program about:
// FX switcher:
// - Is a program for the Arduino Uno.
// - To enable or bypass "true-bypass" guitar effects Loopers via relais controlled by Arduino output pins.
// - With footswitch Buttons connected to Arduino input pins, using stored Presets and Banks of Presets.

// Definitions:
// Bank: Is a fixed collection of presets.
// Preset: Is a collection of Looper states (enabled/bypass, on/off).
// Presets: Is a collection of all presets that are stored and can be selected.
// Looper: Is a true-bypass looper, controlled by a relais which is connected to an Arduino output pin.
// Button: Is a momentary footswitch, connected to an Arduino input pin, that is used to select a Preset or program a Preset by enabling/bypassing Loopers.

// Some assumptions on hardware and software:
// - There is (currently) support for max 8 footswitch Buttons.
// - Probably one needs at least 4 Buttons for the FX Switcher to be useful.
// - There need to be as many Loopers as there are Buttons.
// - One can only select as many Banks as there are Buttons.
// - One can only select as many Presets in a Bank as there are Buttons.
// - This makes the max nr of presets: 8*8=64.

// User Interface: Actions => Reactions
// - Select a stored preset by clicking a footswitch Button once.
// => LED indicating the nr of the selected Preset within the current Bank will flash two times.
// => LEDs at each Looper show the which Looper is enabled within the selected Preset.
// - Select a stored preset for change (programming) by pressing a footswitch Button for at least 2 seconds.
// => All LEDs will flash once.
// => LEDs at each Looper show which Looper is enabled within the selected Preset.
// - Change (program) a stored preset by enabling/bypassing the effect loopers by clicking the footswitch Buttons.
// => LEDs at each Looper show which Looper is enabled within the programmed Preset.
// - Store a changed preset by pressing a footswitch Button for at least 2 seconds.
// => All LEDs will flash twice.
// => LEDs at each Looper show which Looper is enabled within the Preset to be programmed.
// - Select a Bank (of presets) by double clicking a footswitch Button.
// => LED indicating the nr of the selected Bank will flash four times.


Please comment. I am curious to know who will build one. I am here to help out.

Regards,
Floris
Attachments
FX_Switcher_Flo_v11.zip
Programmable FX Looper with Aruino Uno and DPDT Relais boards - by Flo - 2016-03-19
(13.48 KiB) Downloaded 588 times
Last edited by floris on 19 Mar 2016, 21:13, edited 8 times in total.

User avatar
floris
Cap Cooler
Information
Posts: 474
Joined: 14 Oct 2007, 12:05
Has thanked: 231 times
Been thanked: 72 times

Post by floris »

Attachments
Arduino Uno on eBay
Arduino Uno on eBay
ArduinoUno.jpg (10.35 KiB) Viewed 6396 times
Last edited by floris on 19 Mar 2016, 20:44, edited 3 times in total.

User avatar
floris
Cap Cooler
Information
Posts: 474
Joined: 14 Oct 2007, 12:05
Has thanked: 231 times
Been thanked: 72 times

Post by floris »

I see DPDT relays boards on eBay with 4 or 8 relays, similair to what I have bought for this project:
https://www.ebay.com/sch/i.html?_sop=15 ... nc&LH_FS=1

Four DPDT Signal Relay Module Board, 5V version
https://www.ebay.com/itm/Four-DPDT-Sign ... 1415972779
$20,-

8 DPDT Signal Relay Module Board, DC5V Version
https://www.ebay.com/itm/8-DPDT-Signal- ... 0579791463
$40,-
Attachments
8 DPDT Relays boards on eBay, 5V for Arduino
8 DPDT Relays boards on eBay, 5V for Arduino
8.jpg (8.24 KiB) Viewed 6396 times
4 DPDT Relays boards on eBay, 5V for Arduino
4 DPDT Relays boards on eBay, 5V for Arduino
4.jpg (12.8 KiB) Viewed 6396 times

User avatar
floris
Cap Cooler
Information
Posts: 474
Joined: 14 Oct 2007, 12:05
Has thanked: 231 times
Been thanked: 72 times

Post by floris »

Overview of the various parts and the connections in between:

// Connections between the hardware parts:
// - Input (pin A0 by default):
// Many switches (momentary footswitches, "buttons") on one Arduino input pin.
// Make a resistor ladder with multiple 1k resistors in series, between 5V and Ground.
// Connect each switch on one side, to a point on the resistor ladder.
// Connect the other sides of the switches together and connect that to 1 input pin on the Arduino (A0 by default).
// The Arduino A0 pin will use it's internal pullup resistor
// (see constructor in ManyButtons.cpp).
// Resistor ladder of 1K Ohm resistors in series beteween +5V and Ground.
// - Output:
// Pins [6, 13] are used as output pins. Each can be connected to a control line of a Relay.
Attachments
Overview of the various parts and the connections in between - FX Switcher - by Flo
Overview of the various parts and the connections in between - FX Switcher - by Flo

User avatar
floris
Cap Cooler
Information
Posts: 474
Joined: 14 Oct 2007, 12:05
Has thanked: 231 times
Been thanked: 72 times

Post by floris »

Next step will be to find that Arduino Uno that I have used and programmed years ago, hook up some switches and LEDs, and shoot a little demo video which I will upload here. It will demonstrate using it and show its feasibility.

User avatar
floris
Cap Cooler
Information
Posts: 474
Joined: 14 Oct 2007, 12:05
Has thanked: 231 times
Been thanked: 72 times

Post by floris »

The relay boards from eBay took 2 weeks to get to my home from China. Not bad I think. And rather cheap with free shipping.
I can't be bothered to make something like that myself when they are so readilly available, cheap, preassembled.
I like "modular" things where one can just plug another component in a system to change it. This reminded me of that.

In the mean time, connecting some LEDs (with a series resistor to Ground) to the outputs and a few push buttons for the input, via resistor ladder, will make it easy to test the program running in the Arduino. Last I remember, it all was working without bugs: Selecting patches, Programing patches, Changing Banks, retaining it all in memory. The output pins of the Arduino are "active high" so they have 5V when "enabled", and 0V when "disabled".

There is already one forum member who has compiled the source code without problems, so that is good news! :applause:

I choose not to have a display because it increased cost and complexity.
I tried to design it as simple as possible, without becoming useless.
That's why I only use the LED indicators for user feedback.

But of course, a display is a nice extention to have! It would be very do-able in the current system, especially because the user feedback is already in the source code, programmed as debug print commands that are send back to the Arduino IDE when it is connected to the PC. It would be as simple as to re-format these messages into a more user friendly language and send them to a display instead of back to the Arduino IDE.

User avatar
floris
Cap Cooler
Information
Posts: 474
Joined: 14 Oct 2007, 12:05
Has thanked: 231 times
Been thanked: 72 times

Post by floris »

Footswitches DIY:

I used an aluminium U- profile bar.
For 4 switches I take 30 cm with 8 cm spacing between the switches.
Attachments
Switches installed bottom
Switches installed bottom
Switches installed top
Switches installed top
Holes drilled, tape for isolation 2
Holes drilled, tape for isolation 2
Holes drilled, tape for isolation
Holes drilled, tape for isolation
Spacing the footswitches
Spacing the footswitches
Setting up and measuring...
Setting up and measuring...
U-profile aluminium bar, 30 cm for 4 switches
U-profile aluminium bar, 30 cm for 4 switches

User avatar
floris
Cap Cooler
Information
Posts: 474
Joined: 14 Oct 2007, 12:05
Has thanked: 231 times
Been thanked: 72 times

Post by floris »

Resistor ladder in series for the switches.
4 switches => 5x 10k resistors.
Connect the resistors in series, and between Power 5V and Ground 0V.
Connect the NO (normally open) contact of a switch to a point between two 10k resistors.
Connect the "poles" together (green wire) and connect a wire that will go to Arduino input pin A0.
Attachments
Done!
Done!
Resistor ladder in series for the switches, connect the "poles" together (green wire)
Resistor ladder in series for the switches, connect the "poles" together (green wire)
Resistor ladder in series for the switches, connect NO and power wires
Resistor ladder in series for the switches, connect NO and power wires
Resistor ladder in series for the switches, connect NO
Resistor ladder in series for the switches, connect NO

User avatar
floris
Cap Cooler
Information
Posts: 474
Joined: 14 Oct 2007, 12:05
Has thanked: 231 times
Been thanked: 72 times

Post by floris »

Next step is to find the relays boards and the Arduino Uno that have around somewhere...

User avatar
floris
Cap Cooler
Information
Posts: 474
Joined: 14 Oct 2007, 12:05
Has thanked: 231 times
Been thanked: 72 times

Post by floris »

Grrrrr I still can't find the Arduino Uno and relay-boards that I have used a few years ago... :scratch:

User avatar
nmbb
Information
Posts: 13
Joined: 09 May 2012, 18:31
Has thanked: 2 times

Post by nmbb »

Looking for some simple stuff and found this thread. Maybe one of my future builds, the resistor leader for reading the footswitches it's a great ideia for having the switch's on the floor and the rest in a rack mount for instance...

User avatar
floris
Cap Cooler
Information
Posts: 474
Joined: 14 Oct 2007, 12:05
Has thanked: 231 times
Been thanked: 72 times

Post by floris »

Thanks! The "many switches on 1 input" is part of making it simple. That's why there is also no display...

User avatar
nmbb
Information
Posts: 13
Joined: 09 May 2012, 18:31
Has thanked: 2 times

Post by nmbb »

Having display could be a great feature, but some times, the most simple, the best! :)

User avatar
andrej
Solder Soldier
Information
Posts: 159
Joined: 28 Dec 2008, 00:23
my favorite amplifier: Vox AC30
Completed builds: Zvex Woolly Mammoth
Boss DS-2 mod
Vox AC4
Crowther Hotcake (and own variations)
TS-808
Big Muff Russian
Big Muff IC
Superfuzz
Superfuzz
Big Muff
Mixer/Blend
various other stuff
Location: montenegro
Has thanked: 6 times
Been thanked: 51 times
Contact:

Post by andrej »

multiple resistors - one analog pin won't work correctly with a long cable. realistically, the only way to facilitate reliable pedalboard-switcher communication is with 2 microcontrollers communicating with an asynchronous protocol (rs-232, rs-232-over-current-loop-called-midi, rs-422, rs-485). SPI won't work 2-ways because of clock delay, analog reading won't work reliably over a couple of meters because of the cable's capacitance.

what could work, though, is a switch matrix + a UTP cable. i can make a napkin-schematic of it if you're interested. bear in mind that you can either have 8 switches and 8 leds or 16 switches.

User avatar
floris
Cap Cooler
Information
Posts: 474
Joined: 14 Oct 2007, 12:05
Has thanked: 231 times
Been thanked: 72 times

Post by floris »

Thanks for the input!

I will have to try out how much of a problem that will become.
For relative short distances, I did not have a problem (yet) while doing some tests.
Good that I do not need a long cable between switches and switcher, it's all going on a pedal board.

How comes that the capacitance of the cable will become a problem?
With a few meters cable, just like with a guitar cable, capacitance will be in the magnitude of 100 pF?
T = 2 * PI * R * C = 2 * 3.14 * 50k * 100p = 30ms. Rise time to a DC voltage when pressing or releasing a switch is about 3*T = 0.1s.
I think that is fast enough, right?

User avatar
andrej
Solder Soldier
Information
Posts: 159
Joined: 28 Dec 2008, 00:23
my favorite amplifier: Vox AC30
Completed builds: Zvex Woolly Mammoth
Boss DS-2 mod
Vox AC4
Crowther Hotcake (and own variations)
TS-808
Big Muff Russian
Big Muff IC
Superfuzz
Superfuzz
Big Muff
Mixer/Blend
various other stuff
Location: montenegro
Has thanked: 6 times
Been thanked: 51 times
Contact:

Post by andrej »

there's always a (calculable) chance the ADC triggers conversion somewhere during cap charge/discharge cycle, and you get a wrong read. ADC samplerate doesn't affect it.

User avatar
floris
Cap Cooler
Information
Posts: 474
Joined: 14 Oct 2007, 12:05
Has thanked: 231 times
Been thanked: 72 times

Post by floris »

This is handled by the software (debouncing, checking for "a stable significant change in value for a certain amount of time"), if I understand you correctly.

User avatar
impoor
Information
Posts: 2
Joined: 26 Nov 2016, 18:44

Post by impoor »

I have 30 pedals i want to put to this kind of thing. is that possible?

User avatar
floris
Cap Cooler
Information
Posts: 474
Joined: 14 Oct 2007, 12:05
Has thanked: 231 times
Been thanked: 72 times

Post by floris »

It currently supports 8 loops. This can be changed in software.
But the Arduino UNO does not have 30 outputs available. You would need an extra hardware "decoder" to get 30 control lines.

Post Reply