Skip to the content
PCBKitNew board
2 layers30.5 × 26 mmPi zero analogaudio, the printed circuit board in 3D

Pi zero analogaudio

bablokb/pi-zero-analogaudio2

Circuit and install-script to add analog audio out to a Pi-Zero

Size
30.5 × 26 mm
Copper layers
2
Thickness
1.6 mm
Parts
13
Nets
15
Pads
39
Tracks, vias
31, 0
Pours
2
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
23 Dec 2019
Updated
7 Feb 2020

Overview

Pi zero analogaudio is an open-source printed circuit board by bablokb, from the bablokb/pi-zero-analogaudio repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 30.5 × 26 mm with 13 parts on 15 nets, routed with 31 tracks and 0 vias.

It is built around the STX-3120-5B. Its parts include 4 capacitors, 4 resistors, 2 connectors and 1 IC. It belongs with the audio and music boards of this library.

Main components

1

README

Readme.md

Pi-Zero-Analogaudio

The Pi-Zero is a stripped down board, there is no analog audio jack like on the bigger Pis. But it is no problem to add it using a few simple and cheap components.

The schematic

shows the necessary parts and the wiring. Basically, you configure the Zero to output pwm-signals, then you use a combination of a lowpass and highpass filter to clean the signal on every channel.

The audio quality is ok, but not on hifi level. The filters limit the frequency range and the signal is still not absolutely clean afterwards. If you really need high-quality audio-output, use HDMI, bluetooth or attach an audio-hat based on I2S using a DAC.

Hardware

Required parts:

  • two resistors 270 Ohm
  • two resistors 150 Ohm
  • two capacitors 33nF
  • two capacitors 10µF
  • an 3.5mm audio-jack (e.g. STX-3120-5B from Adafruit)
  • some jumper-wires

In the folder kicad you can find a complete pcb, designed for the above throughhole components. You will need to adapt the design if you use a different audio-jack.

Software and System Configuration

You don't need special software, just use aplay to play wav-files or e.g. mpg123 for mp3-files.

You can configure the system manually, or you can clone the repository and just run the install command:

text
git clone https://github.com/bablokb/pi-zero-analogaudio.git
cd pi-zero-analogaudio
sudo tools/install

The install command will add the following lines to your /boot/config.txt:

text
dtparam=audio=on
dtoverlay=pwm-2chan,pin=12,func=4,pin2=13,func2=4

This configures analog-audio for the physical pins 32 and 33. Other pin-combinations are possible, see the file /boot/overlays/README for a complete list.

In addition, the install command runs

text
amixer cset numid=3 1

This switches the audio-output from auto (0) or HDMI (2) to analog-out (1). You can also use raspi-config for this task (or for switching back).

Parts

13
QtyValueFootprintReferences
210 µFCapacitor_THT:CP_Radial_D4.0mm_P1.50mmC2, C4
2150 OhmResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR2, R4
2270 OhmResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR1, R3
233 nFCapacitor_THT:C_Disc_D3.0mm_W1.6mm_P2.50mmC1, C3
2MountingHoleMountingHole:MountingHole_2.7mm_M2.5_DIN965_PadH1, H2
1Audio OutConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ1
1Pi Connector 2x5 FemaleConnector_PinSocket_2.54mm:PinSocket_2x05_P2.54mm_VerticalJ2
1STX-3120-5BDownload:STX-3120-5BU1

Questions

How big is the Pi zero analogaudio PCB?

It measures 30.5 × 26 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Pi zero analogaudio use?

13 parts, built around the STX-3120-5B. 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 Pi zero analogaudio KiCad files?

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

Can I use the Pi zero analogaudio 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).

Similar boards

  • 2 layers99.9 × 100 mmESP32 power meter MP3 player WIFI radio V2, the printed circuit board in 3D

    ESP32 power meter MP3 player WIFI radio V2

    immortal-sniper1/ESP32_power_meter_MP3_player_WIFI_radio

    Fistst ESP and STM32 pcb project, it will have a power meter sd crd wifi and the ability to play back MP3 file (and maybe more) . Also it will feature a power usage meter. Maybe it will aso have battery power option

    157 parts1MIT
  • 4 layers64 × 115 mmAmp board, the printed circuit board in 3D

    Amp board

    splogdes/Audio-Engine-A5-Input-Stage

    198 parts
  • 2 layers40 × 20 mmUsb uart, the printed circuit board in 3D

    Usb uart

    earthtojake/text-to-cad

    Design physical products with AI

    13 parts26kMIT
  • 2 layers35 × 29 mmMagSpoofTC, the printed circuit board in 3D

    MagSpoofTC

    samyk/magspoof

    A portable device that can spoof/emulate any magnetic stripe, credit card or hotel card "wirelessly", even on standard magstripe (non-NFC/RFID) readers.

    13 parts4.2k
  • 2 layers20.6 × 23.6 mmAO-03 signal amplifier, the printed circuit board in 3D

    AO-03 signal amplifier

    fossasia/pslab-scripts

    Pocket Science Lab - Scripts for Sensor Experiments

    13 parts1.6kApache-2.0
  • 2 layers47 × 35.6 mmMX7-C-35PL C11, the printed circuit board in 3D

    MX7-C-35PL C11

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    13 parts1.2k
  • 2 layers95 × 95 mmCube batteryboard, the printed circuit board in 3D

    Cube batteryboard

    willem-pennings/balancing-cube

    A cube that balances itself in a corner or edge using reaction wheels

    13 parts1.1kGPL-3.0