Project Overview


Project overview
This project is a low-noise analog guitar distortion pedal with digitally controlled true bypass. It accepts a guitar-level input, applies adjustable gain and symmetrical diode clipping, shapes the result with a tone control, sets output volume, and routes either the processed or bypassed signal to the output jack.
The design combines:
  • A largely analog audio path
  • Low-noise OPA1656 op-amps
  • Three panel controls: gain, tone, and volume
  • Relay-based true bypass
  • An ATtiny212 for footswitch and relay control
  • Anti-pop muting using a PhotoMOS switch
  • Protected 9 V input and a separate regulated 5 V control rail
  • A 100 × 60 mm, four-layer PCB and modeled pedal enclosure
Functional architecture

Diagram


Effect mode "9 V DC input" "Reverse-polarity protection and filtering" "Clean 9 V analog rail" "5 V LDO" "ATtiny212 control system" "Guitar input jack" "DPDT true-bypass relay" "Input buffer" "Variable-gain amplifier" "Symmetrical diode clipping" "Active tone stage" "Output volume control" "Output jack" "Relay transistor driver" "PhotoMOS anti-pop mute" "Status LED" "Soft-touch footswitch"
1. Power system
The pedal is powered through J1, a conventional barrel connector. Its nominal input is 9 V DC.
Protection and filtering
The input passes through:
  • Q1, AO3401A P-channel MOSFET — reverse-polarity protection with much lower voltage loss than a conventional series diode.
  • R1, 22 Ω — supply isolation and filtering.
  • Bulk and ceramic capacitors such as C23, C2, C3, C4, C5, C7, and C9.
  • Separate named rails including +9V_RAW, +9V_PROT, and +9V_CLEAN.
The OPA1656 analog circuitry runs from the cleaned 9 V rail. Because the circuit uses a single positive supply, it creates a mid-supply reference, or virtual ground, for the audio stages.
Control supply
U1, TPS70950, converts the protected input to 5 V. This rail powers:
  • The ATtiny212
  • The 5 V relay coil
  • Control-side switching circuitry
  • Status indication
Separating the analog supply from the regulated control rail helps prevent relay and microcontroller activity from coupling into the guitar signal.
Power trade-offs
The linear regulator is quiet and uncomplicated, but it dissipates the voltage difference as heat. That is acceptable here because the digital and relay-control loads are relatively small. A switching regulator would be more efficient, but could introduce switching noise into a high-gain audio circuit.
2. Audio signal path Input and bypass routing
CN2 is the guitar input and CN1 is the output. Both are Neutrik NMJ6HCD2 audio jacks.
The signal first encounters K1, an Omron G6S-2F 5 V DPDT relay. Its two poles switch both ends of the effect path:
  • In bypass, the input is connected directly to the output.
  • In effect mode, the input is sent into the processing chain and the processed output is returned to the output jack.
This is genuine electromechanical true bypass rather than a permanently buffered bypass.
High-value 1 MΩ resistors provide input and output bias paths and help discharge coupling capacitors. This reduces clicks when the relay changes state.
Input buffer
One amplifier section of U5, an OPA1656 dual op-amp, forms the input buffer. The OPA1656 is a good fit because it offers:
  • JFET inputs and very high input impedance
  • Low voltage and current noise
  • Low distortion
  • Rail-to-rail output behavior suitable for single-supply audio
  • Enough bandwidth for high closed-loop gain without compromising the guitar band
The buffer isolates the guitar pickups from the variable-gain and clipping networks. This prevents the pedal’s controls from excessively loading the instrument and preserves high-frequency response.
Gain and distortion stage
An amplifier section of U6 provides the main adjustable gain. VR1 is the gain control, working with the surrounding feedback resistors and capacitors.
D3 and D4, both 1N4148-family switching diodes, are connected in opposite directions in the feedback or clipping path. They create approximately symmetrical clipping:
  • Small signals are amplified approximately linearly.
  • As the signal amplitude rises, one diode conducts on each polarity.
  • The amplifier’s effective feedback changes, compressing and clipping both halves of the waveform.
Symmetrical silicon clipping produces a relatively tight, focused distortion with predominantly odd-order harmonic content. It is generally more aggressive and less “asymmetric” than LED, germanium, or intentionally mismatched clipping.
Small capacitors around this stage constrain high-frequency gain. This improves stability and avoids amplifying noise far beyond the audible range.
Tone control
VR2 and another OPA1656 section form the active tone-shaping stage. The associated resistor-capacitor network blends or emphasizes different portions of the distorted spectrum.
This stage is important because clipping generates substantial high-frequency harmonic content. Without filtering, the result can sound harsh or fizzy. The active topology also avoids the large insertion loss found in many passive guitar-pedal tone stacks.
Output level
VR3 is the output-volume control. A coupling capacitor blocks the internal DC bias while passing the audio signal to the potentiometer and output switching network.
This lets the user compensate for the gain introduced by the distortion circuit and set unity gain or a boosted output level.
3. Bypass and anti-pop control Microcontroller
U2, ATtiny212, monitors the momentary footswitch S1 and controls the pedal state.
The controller is responsible for:
  • Switch debouncing
  • Toggling effect/bypass state
  • Driving the status LED
  • Sequencing the mute and relay
  • Providing deterministic startup behavior
A three-pin header, H1, exposes power, ground, and PA0/UPDI for programming.
Relay driver
The microcontroller cannot safely drive the relay coil directly. Q2, BC817-40, acts as a low-side relay driver. A base resistor limits MCU output current, while a pull-down keeps the transistor off during reset.
D2 is the relay flyback diode. It clamps the coil’s inductive voltage when Q2 turns off, protecting both the transistor and microcontroller.
Anti-pop mute
U3, AQY212GSZ PhotoMOS relay, provides a temporary signal mute during switching.
A likely control sequence is:
  1. Activate the mute.
  2. Change the mechanical relay state.
  3. Wait for contacts and bias voltages to settle.
  4. Release the mute.
This addresses the main weakness of relay bypass: audible pops caused by contact switching, stored capacitor charge, or small DC differences between signal nodes.
The PhotoMOS solution gives galvanic isolation and avoids putting a conventional transistor’s nonlinear junction directly in the signal path. Its disadvantages are higher cost and nonzero on-resistance and capacitance.
4. Mechanical and PCB implementation
The PCB is:
  • 100 × 60 mm
  • Rectangular with 3 mm corner radii
  • Four copper layers
  • Populated primarily on the top side
  • Equipped with four M2 mounting holes
  • Integrated with a modeled enclosure, top panel, knobs, and internal fasteners
The input and output jacks sit along one side of the board, while the three potentiometers align with the enclosure’s control openings. The footswitch, LED, power jack, and programming header are also board-mounted.
The board is dense:
  • 73 physical components
  • Approximately 65.8% top-side component-area fill
  • Approximately 97.6% routing-aware occupancy
A four-layer stackup is therefore a practical choice. Internal planes reduce routing congestion and provide low-impedance ground and power distribution.
Important design choices OPA1656 instead of a commodity pedal op-amp
The OPA1656 improves input impedance, noise, distortion, and output drive compared with older devices commonly found in pedals.
The trade-off is price. In a deliberately lo-fi distortion circuit, the audible improvement may be smaller than the component cost suggests, but it helps keep noise and unintended coloration below the intentional distortion.
Relay bypass instead of electronic bypass
Benefits:
  • True galvanic signal routing
  • Very low signal resistance
  • Familiar true-bypass behavior
  • No semiconductor permanently in the bypass signal path
Costs:
  • Mechanical wear
  • Coil current
  • Larger footprint
  • Audible clicking
  • Need for flyback protection and anti-pop sequencing
Digital control around an analog signal path
The MCU improves switch behavior without digitizing the audio. This preserves the immediacy and simplicity of analog distortion while enabling debouncing, state control, muting, and future firmware features.
The main risk is digital noise coupling into the audio circuitry. Supply separation, local decoupling, ground management, and careful layout are essential.
Single-supply operation
Running the op-amps from 9 V and biasing the signal around a virtual reference avoids the cost and complexity of generating a negative rail.
The trade-offs are:
  • Reduced headroom compared with a bipolar supply
  • Dependence on a clean, low-impedance reference
  • Coupling capacitors at signal boundaries
  • Potential startup or switching transients while bias points settle
Performance considerations Noise
The dominant noise sources are likely to be:
  • High-value 1 MΩ bias resistors
  • Large gain settings
  • Guitar pickup and cable noise
  • Power-supply contamination
  • PCB coupling between the MCU, relay coil, and analog stages
The OPA1656 helps, but total noise will still rise substantially at maximum gain. Keeping high-impedance nodes short and clean is particularly important.
Headroom and clipping
The 9 V supply gives reasonable pedal-level headroom, but the internal audio signal is centered around a virtual reference. The available swing is therefore less than the full supply voltage.
At high gain, clipping may occur at both the intended diodes and the op-amp output limits. Whether that sounds desirable depends on the exact gain range and bias stability.
Frequency response
The small capacitors in the gain and feedback networks appear intended to:
  • Limit ultrasonic gain
  • Reduce hiss
  • Smooth diode-generated harmonics
  • Maintain op-amp stability
Excessive filtering could make the pedal sound dull, while insufficient filtering could produce harshness or RF sensitivity.
Switching performance
The relay and PhotoMOS sequence depends on firmware timing. If the mute interval is too short, pops may remain. If it is too long, the player will perceive a dropout or delayed response.
A good implementation should also reject switch bounce and prevent rapid repeated relay actuation.
Potential challenges
  • Grounding: High-gain analog circuitry shares the board with relay and MCU current pulses.
  • Virtual-reference integrity: Noise or loading on the reference affects every audio stage.
  • Dense layout: The board is tightly packed despite using four layers.
  • Mechanical alignment: Board-mounted jacks, pots, LED, switch, and enclosure holes must all align accurately.
  • Potentiometer availability: The selected Alps parts are mechanically specific and may constrain sourcing.
  • Relay lifetime: Mechanical relays have a finite switching life, although guitar-signal currents are very low.
  • Pop suppression: Component leakage, relay timing, or DC offsets can still create switching artifacts.
  • Thermal and power behavior: The relay is likely the largest 5 V load and must remain within the LDO’s current and dissipation limits.
  • Firmware dependency: A control-firmware fault can leave the pedal muted, in the wrong state, or repeatedly switching.
Real-world applications
The design is suitable for:
  • Stage and studio guitar rigs
  • Boutique analog effects products
  • A platform for comparing clipping networks
  • An educational example of mixed-signal audio design
  • A base architecture for overdrive, fuzz, boost, or preamp products
It could also be adapted for bass by changing coupling and tone-network corner frequencies.
Recommended improvements
  1. Validate the analog path with simulation and measurement. Confirm gain range, clipping thresholds, tone-control response, output level, and op-amp headroom.
  2. Characterize the virtual reference. Check its impedance and transient response at maximum signal level.
  3. Verify the 5 V power budget. Include relay pickup current, LED current, PhotoMOS drive, MCU consumption, and TPS709 thermal dissipation.
  4. Add accessible test points for 9 V raw, 9 V protected, 9 V clean, 5 V, virtual reference, effect input, drive output, and effect output.
  5. Review protection at external connectors. The audio jacks currently do not appear to have dedicated ESD or RF-input protection.
  6. Optimize sourcing. Several parts are extended or mechanically specialized; production variants should use stable, second-sourceable parts where possible.
  7. Improve diagnostic firmware. Add power-on self-test, relay-state indication, watchdog recovery, and a controlled default state.
  8. Consider clipping options. A switch or jumper could select silicon, LED, asymmetric, MOSFET, or no-diode clipping.
  9. Consider buffered bypass as an alternate mode. This could preserve treble in long cable runs, although it would no longer be strict true bypass.
  10. Run complete ERC, DRC, audio simulation, and physical fit verification before manufacturing, especially given the board density and enclosure integration.

Modern Distortion Effects Pedal | Intermediate [Example]