CONNECTING A BOARD WITH CABLES
Some users don’t want to plug the board directly onto the Pi, but connect it via cables. First of all let’s say that this isn’t a supported configuration and we won’t guarantee that this will work at all. You would have to connect ALL power supply pins and all pins listed above. We strongly recommend to connect all pins with a 40-pin flat-ribbon cable. But even then you can’t be sure it will work. The shorter the cable you’re using the better your chances. Don’t even try long 30-50cm cables here!
Also note that soldering onto the HiFiBerry board will void warranty.
I would advice to request support from Hifiberry. I think we have tried everything, the issue seems with the AMP100. Not with the encoder plugin, as it works flawless on the rPi.
Sorry
when I make changes in the plugin ui, should those values save to the config.json file? My file does not change. I’m wondering if that is why I can’t get my encoder to work.
When you make changes in the UI and save them, they are saved in /data/configuration/system_hardware/rotaryencoder2/config.json.
Please note, that there is another version of the file under /data/plugins/system_hardware/rotaryencoder2/config.json, which is not changing when you save, because it is the ‘reference’ version of the file, which stays always “as installed” - U can e.g. use it to go back to the default, when something is messed up.
If the file in the configuration folder is really not saved, then please report back, because then I will need to upgrade my test-system to the latest Volumio version and see what changed.
I posted a few videos on Hifiberry Community to show how it works perfectly directly to the Raspberry and how it messes up with the AMP100. Hoping I’ll get a solution!
As you can see and hear, with the Raspberry by itself, the volume does change as excepted : video-A
When connected through the AMP100, it doesn’t make any sense, if I turn the rotary clockwise or anti-clockwise, the volume goes down, sometimes the volume goes up a few ms after turning the button.
In video-B,I use the GPIO through the AMP100, and as you can see and hear, sometimes anti-clockwise turn the volume up, one second after it turns the volume down… and after it doesn’t do anything…
Another example with the AMP 100, maybe not easy to hear. What I did 2 steps anti-clockwise (the volume turn down) and then 1 step clockwise (the volume still turn down…) : video-C
Hi again.
I needed some time to catch up.
As far as I read, the issue only occurs with both the Amp100 and the rotary connected and disappears, when the Amp100 is removed.
The failure mode you describe (direction of rotation not consistently working, lagging) reminded me of typical issues with floating pins, poor pull-up/pull-down configuration etc. What I mean: it sounds like the digital input is not clean at the GPIO 8 & 11 pins.
If the lines on the Amp100 PCB are just passed through 1:1 from the RPi Header to the Amp100 header without anything connected, there is no rationale explanation why it should not work.
However, if there is anything connected to the pins on the Amp100 board (e.g. resistive connections to GND) the combination of the pull-ups of the KY-040 and that resistive connection could make a voltage devider and bring the voltage level at the GPIO into the wrong range (high voltage is < V_IH or low voltage is > V_IL). The RPi will not be able to properly interpret it and it may sometimes be interpreted as high, sometimes as low (randomized by switching noise).
Best would be to measure the voltage directly on the GPIO pins with a Multimeter or better Oscilloscope. Multimeters start at 5€ on eBay - might be worth investing.
The Hifiberry support told me it is not 1:1 because they didn’t have enough space on the PCB, but GPIO-8 and GPIO-11 are active. (from Hifiberry community)
Ok I’ll try to check on that side too!
Otherwise, do you think it could be a good solution to solder the rotary cables directly on the back of the Raspberry? Or it would interfer?
But that header-extension is not guaranteed to solve the issue. The electrical connection will still be there and connect to whatever is on the Amp100 PCB. You move the connection to another location, but it still is on the same net, same potential.
It may however enable you to use other GPIOs.
By 1:1 I do not mean, that all pins are connected (obviously not the case as stated by the Hifiberry support), but I meant that the available pins are just passed through the PCB with no components connected to them on the PCB. In that case, it should not make any difference whether you connect to the pin on RPi, Amp100 or header-extension.
Just another idea: Are we sure that the GND pin and 3V3 pin of the Amp100 header are connected through the PCB? If GND would be floating, that might explain the erratic behavior.
I suppose, that all of them are just connected to the GND-plane in the PCB - but who knows.
Maybe just try to use the other GND pins - chances are slim, however.