Two-Channel Guitar Stomp Box Makes Momentary Switches Latching

When we first saw [Maarten Tromp]’s article about a “momentary latching switch” for guitar effects pedals, we have to admit to being a bit confused. When it comes to push-button switches, “momentary” and “latching” seem to be at odds with each other, with different mechanisms inside the switch to turn one into the other. What gives?

As it turns out, [Maarten]’s build makes perfect sense when you consider the demands of a musical performance. Guitar effects pedals, or “stomp boxes,” are often added to the output of electric guitars and other instruments to change the signals in some musically interesting way. The trouble is, sometimes you only need an effect for a few bars, and the push-on, push-off switches on many effects pedals make that awkward.

[Maarten]’s idea was to build a stomp box with momentary switches that act as inputs to an ATtiny2313 microcontroller rather than directly controlling the effect. That way, a bit of code can determine how long the switch is tapped, and activate a relay to do the actual switching accordingly. A short tap of the button tells the microcontroller to latch the relay closed until another tap comes along; a long press means that the relay is held open only as long as the button is held down.

Yes, he could have used a 555, a fact which [Maarten] readily acknowledges, but with some loss of flexibility; he currently has the threshold set at 250 milliseconds, which works for his performance style. Changing it would be a snap in code, as would toggling the latching logic. A microcontroller also makes expansion from the two-channel setup shown here easier.

Looking for more effects pedal action? We’ve got a bunch — a tube-amp tremolo, an Arduino Mega multipedal, a digital delay line. Take your pick!

12 thoughts on “Two-Channel Guitar Stomp Box Makes Momentary Switches Latching

  1. I found the microcontroller vs timer discussion interesting. While a micro allows nearly infinite flexibility, it requires programming which is a drawback for those who want to build similar. You need a dev environment and programmer. The timer approach negates that problem at cost of inflexibility.

    Perhaps an RP2040 would be a better choice than an AT Tiny. Costs a bit more than a Tiny but allows a USB connection for programming (which could also be used to allow simple settings to me made).

    1. There’s not that much variation you can have from one button and a time delay, unless you start stomping morse code into it. Eventually you will reduce the number of actually useful features to something which can be managed via a DIP switch and a potentiometer you can turn with a small screwdriver.

    2. Little microcontrollers are great! They can be tiny and inexpensive (eg an 8-pin DIP, or smaller package), and you don’t need capacitors and resistors to implement timers or oscillators. You just keep a cheap USB programmer in a desk drawer for developing, and making copies. I like little AVR or PIC micros for making little functional blocks like this. Eg nice little PWM dimmers for 12v LED strip lighting that also use short/long control; short button pushes will toggle through 3 presets, and a long push changes the dimming smoothly for as long as the button is held.

  2. About the AMT rectifier pedal (r2) . How does it sound front of amp as a dirt pedal vs. running through the effects return as a solid state preamp? Been using an mxr pedal to get that Mesa low-mid growl along with Jrc(TS) type circuit. And it’s close into a pair of V30’s. I just can’t imagine spending 3g on a head at the moment….

    1. It seems reasonably protected; the only ‘direct’ connection to the microcontroller from the outside world is through the power in jack, which has protection from the 7805 regulator circuit. The audio path is well-isolated from the microcontroller by the relay (1000v isolation). The I/O pins have internal protection diodes. I couldn’t quickly find the value of the programmable pullups on the inputs, but one can add pullup resistors and some small capacitors to the footswitch inputs if desired.

      Little microcontrollers like these are meant for real-world interface, so they can be pretty tough.

      1. Running the relay coil directly off the pins is a recipe for disaster though. Every time it switches the current off, the self-induction of the coil punches the guts out of the internal protection diodes until they can take no more.

        1. Possibly. The construction article refers to this discussion, which offers a few suggestions (eg added clamp diodes):

          If those output pins are never set back to input, then maybe the power handling of the output drivers is sufficient to dump transients back to the rails. And if the output transition is sufficiently ‘slow’ in comparison to a switch, the generated transient is much smaller. Speculating.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.