Encoders directly to the GPIO of the Pi 4?

Hi everyone,

I have published all design files and information of a different usage for zynthian-miniature hardware that I mention above on a github here: GitHub - sstojos/zynthian-miniature: The basic PCB with MIDIs, Sound Card and 4 encoders only for zynthian..

I hope that somebody will find it useful.

Cheers !

1 Like

Hi Guys,
I managed to connect Encoders to the GPIOs. Carefully avoiding pins used by HifiBerry and by anything else. I used those encoders with pull-up resistors, but I unsoldered them ( I have an electrical engineering backgroud so I am quite confident with my iron), but I came across with some strange behaviour with the last encoder (the one that is used for browsing items and selecting). Sometimes when pressing and rotating it invokes the message: “Are you sure that you want to Turn Off the Zynth” (or something like that). I might put on some SMD caps where the resistors were, but I just want to check if there are some settings that I might change so it could be avoided before I do that.
Thanks

It looks like a debouncing issue. The “release” is not being detected, perhaps due to fast bounces. You should consider adding the caps in switches and encoders.

Regards

Ok I try that, 10nF for encoder and 100nF for the switch?

Exactly ! You will note the difference.

Regards

Could only found 100nF in reasonable size (805), would that be problem for encoder as well? I think not, but?

It’s too big for the encoder. You will lost pulses when moving fast. Encoder caps must be 10nF.
603 is not so hard to solder :wink:

Regards

1 Like

I’ve got an mcp23017 setup on the breadboard, my goal is to use these little buttons to test if they work better than the encoder buttons. I have managed to get the chip recognised by zynthian but it doesn’t want to register the button presses. I’m not sure if I’m wiring the buttons themselves incorrectly or if the numbers I’m using in the wiring page are incorrect.

The encoders are still wired directly to the gpio and have been working fine (the rotation part).

@stojos this is amazing, however for Latin American countries the manufacture of PCBs is extremely expensive and has high taxes.
I have access to CNC lasers that can manufacture these boards, but only on one side, would it be possible to evolve this project so that the boards have only one side?
I have no knowledge in PCB programming, hence the question.

Hi @francesconi , it is not possible to have pcb with only one copper layer because components are placed on both sides of PCB. There are switches and encoders on the top and everything else on the bottom.

You would need to separate components into two pcbs: one for switches and encoders and another for everything else and to introduce a connectors to connect these two pcbs. Probably you would also need to remove HUT from design and to differently rearrange switches so that they perfectly align to mcp23017 pins to avoid too many jumping wires.

@stojos I understand, thank you very much for the answer.
Can you tell me if there is a case for the raspberry 5 available for the zynthian miniature?

I have designed one case long time ago and 3d printed it. It was designed for 4.3” screen and encoders on both sides. Assembly was too tedious with a lot of cables - hence me abandoning this approach and designing MINI. Miniature is good for putting zynthian into existing devices (e.g. into existing midi keyboards or midi pedals) but not great for standalone zynthian build where it is important to have exposed rpi’s usb, network and power connectors.

1 Like