Author Topic: pi-Stomp Input Stage Question  (Read 71 times)

KAOSS

  • Newbie
  • *
  • Posts: 5
    • View Profile
pi-Stomp Input Stage Question
« on: September 22, 2024, 10:28:14 PM »
Hello!

I just had a question about the input stage of the Pi-Stomp. I believe the pi-Stomp board has a buffer circuitry for the guitar input before it goes into the IQaudio Codec Zero. Is there any way I can get more details on that? I?m trying to do something similar and was wondering how a buffer circuitry should be implemented.

Thanks.

Randall (Admin)

  • Administrator
  • Full Member
  • *****
  • Posts: 225
    • View Profile
Re: pi-Stomp Input Stage Question
« Reply #1 on: September 24, 2024, 10:02:27 PM »
The buffer used is based on the second-to-last schematic in this article:
http://www.muzique.com/lab/buffers.htm

The parts are here:
https://treefallsound.com/wiki/doku.php?id=bill_of_materials

(search page for "buffer")

If you are powering it from the pi supply, it'll be really noisy if you're not careful.  I take the 5v rail from the pi, run it thru the 3.3v regulator and obtain the ground reference for the regulator and buffer ONLY from the IQ audio card, NOT the pi.  The regulator has a 0.1uF disk on the input and a similar disk plus a 10uF oscon on the regulator output.

That makes keeps most of the pi noise away.  A ferrite bead on the 5v line might help a tad too, but I can barely hear the difference.

Starting with a "quiet-ish" supply is helpful too.  The official Raspberry supplies are about the quietest, I've found and they yield 5.1v instead of 5.0v which helps the pi to not throttle.

KAOSS

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: pi-Stomp Input Stage Question
« Reply #2 on: September 27, 2024, 01:32:20 PM »
Thank you Randall!

I was building my own unit that I was planning to run the pi-Stomp software on. I'm using a Pi 4 with the IQaudIO Codec Zero card. I used a dead Boss ME-25 as my enclosure + controller, more details on the controller HERE. Since then, I have progressed and have wired up the Codec Zero to the ME-25's audio input and outputs.

Now technically, as my main guitar I'm planning on using with it is active, I don't necessarily need a buffer. But I was wondering if I could use the buffer circuitry in the ME-25 circuit board?

This is a portion of the circuit diagram of the ME-25. Would it work if I wired a cable from the test point labelled "TP85" on the circuit diagram to the Codec?

« Last Edit: September 27, 2024, 01:34:09 PM by KAOSS »

Randall (Admin)

  • Administrator
  • Full Member
  • *****
  • Posts: 225
    • View Profile
Re: pi-Stomp Input Stage Question
« Reply #3 on: September 27, 2024, 09:41:02 PM »
Cool project!

I believe the input impedance of the IQaudio card is less than 40k, so I would recommend a buffer regardless of the source, but yeah, your active guitar out already makes your signal low impedance.

You probably could use that ME-25 buffer.  Again, noise is always my main concern, and the CMRR and PSRR of a single transistor is rather poor compared to a very low noise op amp, but maybe worth a try.  The IQAudio inputs have an input coupling cap, but I might suggest taking the signal from TP107 anyway.

KAOSS

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: pi-Stomp Input Stage Question
« Reply #4 on: September 30, 2024, 05:36:08 AM »
I checked and I had to make a modification to the PCB, i.e. cut a portion of it away to fit my Pi 4 inside it. Unfortunately I found out only later on that those test points were lost when that section was removed. I tried soldering to other test points, but the area seems to be too small for the solder to stick on. So for now I'm just routing the input from the jack itself directly to the Codec Zero input.

Interestingly, I found out that the output level drops significantly as soon as something is plugged in either to the USB ports or directly to the 5V pin of the Pi. Have you noticed something like that happen before? And even without plugging anything else in, the output level for my headphones is a bit too quiet. Do you think adding a small amplifier circuit before the output jack would work?

Also, as mentioned in the pi-Stomp FAQs, the power rail indeed does seem to be very noisy. The noise level is definitely audible if I connect the Pico directly to the 5V pin. It's much lower if plugged in via USB, but it's still very much present. Also adding a fan seems to be a no-go as it adds a lot of noise. I'm trying to see if having something like an LM2596 would reduce the noise from the other devices in the circuit.
« Last Edit: September 30, 2024, 06:08:54 AM by KAOSS »

Randall (Admin)

  • Administrator
  • Full Member
  • *****
  • Posts: 225
    • View Profile
Re: pi-Stomp Input Stage Question
« Reply #5 on: October 02, 2024, 03:13:07 PM »
I've not experienced your issue of volume drop when using USB to power peripherals.

I experimented with a variety of small amplifier circuits to provide more drive for headphones with less sensitivity.  Even with significant power supply filtering, they all were too noisy.  If you can live with mono, you could maybe use the IQAudio onboard speaker output, but my recommendation would be to use more sensitive/higher impedance headphones and to make sure your Alsa settings are not reducing the output unintentionally - there are many stages the audio goes thru: Aux > Mixins > Mixouts > ADC > (software gain) > DAC > Headphone.  Check those using alsamixer.

My experiments with boost converters didn't yield a noise floor low enough.  I tired 5 different converters with lots of filtering.  Basically, the pi supply rail is just incredibly noisy and not a friend of any analog audio.

Regarding a fan, I've never had an overheating problem with a pi3 or pi4 which has passive heat-sinks.  pi5 does require active cooling, but the $5 fan cooler I got does the trick and doesn't add any noticeable power supply noise.
 

KAOSS

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: pi-Stomp Input Stage Question
« Reply #6 on: Today at 04:07:32 AM »
My project got delayed by a few days as I thought my Codec Zero had died. I waited for a new one to arrive, but it turns out that I just needed to reload the iqaudiocodec.state from the pi-Stomp GitHub repo using alsactl restore.


Interestingly, I found out that the output level drops significantly as soon as something is plugged in either to the USB ports or directly to the 5V pin of the Pi. Have you noticed something like that happen before? And even without plugging anything else in, the output level for my headphones is a bit too quiet. Do you think adding a small amplifier circuit before the output jack would work?
I've not experienced your issue of volume drop when using USB to power peripherals.
I think I've found out the reason for that. As soon as the Pico is powered on, the output level drops significantly. It doesn't matter where I power it from – Pi's USB port, Pi's 5V pin, or using an external adapter. It happens immediately. I suspect it's because I'm making all the connections to the leads of the jacks on the PCB itself, it's connected to the ground in some way? So the signal gets grounded and hence drops in volume as soon as the Pico is powered on?


I experimented with a variety of small amplifier circuits to provide more drive for headphones with less sensitivity.  Even with significant power supply filtering, they all were too noisy.

My experiments with boost converters didn't yield a noise floor low enough.  I tired 5 different converters with lots of filtering.  Basically, the pi supply rail is just incredibly noisy and not a friend of any analog audio.
Unfortunately I also reached the same conclusion. I tried connecting the power input of the amplifier to the Pico, but it just doesn't have enough juice to drive the amplifier.  Then I tried powering the amplifier from the Pi's 5V line after it passes through the boost converter. Unfortunately the output signal is way too noisy.  So I've given up on using an amplifier in the chain altogether.


If you can live with mono, you could maybe use the IQAudio onboard speaker output, but my recommendation would be to use more sensitive/higher impedance headphones and to make sure your Alsa settings are not reducing the output unintentionally - there are many stages the audio goes thru: Aux > Mixins > Mixouts > ADC > (software gain) > DAC > Headphone.  Check those using alsamixer.
This actually helped a lot, thank you! I was using the default iqaudiocodec.state file. I checked alsamixer and raising the "Headphone" level to 100% significantly improved things. I also tried raising the "DAC" level, but I couldn't increase it past like 65%, otherwise it would start clipping. This configuration actually does make everything at least as loud as I want it to be, at least as long as the Pico is off. But still it's much better than it used to be even when the Pico is off. I saved a new .state file and I load it on boot.


Regarding a fan, I've never had an overheating problem with a pi3 or pi4 which has passive heat-sinks.  pi5 does require active cooling, but the $5 fan cooler I got does the trick and doesn't add any noticeable power supply noise.
I have somewhat gotten around this too. Adding a fan just makes everything way too noisy, even with a boost converter in line. I had to simplify some of my pedalboards, so that they use a little less CPU. I was running pretty complex pedalboards, something like this:

I had to cut back either on the number of NAM instances to 3, or substitute them with AIDA-X. Now, even when the Pi reaches a temperature of 83?C, I don't suddenly start getting a lot of XRUNS. Whereas earlier, once it reached that temperature, the Pi would start throttling and would completely freeze the unit.
« Last Edit: Today at 04:25:31 AM by KAOSS »

KAOSS

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: pi-Stomp Input Stage Question
« Reply #7 on: Today at 04:21:41 AM »
I'm now planning on wrapping up this build and move forward with my next one. For that, I'll be using a Pi 5 with the official active cooler and put everything either in a bigger FX unit if I manage to find one, or go full DIY and build my own enclosure. I had a few questions regarding that:

  • Have you been able to get the IQaudIO Codec Zero running on the Pi 5 and Bookworm? I have tried the same install procedure as used in the pi-Stomp install scripts, but I can't get Jack to run on Bookworm with the Codec Zero.
  • Could I use a bigger display, which might use a different controller? Here are a few links:
  • Would it be possible to change the scripts to work with and HDMI display instead?

Thanks!
« Last Edit: Today at 09:45:59 AM by KAOSS »