DIYPedal_devlog[1] - low-pass filter & inverse polarity
Being that my output was noisy and low in volume I tried to investigate the low-pass filter used in Pedal-Pi. It’s a Sallen & Key 3rd order. They link this pdf with all the calculations. After skimming through it, I googled for a calculator. I found this one http://sim.okawa-denshi.jp/en/OPseikiLowkeisan.htm . I tried some values of the caps I have and finally found a combination with a cutoff at 20kHz~. I used 800Ohm and 10nF, with the couples of resistors and caps equal. To make the resistors I used a 470Ohm and a 330Ohm. After wiring the circuit up I only had 50Hz as output. It took me a lot to find out that I wired it exchanging the Vin+ with the Vin-. Probably it was oscillating, I don’t know.
Anyhow, this bug was lucky because I also found out the origin of the audio signal that could be heard with the program off. I got the polarity of the phone connector wrong. To me the best polarity was the one with the ground in tip and the channels back, in this way a mono and a stereo would have the ground in the same place and the positive polarity of the mono would be duplicated to the two stereo channels. Connecting a stereo jack to a mono output would work. I’m sure there’s a good reason why it is like it is, my knowledge is infinitesimal.
So, now my output is clearer and louder. I think I could solder the circuit on a prototype board. Oh, I also noticed that the coupling cap is shifting the output voltage, centering it near ground.
On the software side, I’ve implemented linear interpolation in the reproduction of the samples. Now it’s no more time-distorted.
I’d like to add more tracks or to try to implement some effect. To add more tracks I’d need tree more buttons per track, and to add an effect I would need a button per track, and/or one for the whole mix. I would also like to add a volume knob and a time-shift knob to each track. Obviously I’d like to add some leds to get out some feedback. I’ve being looking for how to have more outputs, and I’ve found out of expansion ICs, like MCP23017/MCP23S17. With 4 tracks I’d need 3 to 6 buttons (2 buttons for two effects, delay and reverb), and 3 to 6 leds. One led for the rec status, one for the play status and one for the recorded status. One led per effect. 24 GPIOs pins for the buttons and 10 for the leds, in a 5x5 matrix. I definitely need more pins.








