Improving PSU filtering on the Wolfson Raspberry Pi Sound Card

I’ve been thinking about elegant ways to improve the PSU filtering of the Wolfson card and to ensure that any switching noise from the relatively noisy power supplies Raspberry Pi’s are usually used with is effectively filtered.

There’s plenty of possible solutions here, involving various regulators or large capacitors, but all of these require a fair amount of space and I really wanted a solution that met the following goals: –

  • Low cost
  • As few components as possible
  • Easy to implement given reasonable soldering skills
  • Fits within the form factor of the existing card
  • Effective filtering across the audio band and beyond
  • Works within the existing PSU voltage limitations

Let’s start with the latter point – the Wolfson card receives a 5V PSU feed from the Raspberry Pi, via the 26 or 40-way GPIO header. Pins 2 and 4 provide +5V (via R36), with Pin 6 providing 0V.

This 5V feed then goes to the input of a 3.3V regulator (U13) a RT9167A-33CB low dropout linear regulator. Depending on the load on this regulator it has a dropout voltage of between 55mV and 750mV. The actual load from the Wolfson card is relatively low, so it ends up being a few hundred millivolts in reality.

This means any solution we come up with needs to work with the 5V incoming supply and maintain around 4.3V at its output. RC (or LC) filters are about the simplest solution, but have limitations at low frequencies unless large resistances or large capacitors are used. The former drops too much voltage, the latter becomes very bulky, which doesn’t align with our initial design goal.

The neatest solution seemed to be a capacitance multiplier, a simple circuit that uses the gain of an active device (transistor or op-amp) to multiply the filtering effect of a relatively small capacitor.

The circuit above increases the effective filtering of the RC network formed by R1 / C1 by the hFE of the NPN transistor.

The filtering effect is significant as is shown in the simulation below. Bear in mind the simulation is using ideal components, so the continuing attenuation at higher frequencies will drop off at some point owing to components parasitics such as lead inductance, capacitor construction etc.

It does demonstrate though, that even at 20Hz we can achieve some 35dB of attenuation, adding the additional output capacitor continues this filtering effect at HF, once the capacitance multiplier loses effectiveness. At 20kHz we have over 100dB of attenuation, good for removing the spikey HF noise from a switching supply.

Implementation of this is fairly straightforward but does require care, good eyes (or in my case a good microscope!) and some patience.

Start by removing R36, this isolates the incoming 5V supply from the Wolfson card. The circuit can then be implemented by soldering the components ‘dead bug’ style to the board. I took the 5V into Q1 collector direct from GPIO pin 2, with the emitter soldered to the vacated pad from R6 (this needs care – the pad is tiny!).

C1 -ve connects to 0V at GPIO pin 6, with the +ve leg formed to meet with the leg from Q1 base.

R1 is then connected between GPIO Pin 2 and Q1 base / C1 +ve. I fitted C2 across the 10u capacitor at the input of U13, the 3.3V regulator.

It’s not pretty, but the result looks like this

Capacitance Multiplier (click to enlarge)

Capacitance Multiplier (click to enlarge)

The effect is quite pronounced, here are a few oscilloscope videos showing the effect (apologies for the poor quality).

As can be seen, there’s a lot of noise on that trace and it’s load related, with large spikes as the Pi changes it’s PSU demands depending on the running processes.

Wow, this looks a lot cleaner, all the high-frequency noise and load related noise has gone.

Once the circuit settles the output voltage is around 4.3V, which is well within our allowable dropout for the 3.3V regulator that follows. The multiplier acts as a slow start circuit, with a time constant determined by R1 / C1, in this case that’s circa 0.5s.

For a more detailed look, we need to break out the spectrum analyser and look at the PSU noise.

PSU Noise Spectrum (click to enlarge)

PSU Noise Spectrum (click to enlarge)

The top two traces show the noise of the raw supply, the noise is load related so there are two plots showing the range of values seen.

The orange trace is the analogue noise floor of the Wolfson analogue outputs (Line Out / Headphone Out).

The green / blue trace shows the effectiveness of the capacitance multiplier, it’s providing significant filtering at LF and improving as frequency increases. At 100Hz the PSU noise is at similar levels to the analogue noise floor, by 1kHz it’s approaching the noise floor of the measurement system I’m using (as represented by the blue trace).

It’s quite hard to measure accurately at these levels, -165dBv, as represented by the blue trace is around 6nV!

The above shows how a simple and elegant circuit, that costs little doesn’t need much space can elegantly remove the noise present on a switching PSU, whilst allowing us to keep it’s efficiency and size benefits when compared to an equivalent linear PSU.

Let me know if you try this and how you think it sounds!

This entry was posted in Engineering, Music, Streaming. Bookmark the permalink.

6 Responses to Improving PSU filtering on the Wolfson Raspberry Pi Sound Card

  1. John Lancaster says:

    This mod looks interesting and appears to work better than a simple R/C filter.

    A couple of questions:
    For the test result plots shown, did you use a known dirty PSU, or one of the known cleaner PSUs?
    Is R2 intended to be fitted, or is it just a dummy load for test purposes?

    John

  2. Andrew says:

    Hi John,

    The power supply used was the official raspberry pi supply (made by Stontronics). This is one that actually performed well (in terms of giving good measured results at the Wolfson card outputs) when I tested here (https://alw-audio.co.uk/?p=643).

    R2 was just a simulated load, for testing purposes, so I could evaluate the range of DC voltages at the output under different loads.

    Andy.

  3. John Lancaster says:

    Hi Andy,

    Thanks for the reply. So there are significant improvements to be made even when using the official Pi PSU!!
    When I have time, I’ll try your mod and report back. The only thing I’m wary of is that the digital signals from the Pi could be present before the sound card was properly powered up, which might lead to problems, depending on whether the Wolfson chip is sensitive to this. However, if you already tried…

    John

  4. John Tindle says:

    Andy,

    Have you tried running the Pi from a linear supply (eg parallel 7805s)? I ask because this is what I am proposing to do in my “final” build ….. even though a SMPS is giving pretty good results.
    The same question from a different angle would be …. do you have a feel for how much noise originates from the power supply and how much is generated “on board” the pi and then passed to the Wolfson?
    The other obvious answer would be to power the Wolfson from a single Li cell …. which I think you mentioned over in the Element 14 thread. Since the dominant noise from a battery is shot noise and related to the internal resistance, this ought to be the optimal solution, except of course for the complexity of charging the cell (when the system is not in use)

    • Andrew says:

      Hi John,
      I have tried the Pi from a Linear supply, but your suggestion of giving just the Wolfson card a separate supply is better – there’s quite a lot of load-related demand on the Pi PSU and even a good linear will suffer noise as a result. If I were boxing a unit up in a larger enclosure I would give the Pi a switching supply and the Wolfson card a really good linear shunt regulator, fed from a current source, thereby isolating the board from external PSU interactions.
      Noise isn’t the be-all and end-all for audio power supplies, I’ve never like batteries for this reason, their noise output is non-linearly related to the load, the linearity of a PSU, especially one implemented using series regulators, is often more important, sonically.
      The capacitance multiplier solution was a quick, elegant and simple single-box compact solution that runs from a single supply, but it’s not necessarily the ultimate solution.

      • John Tindle says:

        Andy,

        Many thanks for the advice. I’ve done a bit more digging through the schematic for the card. Moving the 0R from R36 to R44 will connect the 5v rail to the power jack (I think!) . So I will run a linear 5v in through there, but equally it would give you (or more precisely those following this suggestion) a bit more space for the capacitance multiplier (Hardware is not my speciality, but even so in 40 years as hobbyist I have never seen that circuit. Very neat, very simple, I must LTSpice it sometime simply in order to educate myself)

Leave a Reply

Your email address will not be published. Required fields are marked *