Encoder switches False trigger


I have the same problem with the new software. I had so many accidental switch off and switch to Multitimbral Mode (I press the Select anywhere else but the Turn off or the Admin appears just before the press) that I connected a mouse and a keyboard instead.

Similar hardware, encoders connected direct to gpio. I have KY-040 encoder moduls, 3.3v connected - the experts say here this isn’t the best, but it was very easy, and worked until now. Hifiberry DAC+ ADC soundcard here.

1 Like

Hi! Thanks for confirming this issue! I’ll try using MCP chip, but that’s in the mail and will take some time before I try it.

@riban @jofemodo any advise?

@gilrain Created a ticket just in case: Encoder switches False trigger in the latest Zynthian update · Issue #839 · zynthian/zynthian-issue-tracking · GitHub



1 Like

Thanks for raising a ticket. I am away for a few more weeks so don’t have access to a device on which to test this specific confirmation.


Like @riban , i’m not at home and have no access to hardware to test. I have tested the last stable in v1 zynthians, what are directly connected to RBPi pins, and it worked flawlessly.

Anyway, the encoder code has been deeply refactored and things work quite differently now, so perhaps your encoders are not working OK, specially if they didn’t have debouncing capacitors. I strongly recommend to have 10uF on each encoder pin, and 100uF capacitors for switches.


1 Like

Thanks @jofemodo . Would the Basic Kit v4 be the real solution?

1 Like
  1. Tried encoder modules with 5 pins, those have 5v in and pull up resistors.
  2. Tried bare encoders with debouncing caps.
  3. Tried bare encoders without debouncing caps.
    On old Zynthian os not a single issue with all 3 setups above.
    Same 3 setups on latest Zynthian- power off, mixer false trigger all the time.
    After opening Mixer by pressing CTRL-2 (back) button, in about 5-6 second Admin window opens. When trying to add instruments in the middle of that process Admin window keeps opening, interrupting the workflow.

It seems like the release is not being captured and the presses are being managed like long presses. I’ve tested the new code with bare encoders with debouncing capacitors and they work nicely, anyway, i will test again and will try to reproduce your issue. @riban, perhaps we should scale the priority for implementing a proper event queue instead of the direct call approach we are using currently. Do you remember our talk?

1 Like

I remember everything… eventually!


I’m pretty sure of that! :sweat_smile:

1 Like

Got MCP23017 as I was hitting a wall with my encoders soldered to GPIO. Even though I had those debouncing caps soldered in, the value of caps were correct. So by soldered encoders to MCP23017 I resolved my issue.


I’m not a big advocate of using the GPIO pins . . .

Agree, but using GPIO makes Zynthian more accessible to DIY noobs. The less components required, the lesser is a chance of a mistake :slight_smile:

The available GPIO pins are becoming more and more restricted and especially with the changes required by Pi5 they ain’t really the most reliable mechanism.
I’ve had to alter my early zynths twice because pins I’d used were swallowed up by some lower level Pi mechanism…
And once you add the number of buttons that the v5 Zynthian uses it becomes easier to pass off the functionality to something external probably running off 12C… This is how things develop. IT also becomes a little more side stepped as the API develops.

Such is progress.

Here’s some early wyleu GPIO efforts…



It’s like looking at Cave Art Paintings of the Lascaux Cave!

I particularly like the way the yellow knob indicators complement the yellow labels.

1 Like

Yes, the marketing department went throu’ hell coming up with that…

The alignment of the speaker screws and the holes was primarily optomised about the devices response in the sub woofer range…

Hifi zealots were particularly impressed and you can obviously see the oxygen free plastic used on the wires. . .

1 Like

So, if, some time in the future, I would want to add more buttons, should I just buy a second MCP23017?
Currently I only have 4 encoders and 4 buttons attached to MCP23017. There’s no more empty pins there I think, and even if there were, I wouldn’t know how to add and assign those.
But at the same time I got lots of unused GPIO pins that I could have used to attach extra buttons to.
Currently, instead of trying to do the 2 things I’ve mentioned earlier, I’ve built an arduino based pedal board with Program Change and Control Change buttons. I’ve used MIDI learn on Zynthian to assign those to what I need. But that seems like a workaround. In theory I could implant that arduino into Zynthian case, drill some holes and put those buttons where I want them :slight_smile:
My case is a DIY wooden triangle box, so it would be easy to do.

That’s probably the best way to go…

1 Like