Skip to content

Hardware Pinout Overview

martinclausen2 edited this page Mar 7, 2019 · 13 revisions

Introduction

Non USB hardware consumes GPIOs on the raspberry pi pin head. Some hardware can be flexibly assigned to different pin (e.g. buttons), but other hardware (e.g. RFID reader, audio DAC) need special functionality, which is only available at certain pins.

This sections only deals with non-USB hardware.

Hardware with fixed pin assignment

This hardware needs certain GPIOs with special functions not available on every GPIO. It is assumed, that rotary encoders and buttons for the same function are not used at the same time.

GPIO Pin RFID (SPI) Audio DAC I2S Hifiberry MiniAmp Hifiberry DAC Light, Zero any HAT
2 3 I2C I2C I2C
3 5 I2C I2C I2C
8 24 SDA
9 21 SCK
10 19 MOSI
11 23 MISO
16 36 Mute free
18 12 BCK BCK BCK
19 35 LRCK LRCK LRCK
20 38 MCLK Only if DAC has NO own clock! MCLK MCLK
21 40 Data Data Data
24 18 IRQ other GPIO possible
25 22 RST other GPIO possible
26 37 Shutdown

Hardware with flexible pin assignment

This hardware can be connected to any free GPIO, but it is good practice to align with the standard pin-out of this project.

Classic Pinout

This pinout has compatibility issues with other hardware! I recommend changing the scripts to a new pinout. However, this assignment had been the standard in this project for a while.

GPIO Pin Button Rotary Encoder other comment
3 5 Shutdown fixed GPIO if wake up is required can be used in conjunction with I2C devices
5 29 Volume B (Data)
6 31 Volume A (CLK) collision with Stop on RFID removal for USB reader
6 31 Stop on RFID removal for USB reader collision with rotary encoder for volume
13 Mute
16 36 Volume Down
19 35 Volume Up collision with I2S DAC / Hifiberry
20 38 Previous collision with some I2S DAC / all Hifiberry
21 40 Play / Pause collision with I2S DAC / Hifiberry
23 16 Amp Shutdown PAM8403-Poweroff
26 37 Next Amp Shutdown collision with Hifiberry MiniAmp

Flexible Pinout

This pinout is designed to give the least collisions with current and upcoming non-usb hardware by not using any GPIO with additional special functions like SPI (9-11), I2S (18-21), I2C (2,3), UART (14,15), PWM (1: 16,18; 2: 13,19). Please note, that also the special functions overlap (e.g. I2S and PWM).

Suggested GPIOs for playlists are 7, 13-15 and as a second choice PWM and UART GPIOs as they are currently not used in the project.

GPIO Pin Button Rotary Encoder other comment
3 5 Shutdown Switch from Track fixed GPIO if wake up is required can be used in conjunction with I2C devices
4 7 Stop on RFID removal for USB reader
5 29 Volume up Volume B (Data)
6 31 Volume Down Volume A (Clk)
12 32 Status LED
17 11 Mute
22 15 Previous Track B (Data)
23 16 Next Track A (Clk)
26 37 Amp Shutdown usable with Hifiberry MiniAmp and PAM8403-Poweroff
27 13 Play / Pause Switch from Volume

Numbers in the text are GPIO numbers, NOT the pins.

Home

πŸ”₯ Version 3

Version 3 Pages

Nothing yet

🎢 Version 2

Version 2 Pages

Installation

Specials

RFID Reader

Sound card configurations

Hardware Buttons

Displays (LED, LCD, Matrix, etc.)

Hacks

Bluetooth

AirPlay

MPD tricks

For Developers

Clone this wiki locally