Zynthian dose not recognise mcp23017

hey, I wanted to build a zynthian with a couple of parts I had lying around. I am using a raspberry pi 3, a hifiBerry DAC +, a clone 3.5-inch gpio LCD screen, an MCP 23017, and these encoders:


I dont care about the analog midi in, out and trough puts because I will be using the zynthian only with a USB midi keyboard. To connect the encoders to the raspberry pi I changed the standard all-in-one PCB a bit and assembled everything on a breadboard, but I can’t get it to work.

the MCP 23017 is not being recognized in the web interface, and the encoders are not doing anything.
mybe I am missing something obvious and someone can help me.
best regards and thanks in advance, Lorenz.

i2cdetect -Y 1 on the command line will at least reveal if the i2c (MCP23017) system is visible to the raspberry pi and will show which i2c port are addressed.

You can use the terminal in the webconf to access the command line

Here you can see the MC23017 on port/address 20 which is where the zynthian expects to see it.I would hazard a guess, with the 5V connection the encoders are of the type that zynthians have trouble with from memory.

thank you very much for your fast reply :blush:

sadly the terminal is not looking very promising :

there is nothing at port 20.

I would hazard a guess, with the 5V connection the encoders are of the type that zynthians have trouble with from memory.

do I understand correctly that zynthian has a problem with encoders at 5v?
( sorry English is not my first language )
if so, I think I could also run them at 3.3v

best regards, Lorenz.

The encoders on the zynth short the encode switches to 0v. I’m sure there is a discussion somewhere in the forum about differing encodes, but I can’t find it from a quick look. But if you are not seeing anything in 12cdetect it’s time to check the wiring…

2 Likes

thank you I, will check it :+1:t2:

so I checked the wiring like 50 times and there is still no sign of life. I also tried connecting the mcp23017 without any of the encoders but sill no success. even tried a different mcp23017 to rule out that the mcp was broken, still no success. I also tried different pins for the int a and int b connections. I am personally out of ideas what could be wrong, maybe I got very unlucky and had two faulty mcp’s, but I think that quiet unlikely. maybe there is also something wrong with my withering schematic. if someone has had the same ore a similar problem and can help me out that would be verry much appreciated. I think Zynthian is a fantastic platform and a very good Idea, I would love to participate in that. :slightly_smiling_face::+1:t2:

Hi, maybe a stupid question, but is I2C enabled in /boot/config.txt:
dtparam=i2c_arm=on

???

1 Like

hello, thanks for the reply, yes dtparam=i2c_arm=on is enabled.

Hmmm.
Maybe your I2C is broken elsewhere.

I see that you are using an Hifiberry dac+ . I think, but not sure at all, it is build around a pcm5122 codec wich one use I2C for controlling some codec parameters (like mute, bypass, internal preamp stage level and so on).
You Can try to see if your dac Alone is recognized as an I2C interface (with i2cdetect).

Another option is to test your hardware setup under a stock raspberry pi Os

1 Like

uuuh, I think you are on to something, the HiFiBerry on its own is not being recognised


so maybe my pi is faulty ?
ore could it be a software problem ?
I am going to try it out on an other pi and see if it works then. :blush: :+1:t2:
if not there must be a software problem

ok, so I tried it on an other pi 3 b+ a there I also can’t detect any i2c device when the hifiberry is connected.
so I guess it has to be a software problem, somehow my i2c devices are not being recognised.

To allow us to sanity check the wiring will you please provide the actual pins that you are connecting to on the Raspberry Pi and the pins they connect to on your MCP23017?

1 Like

of curse, this is the bear bones wiring I used just to check if the i2c device is recognised:

Raspberry Pi uses 3.3V GPI pins. Maybe the MCP23017 should be connected to 3.3V rather than 5V (and hopefully that hasn’t blown those pins on the Pi!)

1 Like

I’ll try that :blush: :+1:t2:

no still nothing, I suspect there is something wrong with the pi receiving the i2c data, because the hifiberry is also not recognised. but maybe that’s wrong…

What image did you flash to the sdcard? Have you done any apt upgrades? (Please don’t.)

1 Like

ohh :grimacing: :sweat_smile:
I used the news image on the website from two days ago, and updated from the web config a couple times because I taught it might be a software bug. was that bad ?

Updating using the webconf or UI admin menu is fine but performing a manual apt upgrade will break it.

The current stable image is 2104.

1 Like

yes that’s the image I burned, the las stabile image.