- Build Rating
- 5.00 star(s)
Something I've been slowly working on for a while now: microcontroller-based relay bypass. It's become a mini-obsession, I want the "luxury feel" of a momentary switch, the increased reliability of a relay (compared to the 3PDT mechanical switch), and the lowest possible power consumption. I also wanted to have a central reference implementation for readily available microcontrollers and a mating hardware circuit. I'm finally at a point where I feel I have a good start.
What I've created is a generic interface for the microcontroller code, and implementations for the ATtiny13, ATtiny85, PIC12F675 and PIC10F320 microcontrollers. I created a v1.0 PCB for the AVR (ATtiny) MCUs. The same circuit on a breadboard works with the PIC devices (the pinouts are different on the PIC and AVR MCUs, so I'd need a bunch of jumpers to have a single board). The "innovation" (if I can be so self-generous) here is that I enable a pin-change interrupt so I can put the MCR to sleep when it's not doing anything. The interrupt will wake it from sleep, it changes state, then goes back to sleep. These MCUs really sip current in sleep mode.
The code is open source (MIT license).
This v1.0 PCB drives the relay coil directly from the MCU. The AVR chips have protections that make this OK. I couldn't find detailed docs on the PIC microcontrollers' IO pin protections. "It works on the breadboard" doesn't necessarily mean it's a long-term, robust design. So the next revision will use transistors to drive the relay coil, and have explicit flyback protection diodes. Arguably overkill for the AVR chips, but a more general design.
I updated three of my builds with this relay bypass:
Below are pics of the updated builds. I also included a photo of my PCB next to the PedalPCB Basic Relay Bypass. Nearly the same dimensions (though, as I said, this is v1.0, v2.0 will be slightly bigger).
I'm pretty happy with this. The Snozzberry and Tellurian Drive are daily-use pedals for me. So far no issues! I also just built a new pedal (build report coming soon) that uses this relay bypass.
If anybody is interested in helping with testing, I'm willing to send out a board or two with a pre-programmed MCU. PM me if interested.
What I've created is a generic interface for the microcontroller code, and implementations for the ATtiny13, ATtiny85, PIC12F675 and PIC10F320 microcontrollers. I created a v1.0 PCB for the AVR (ATtiny) MCUs. The same circuit on a breadboard works with the PIC devices (the pinouts are different on the PIC and AVR MCUs, so I'd need a bunch of jumpers to have a single board). The "innovation" (if I can be so self-generous) here is that I enable a pin-change interrupt so I can put the MCR to sleep when it's not doing anything. The interrupt will wake it from sleep, it changes state, then goes back to sleep. These MCUs really sip current in sleep mode.
The code is open source (MIT license).
This v1.0 PCB drives the relay coil directly from the MCU. The AVR chips have protections that make this OK. I couldn't find detailed docs on the PIC microcontrollers' IO pin protections. "It works on the breadboard" doesn't necessarily mean it's a long-term, robust design. So the next revision will use transistors to drive the relay coil, and have explicit flyback protection diodes. Arguably overkill for the AVR chips, but a more general design.
I updated three of my builds with this relay bypass:
Below are pics of the updated builds. I also included a photo of my PCB next to the PedalPCB Basic Relay Bypass. Nearly the same dimensions (though, as I said, this is v1.0, v2.0 will be slightly bigger).
I'm pretty happy with this. The Snozzberry and Tellurian Drive are daily-use pedals for me. So far no issues! I also just built a new pedal (build report coming soon) that uses this relay bypass.
If anybody is interested in helping with testing, I'm willing to send out a board or two with a pre-programmed MCU. PM me if interested.
Attachments
-
IMG_7225.jpg470.9 KB · Views: 111
-
IMG_7233.jpg553.5 KB · Views: 104
-
IMG_7232.jpg564.8 KB · Views: 86
-
IMG_7231.jpg600.9 KB · Views: 88
-
IMG_7230.jpg542.3 KB · Views: 81
-
IMG_7229.jpg558.1 KB · Views: 81
-
IMG_7228.jpg590.5 KB · Views: 74
-
IMG_7227.jpg768.8 KB · Views: 80
-
IMG_7226.jpg552.4 KB · Views: 106