Circuit Design & Prototyping
In Part 1, I outlined the concept behind this relay-based bypass system, drawing inspiration from Incandenza Bypass Demedash Effects, EarthQuaker’s Flexi-Switch, and MAS Effects’ open-source approach. Now, it’s time to dive into circuit design and prototyping, turning the theory into a working system.
As expected, the transition from concept to prototype wasn’t entirely smooth. One issue I ran into was that my initial base resistor value for the transistor was too high, preventing the Arduino from fully switching the relay. I'll cover how I debugged that problem, refined the circuit, and got the relay working reliably.
Circuit Overview How the Relay Bypass Works
The goal of this circuit is to control a DPDT relay using an Arduino, allowing both tap-to-toggle latching mode and hold-to-engage momentary mode functionality from a single footswitch. Since an Arduino’s I/O pins can’t provide enough current to drive a relay directly, I used an NPN transistor 2N2222 as a switch.
When the footswitch is pressed, the Arduino sends a HIGH signal to D7. This activates the transistor, allowing current to flow through the relay coil. The relay switches the guitar signal between bypass and effect mode. An LED indicator is used to show whether the effect is active.
Debugging the Transistor Switching Issue
Initially, I used a 1kΩ resistor between D7 and the base of the transistor, assuming it would provide enough current for the transistor to turn on fully. However, when I pressed the footswitch, the relay barely responded. Instead of getting the expected 5V across the coil, it was only producing 0.4mV, not nearly enough to activate the switch.
The Fix Lowering the Base Resistor Value
After some troubleshooting, I realized the 1kΩ resistor was limiting the base current too much, preventing the transistor from fully saturating. Since an NPN transistor needs sufficient base current Ib to allow full current flow through the collector-emitter junction, I lowered the resistor value to 220Ω, although I have tested it up to 470-480Ω, and the circuit worked.
With 220Ω, the transistor now received enough current from D7, fully switching on and allowing the relay coil to activate properly. The takeaway too high a base resistor can prevent full switching, while too low a value can overload the Arduino pin. A 220-480Ω resistor should provide a good balance.
Prototyping the Bypass Circuit
With the transistor properly switching the relay, I assembled the full prototype. Arduino D7 controls the transistor base via 220Ω resistor. Transistor collector connects to the relay coil. Relay coil is powered from the 5V output of the Arduino, allowing it to switch between bypass and effect mode. However, the schematic does include an alternative method to power the relay if the user wants to use the power from the pedal supply of at least 9V. Flyback diode 1N4007 protects against voltage spikes when the relay turns off. A normally-open, momentary footswitch is connected to D2 allows tap-to-toggle and hold-to-engage modes. LED indicator D6 tracks relay state for visual feedback.
Testing this setup confirmed smooth and silent switching. The Arduino correctly distinguished between short taps and long holds, triggering the relay accordingly. The LED synced perfectly with the effect state.
The up-to-date code, or “sketch,” for the relay bypass can be found here.
Next Steps Refinements & Final Implementation
Now that the basic circuit is functional, I’ll refine the design further. In Part 3, I’ll cover making the stripboard (and later PCB), inserting it into a pedal enclosure, and adapting the design to use an Arduino Nano for a more compact form factor.