rostrocaudal
Posts: 6
Joined: Thu Apr 29, 2021 7:53 am

Custom PCB to add audio to Pi0

Thu Apr 29, 2021 8:00 am

Hi all,

Please accept my apologies if this post better suited in another board.

I'm trying to implement the audio hardware found on the Pi 3B+ and similar on my Pi Zero as a starter project in the Pi World.

So far, I've implemented the majority on the schematic, but would love for some feedback before I ship this off for production - as a newb to EE, is there anything else I'm missing?

Many many thanks in advance!

Image

jayben
Posts: 277
Joined: Mon Aug 19, 2019 9:56 pm

Re: Custom PCB to add audio to Pi0

Thu Apr 29, 2021 8:39 am

A quick glance at the LM2596 data sheet suggests there are a lot of components missing from your power supply. I'm guessing you are using switchmode modules with these components, but the resulting circuit contains quite a few unknowns.

You need to be aware that switchmode regulators can generate quite a bit of electrical noise which needs to be carefully handled, and in your design you'll have the beat frequencies from 3 regulators to contend with.

Audio projects are generally very sensitive to such noise (human hearing is very good at detecting it) so I'd consider replacing some or all with linear regulators, if your power budget permits this.

[edit] U2 doesn't seem to be doing anything: a linear regulator with 3.3V in and 3.3V out?

rostrocaudal
Posts: 6
Joined: Thu Apr 29, 2021 7:53 am

Re: Custom PCB to add audio to Pi0

Thu Apr 29, 2021 9:39 am

jayben wrote:
Thu Apr 29, 2021 8:39 am
A quick glance at the LM2596 data sheet suggests there are a lot of components missing from your power supply. I'm guessing you are using switchmode modules with these components, but the resulting circuit contains quite a few unknowns.

You need to be aware that switchmode regulators can generate quite a bit of electrical noise which needs to be carefully handled, and in your design you'll have the beat frequencies from 3 regulators to contend with.

Audio projects are generally very sensitive to such noise (human hearing is very good at detecting it) so I'd consider replacing some or all with linear regulators, if your power budget permits this.

[edit] U2 doesn't seem to be doing anything: a linear regulator with 3.3V in and 3.3V out?
Thanks very much for your reply! I'll have to have a look at the regulators - those in the above schematic are purely a simple symbol used as I'll be using a typical LM2596 module from Amazon.

I believe I may have misunderstood the linear regulator input - based on the datasheet for this I believe I have to supply 4.3v in in order to get a 'clean' 3.3V regulated output to plug into the buffer.

I wonder as I'm not looking for particularly high-quality audio (will just be used as a replacement of an electret microphone SIM800 GSM module - https://img.filipeflop.com/files/downlo ... IM800L.pdf), whether this is worthwhile, or perhaps I am better off keeping it simple and using something like the below link?
https://learn.adafruit.com/adding-basic ... -pwm-audio


Microphone input for reference (hoping to feed PWM audio out from RPi to this) Image

LTolledo
Posts: 5355
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: Custom PCB to add audio to Pi0

Thu Apr 29, 2021 10:59 am

if not pursuing high quality audio...K.I.S.S! ;)

seems this is just small part of a bigger project
what is the end goal of this big project of yours?
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

jayben
Posts: 277
Joined: Mon Aug 19, 2019 9:56 pm

Re: Custom PCB to add audio to Pi0

Thu Apr 29, 2021 2:55 pm

I've never attempted anything like this, but can imagine all sorts of problems trying to replace an electret microphone with a PWM output. The electret is essentially a variable capacitor, with both terminals floating, whilst the PWM output is a single terminal, with a low impedance to ground.

Before laying out a PCB, I'd do some basic tests to make sure the idea is workable; if (as I suspect) all you get a horrible noise, then maybe try AC coupling the PWM to the mic + terminal (e.g. insert a series capacitor, perhaps around 1 uF). I suspect with a bit of experimentation, you may find something that works, but the microphone input certainly isn't designed to be used this way.

rostrocaudal
Posts: 6
Joined: Thu Apr 29, 2021 7:53 am

Re: Custom PCB to add audio to Pi0

Sat May 01, 2021 2:28 pm

LTolledo wrote: if not pursuing high quality audio...K.I.S.S! ;)

seems this is just small part of a bigger project
what is the end goal of this big project of yours?
Hopefully a home automation system of sorts, but running via phone with DTMF & audio files rather than anything else. An experiment more than anything!

rostrocaudal
Posts: 6
Joined: Thu Apr 29, 2021 7:53 am

Re: Custom PCB to add audio to Pi0

Sat May 01, 2021 2:30 pm

jayben wrote:
Thu Apr 29, 2021 2:55 pm
I've never attempted anything like this, but can imagine all sorts of problems trying to replace an electret microphone with a PWM output. The electret is essentially a variable capacitor, with both terminals floating, whilst the PWM output is a single terminal, with a low impedance to ground.

Before laying out a PCB, I'd do some basic tests to make sure the idea is workable; if (as I suspect) all you get a horrible noise, then maybe try AC coupling the PWM to the mic + terminal (e.g. insert a series capacitor, perhaps around 1 uF). I suspect with a bit of experimentation, you may find something that works, but the microphone input certainly isn't designed to be used this way.
I'm certainly expecting some form of noise and from examples online! Have seen some examples with a 3B+ I believe going directly from 3.5mm audio out straight into the microphone input without major issues, so hoping for similar.

Have just ordered a UDA1334A breakout to experiment with, if it works with this, perhaps it'll work on a more custom setup!

drgeoff
Posts: 11941
Joined: Wed Jan 25, 2012 6:39 pm

Re: Custom PCB to add audio to Pi0

Fri May 07, 2021 8:09 am

Adjusting R5 will have no effect as drawn.
Quis custodiet ipsos custodes?

Return to “Graphics, sound and multimedia”