Skip to the content
2 layers147.4 × 63.2 mmGuitar down octave, the printed circuit board in 3D

Guitar down octave

MR-DOS/guitar_down_octave5

A octave-down effect for guitar. All analog, no microcontroller, no DSP.

Size
147.4 × 63.2 mm
Copper layers
2
Thickness
1.6 mm
Parts
219
Nets
149
Pads
599
Tracks, vias
974, 70
Pours
4
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
13 Jan 2019
Updated
23 Nov 2021

Overview

Guitar down octave is an open-source printed circuit board by MR-DOS, from the MR-DOS/guitar_down_octave repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 147.4 × 63.2 mm with 219 parts on 149 nets, routed with 974 tracks and 70 vias.

It is built around the MC1496D, NE5532 and TL072, with the MC34063AD, MT3608 and NJM4580L among its other parts. Its parts include 93 resistors, 67 capacitors, 20 ICs, 14 diodes and 3 transistors. It belongs with the audio and music boards of this library.

Main components

12

README

README.md

guitar_down_octave


Description

This is an analog guitar effect which works as octave-down effect. Contrary to all available analog octave-down effect (let me know if you find one!), it produces undistorted sinewave (when supplied with pure sinewave on input). There is no PLL, no oscillator


Overview

So, you may want to know how it works. A long time ago, I was experimenting with octave-up effects. Recently, I thought that the principle of octave-up effects can be turned inside-out and a bit expanded to make an octave-down effect. The way most octave-up effects work (the good ones, simple ones only rectify the input waveform which is horrible) is as follows:

sin^2(x)=\frac{sin(2x)}{2}+\frac{1}{2}

If this function is inverted, you get:

\sqrt{\frac{sin(x)}{2}+\frac{1}{2}}=|sin(\frac{x}{2})|

However, this is not enough to turn sinewave into sinewave of half frequency. You need to remove the absolute value and this is where the analog mojo kicks in. If you want more insight, look in the presentation where simulated waveforms can be found. If you are more curious, look into the schematics or simulation.


Explanation of function

To sum it up, the circuit does the following: detect input amplitude and shift the input signal in such a way that the sinewave has its minimum at precisely 0 Vdc, find a square root of the shifted signal and normalize its amplitude so that input and output amplitudes are equal, then invert the signal at points where it gets closest to zero.

90deg phasing circuit

In order to detect extremes, you need to detect zero crossing of a derivation of the input signal. Initially, derivator was used, but it had several issues, most importantly its sensitivity was increasing with frequency whereas I needed quite the opposite, because the circuit needs to be most sensitive in the range of tens of Hz to several hundreds of Hz. The sensitivity also should decrease with rising frequency to make the phasing circuit more immune to harmonics (because signal from guitar is going to be flooded with harmonics). So a double integrator was used - one for the phasing circuit, one as DC servo. However, this circuit has a nasty peak at 32 Hz, so it had to be compensated with a Twin-T notch filter right on the input of the whole effect. It maintains proper 90deg +- 0.25deg phase from about 60 Hz and up. There is an additional RC T-network to accelerate convergence to 90deg at low frequencies, which allows for more gain in the integrator by using shorter time constant. It should work even with harmonic-rich signals, however the harmonics must be in phase (and not antiphase) with the fundamental frequency, otherwise an analysis of what will happen is nontrivial.

Schematics of the input circuit with the notch filter and the phasing circuit: Schematics of the input circuit with the notch filter and the phasing circuit

Green sine is the input waveform, blue is the 90deg shifted sine, red is output of the comparator: Green sine is the input waveform, blue is the 90deg shifted sine, red is output of the comparator

Synchronous peak detector

There is a synchronous peak detector which uses 2 track-and-hold amplifiers (historical LF398). One of them tracks the input signal while the second one holds a peak value. Each time the input waveform goes through one of its extremes, their tasks are switched. At the same time, an analog switch selects the one which holds the peak value. This way, you get a fairly precise DC value representing the amplitude which is updated after each cycle of the sinewave. This was needed because regular peak detectors were too slow to react fast enough to dynamics of playing a guitar while being too fast to hold their value during the whole cycle of sinewave, so they would cause a lot of distortion and bad dynamics. This part and the phasing circuit proved to be crucial for proper operation of the whole effect.

Green sine is the input waveform, blue and light blue waveforms are outputs of the track-and-hold amplifiers: Green sine is the input waveform, blue and light blue waveforms are outputs of the track-and-hold amplifiers

Square root finder

The square root finder is quite simple - it uses opamps and diodes to calculate the logarithm of the DC shifted signal, then divide by two (simple resistor divider) and exponentiate. This computes the square root even with proper sign. The only problem is very low speed of this circuit when crossing zero (which is why it never should cross the zero), because it momentarily goes open-loop and has to cross about 1.3 V rapidly.

Square-root-finder schematics: Square root-finder

Waveforms in the square-root-finder: Waveforms in the square-root-finder

Synchronous inverter

To get rid of the absolute value, there is a synchronous inverter which inverts every second halfperiod of the sinewave. This uses the phasing circuit and 74HC74 to generate half frequency square wave which drives an analog switch which selects either positive or negative halfperiod of the sinewave. There is a simple RC filter to suppress crossover distortion.

Green and light blue line are the noninverted and inverted value, dark blue is the combined waveform: Green and light blue line are the noninverted and inverted value, dark blue is the combined waveform

AGC

To compensate for amplitude error due to the square-root, there is an AGC which uses Gilbert cells. Each square-root-finder is preceded by the Gilbert cell (there are 2), one has the sine wave as input, the second one gets the DC value of amplitude. The AGC tries to get the input and output amplitude the same.

Gilbert cell used as controlled amplifier: Gilbert cell used as controlled amplifier

Feedback used to compute the AGC value: Feedback used to compute the AGC value


Performance

Performance at 110 Hz, 1Vpk-pk: The largest harmonic is the 3rd with -62.3 dBc, the THD is about 0.43% or 2.97% depending on how you define the THD. For a nonlinear guitar effect, it is probably satisfactory.

Image of FFT in simulation: Image of FFT in simulation


Images of the board

Top view: Top view

Bottom view: Top view

Top view, drilled and with vias in place: Top view, drilled and with vias in place

Bottom view, drilled and with vias in place: Bottom view, drilled and with vias in place

Assembled board: Assembled board


Known bugs

The -15 V switching power supply is a piece of shit. I will never EVER use MC34063, at least for negative power supply. The modern positive switching power supply is OK, it draws only tens of mA. The MC34063 draws one or two orders of magnitude larger current. Maybe it could be replaced by charge pump taken from the positive switching power supply - this means replacing the whole negative power supply by 2 diodes and 1 capacitor.

Parts

219
QtyValueFootprintReferences
18100nCapacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolderC110, C111, C112, C202, C205, C206, C207, C302, C305, C306, C307, C309, C311, C312, C314, C319 +2
161kResistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR109, R116, R124, R127, R128, R201, R207, R210, R301, R307, R310, R325, R329, R334, R335, R337
1210nCapacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolderC119, C120, C121, C122, C123, C124, C125, C126, C127, C128, C129, C130
121N4148WSDiode_SMD:D_SOD-323_HandSolderingD201, D202, D203, D204, D205, D206, D301, D302, D303, D304, D305, D306
810kResistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR110, R117, R118, R326, R327, R331, R332, R339
71k5Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR111, R119, R120, R121, R122, R126, R133
6100uCapacitor_SMD:CP_Elec_8x10C308, C313, C315, C318, C321, C323
62k2Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR123, R125, R211, R212, R311, R312
5100kResistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR104, R205, R206, R305, R306
5220kResistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR131, R209, R216, R309, R316
54k7Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR108, R208, R308, R319, R322
4100RResistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR218, R318, R336, R338
4100nCapacitor_THT:C_Rect_L7.2mm_W2.5mm_P5.00mm_FKS2_FKP2_MKS2_MKP2C101, C102, C103, C104
4100pCapacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolderC201, C204, C301, C304
4220Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR220, R221, R320, R321
44R7Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR213, R215, R313, R315
4680nCapacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolderC316, C317, C324, C325
4NE5532Package_SO:SOIC-8_3.9x4.9mm_P1.27mmU101, U110, U201, U301
4TL072Package_SO:SOIC-8_3.9x4.9mm_P1.27mmU104, U106, U202, U302
31nCapacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolderC113, C203, C303
31uCapacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolderC105, C109, C329
322nCapacitor_THT:C_Rect_L7.2mm_W2.5mm_P5.00mm_FKS2_FKP2_MKS2_MKP2C114, C115, C116
33k9Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR115, R203, R303
210KMountingHole:MountingHole_2.2mm_M2_PadH105, H106
210uCapacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolderC326, C327
21N5819Diode_SMD:D_SOD-123D307, D308
2220uInductor_SMD:L_Wuerth_WE-PD2-Typ-XLL301, L302
222kResistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR202, R302
2330Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR106, R107
2330kResistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR113, R114
247Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR204, R304
2470Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR214, R314
2470kResistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR105, R112
2680kResistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR217, R317
268kResistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR102, R103
2LF398_SOIC8Package_SO:SOIC-14_3.9x8.7mm_P1.27mmU105, U108
2MC1496Package_SO:SOIC-14_3.9x8.7mm_P1.27mmU203, U303
10R33Resistor_SMD:R_1206_3216Metric_Pad1.42x1.75mm_HandSolderR328
110nCapacitor_THT:C_Rect_L7.2mm_W2.5mm_P5.00mm_FKS2_FKP2_MKS2_MKP2C117
110uCapacitor_THT:C_Rect_L7.2mm_W7.2mm_P5.00mm_FKS2_FKP2_MKS2_MKP2C107
111kResistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR330
1150nCapacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolderC108
118kResistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR101
11K_HMountingHole:MountingHole_2.2mm_M2_PadH109
11K_LMountingHole:MountingHole_2.2mm_M2_PadH107
11K_WMountingHole:MountingHole_2.2mm_M2_PadH108
11k2Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR333
11uCapacitor_THT:C_Rect_L7.2mm_W7.2mm_P5.00mm_FKS2_FKP2_MKS2_MKP2C131
1220pCapacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolderC132
122RResistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR341
124kResistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR324
12M2Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR132
12N7002Package_TO_SOT_SMD:SOT-23_HandsolderingQ301
12kResistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR130
12k7Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR129
1330pCapacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolderC320
13n3Capacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolderC118
147nCapacitor_THT:C_Rect_L7.2mm_W2.5mm_P5.00mm_FKS2_FKP2_MKS2_MKP2C106
16k8Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR340
174HC74Package_SO:SOIC-14_3.9x8.7mm_P1.27mmU103
1BATT+MountingHole:MountingHole_2.2mm_M2_PadH306
1BATT-MountingHole:MountingHole_2.2mm_M2_PadH305
1BSS84Package_TO_SOT_SMD:SOT-23_HandsolderingQ302
1CD4053BPackage_SO:SOIC-16_3.9x9.9mm_P1.27mmU109
1DW01Package_TO_SOT_SMD:SOT-23-6U308
1FS8205Package_SO:TSSOP-8_4.4x3mm_P0.65mmQ303
1INMountingHole:MountingHole_2.2mm_M2_PadH101
1IN_GNDMountingHole:MountingHole_2.2mm_M2_PadH102
1L78L05_SO8Package_SO:SOIC-8_3.9x4.9mm_P1.27mmU305
1LED_CHG+MountingHole:MountingHole_2.2mm_M2_PadH303
1LED_CHG-MountingHole:MountingHole_2.2mm_M2_PadH301
1LED_STDBY+MountingHole:MountingHole_2.2mm_M2_PadH304
1LED_STDBY-MountingHole:MountingHole_2.2mm_M2_PadH302
1LM311Package_SO:SOIC-8_3.9x4.9mm_P1.27mmU102
1MC34063ADPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmU306
1MT3608Package_TO_SOT_SMD:TSOT-23-6_HandSolderingU304
1NJM4580Package_SO:SOIJ-8_5.3x5.3mm_P1.27mmU107
1OUTMountingHole:MountingHole_2.2mm_M2_PadH103
1OUT_GNDMountingHole:MountingHole_2.2mm_M2_PadH104
1R_POTPotentiometer_THT:Potentiometer_Bourns_3296Y_VerticalRV101

The 215 most common of 219 parts.

Similar boards

  • 2 layers116.6 × 93.3 mmUsbdac, the printed circuit board in 3D

    Usbdac

    rspg/usb_sound_card_with_pico

    USB Sound Card with Raspberry Pi Pico Hard&Firm

    125 parts14
  • 2 layers149.1 × 150.3 mmEncoder, the printed circuit board in 3D

    Encoder

    charbel-j-estephan/Fm_Stereo_Encoder_Decoder

    FM stereo encoder and decoder with 19 kHz pilot, designed in LTspice and KiCad.

    170 parts
  • 4 layers180 × 81.3 mmSystemController, the printed circuit board in 3D

    SystemController

    46nori/FMSynthEnsemble

    USB MIDI FM synthesizer that supports voice synthesis using CSM (Composite Sinusoidal Model

    67 partsMIT
  • 4 layers29.9 × 32 mmModels heart rev1.1, the printed circuit board in 3D

    Models heart rev1.1

    KushlaVR/models-heart

    Можливості: Керування через WIFI з телефона або ПК 5 незалежних каналів (світлодіоди/сервомотори) 1 Н-міст для підключення мотора (піковий струм до 3А) Вмонтована BMS 1S та контроллер заряду Li-Ion акумулятора з…

    106 parts7GPL-3.0
  • 2 layers54.9 × 95 mmBoard v5, the printed circuit board in 3D

    Board v5

    brev-dev/another_esp8266_sensor_board

    PCB layout and instructions for a multi-purpose esp8266 sensor device, with optional LORA connectivity.

    86 parts5GPL-3.0
  • 2 layersDianqiao, the printed circuit board in 3D

    Dianqiao

    yjmwxwx/stm32asm

    84 parts16GPL-3.0
  • 2 layers62 × 57 mmAttiny10dev, the printed circuit board in 3D

    Attiny10dev

    antonloof/attiny10prog

    47 parts
  • 2 layers50 × 50 mmTesi, the printed circuit board in 3D

    Tesi

    EmaNeg/Power_Management_Unit_Tesi

    PMU (Power Management Unit) compatta per sistemi embedded. Integra Power Path automatico, ricarica Li-Po 1S, conversione DC-DC Buck-Boost a 5V e monitoraggio I2C tramite MAX17048.

    65 parts1MIT

Questions

How big is the Guitar down octave PCB?

It measures 147.4 × 63.2 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Guitar down octave use?

219 parts, built around the MC1496D, NE5532, TL072 and MC34063AD. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Guitar down octave KiCad files?

From the MR-DOS/guitar_down_octave repository on GitHub, at the commit this page was made from: the board is kicad/guitar_down_octave.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Guitar down octave design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).