-
Notifications
You must be signed in to change notification settings - Fork 397
Hardware Pinout Overview
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.
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 | 23 | SCK | ||||
10 | 19 | MOSI | ||||
11 | 21 | 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 |
This hardware can be connected to any free GPIO, but it is good practice to align with the standard pin-out of this project.
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 |
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.
If you like Phoniebox, consider: buy me a coffee or PayPal
- Code: https://github.com/MiczFlor/RPi-Jukebox-RFID
- Phoniebox home page: English | Deutsch
Phoniebox is a contactless jukebox for the Raspberry Pi, playing audio files, playlists, podcasts, web streams and spotify triggered by RFID cards. All plug and play via USB, no soldering iron needed. Update: if you must, it now also features a howto for adding GPIO buttons controls.
Visit Phoniebox.de
π₯ Version 3
- β Releases
- π΅ Install Jukebox Version 3
- π Report a bug
- π Propose a feature
- βοΈ Feature Status
- π Documentation
- π©βπ» Development
- βοΈ Contributing
- π¦ Code
πΆ Version 2
- β Releases
- π΅ Install Jukebox Version 2
- π Report a bug
- βοΈ Features
- π Documentation
- βοΈ Contributing
- π¦ Code
Version 2 Pages
-
Setup / Upgrades
- Synchronising Phonieboxes in a local network
- Smart Home remote control with MQTT
- Hardware Pinout Overview
- Systemwide Equalizer
- Phoniebox with read-only Filesystem
- HiFiBerry Soundcard Details
- WM8960 Hi-Fi HAT
- PAM8403 Amplifier Power Off
- TPA3118 Amplifier Power Off and EMI improvement
- External Non USB Audio DAC ES9023, PCM5102, etc.
- On-board LEDs with fibre optics
- Setting GPIOs at boot time
- Stop on removal with USB RFID Reader
- Firmware update improves audio out
- Architecture