Encoders directly to the GPIO of the Pi 4?

Thanks for the pictures and detailed connection details. I can see the issues…

First you must use the WiringPi numbering scheme, not the BCM scheme so use these numbers:


Next you need to avoid the serial port on physical header pins 8 & 10 (GPIO 15 & 16) as these are used by Zynthain for its physical MIDI interface. Even if you don’t wire it out the Zynthian still enables the MIDI port and uses these pins.

I have tested each of the following GPIO and proven they all work so you should be able to wire to any of these for switches / encoders: 8, 9, 7, 2, 3, 12, 13, 14, 30, 21, 22, 23, 24, 25, 1, 4, 5, 6, 10, 11, 31, 26, 27, 28, 29.

If you intend to use I2C for anything (now or in the future) then avoid using GPIO 8 & 9. If you intend using I2S audio then avoid using GPIO 1, 24, 28 & 29. If you use GPIO 9 for a switch contact then you can use that switch to turn the Zynthian on from its standby state (off but power applied, e.g. after a manual power off). You may wish to avoid using GPIO 30 & 31 which are used by Raspberry Pi to access onboard EEPROM.

3 Likes