Hi everyone,
last night I updated my Zynthian (I’m using Vangelis) and after the update the 4 encoders of my self-built Zynthian, move so fast that to not skip a line you have to rotate them very slowly. Before writing here I rebooted several times. Many thanks
Are you using encoders without detents? It’s the same with all encoders or just the “select” encoder?
FYI, we have improved the encoder read algorithm to increase reliability and robustness. I tested with PEC11 with detents and it works like a charm. Please, could you tell me the exact model of your encoders?
Regards
Thanks @jofemodo. I’m using 4 encoders similar to these…
As soon as I get home I’ll confirm if the problem is on all 4 encoders. Thanks
OK! Please, tell how they are connected (wiring).
Regards,
Many thanks @jofemodo.
Could you send a video?
Also, if you could capture the output from the encoder test program:
systemctl stop zynthian
cd /zynthian/zyncoder/build
./zyncoder_test
Then rotate the encoders and capture the output.
Thanks
Each cursor movement corresponds to one click of the encoder. This thing happened after the last update yesterday evening. Before everything worked perfectly. Thanks @jofemodo
I add if it can be useful that you move the encoder faster and then the cursor skips lines… if you move it slowly it skips only one line…
I confirm that all 4 encoders behave like this…
Sorry @jofemodo, I didn’t specify that I’m using a raspberry P5 8Gb
Don’t you use capacitors?
Debouncing capacitors are mandatory for encoder pins (10nF) and very recommend for switches (33nF or 100nF)
Regards
Thanks @jofemodo, I’ll mount them immediately and write the result here.
5 minutes ago:
OK @jofemodo… I soldered two 10n SMD capacitors (I only had those and not disk capacitors) and now it works well… my perplexity would be to know why only after this update a problem occurred that I knew about and had solved as you told me but on other projects… but my computer knowledge probably wouldn’t help me understand… THANKS!
We improved the read algorithm so it works better when encoders get old. It uses the substates between 2 detents to estimate direction when wrong states are triggered. The algorithm doesn’t include software debouncing, so bounced substates probably will create confusion. I could add software deboucing but it’s always better and more CPU-efficient to do hardware debouncing (capacitors). Anyway, i will implement the software debouncing too
Regards,
Thanks @jofemodo, for the explanation that cleared away the fog of my computer ignorance for at least half a second… Now I will solder the capacitors in the remaining 3 encoders. Very kind.
When I grow up I want to be like you and @riban
Wait! Don’t solder yet. So you can test the software debouncing
Too late! Already done… but I have an encoder that I can connect instead of one of those with capacitors, if you need a test, I’ll gladly do it… Should I upgrade?
@jofemodo, I left an encoder without capacitors… If you tell me that I can make an update and test without capacitors, it would be an honor for me to be a Zynthian tester…
Yes, please, upgrade and test with the raw encoder without capacitors. It should work.
Regards,
I’m starting Zynthian… I’ll update and let you know if it works…
I have updated twice (but Zyntian had the heart). This appears at the end of the update but it still doesn’t work…
If you want to make any other changes, I’m in front of the PC and I’ll be happy to wait.
@jofemodo, with capacitors everything works perfectly… but if you need tests tell me, I have an encoder without capacitors and I can put it on and try… many thanks.
Hi @Lanfranco !!
I’ve fixed the software debouncing code (vangelis). Please, could you check if it works with your encoders without capacitors?
Thanks
Since I have the Zynthian open because I’m waiting for the NVMe, I’ll try right after lunch…
I updated this morning… have you made any other changes? because I have the heart on the display… and for now I don’t see any changes without capacitors… it always skips a line.