Encoders made EASY?

I will investigate. Thanks

@riban can it be that the caps and resistors on the KY040 encoders are interfering? Because if @erasmo wired everything correct, I think it should work… (I provided a slightly different layout yesterday, so it can also be that I made a woopsy)

Anything is possible but let’s confirm that the encoders and switches are connected as per the chart and that webconf is configured with the correct settings, which for @Keeze101’s layout would be:

Encoders A-pins: 22,21,0,4
Encoders B-pins: 23,26,2,5
Switches Pins: 25,27,3,6
MCP23017 I2C Address : Leave blank
MCP23017 INT-A Pin: Leave as Default
MCP23017 INT-B Pin: Leave as Default
Zynaptik Config: Leave blank
ADS1115 I2C Address: Leave blank
MCP4728 I2C Address: Leave blank
Customization Profile: V4 Studio

1 Like

When I disconnect the + pin of the KY-040 encoders, my Zynthian behaves exactly like this. With the + pins connected, the encoders rotate without any problems.

1 Like

Ah! Maybe the onboard pull-up resistors are too small and effectively connect the DT & CLK pins. I think some have removed these resistors but connecting to 3.3V should also work.

1 Like

My encoders rotate without any problems, but the switches are problematic:

Update: I use the onscreen buttons instead of the switches.

1 Like

Hi @riban,

A minutes ago I tested your suggested wiring as reflected in next chart

I have got the same I had with the @Keeze101 wiring. Again, when in MAIN screen, I give any turn to any encoder, the same erratic behaviour appears sending me immediately to other screens/functions, making displacement by menu of MAIN screen impossible

1 Like

Now I have changed in zynthian.local, the encoders A with encoders B and the response is practically identical. Quite a bit strange, does not?

Moreover: may this have any connection with the fact than raspi400 comes with a default enabled keyboard?

The keyboard is internaly connected to the usb controller (via a Holtek HT45R0072 mcu) so it should not interfere with the GPIO’s Can you try to connect the 3.3v line to the + of the encoders?

I have never used the KY040 encoders. Perhaps get hold of some plain (but good) encoders (like the ALPS STEC12E08)

A new approach?

erasmo4:22 pm

Today I just discovered that in the zynthian shop are selling still “Zynaptik-3 module” and though I initially discarded it as is intended to implement midi, after reading more carefully I have seen this: " The Zynaptik-3 MIDI module integrates the 3 x standard MIDI ports only (IN/OUT/THRU). The parts for extended input/output are not soldered on, so, unless you solder the parts by hand, it can’t be used as a CV-Gate interface or for connecting rotaries & switches." –Unless you solder by hand…"

Does anybody think than this may be a way to implement encoders instead of GPIO direct?
I yes, what should I need, besides encoders, to make it work?

1 Like

Of course, in fact it’s designed for this. But the version we have for selling (MIDI version) does not have soldered the MCP23017 chip needed for managing the encoders. You could solder it, but be warned that this chip is not easy to solder by hand. Pin pitch is 0.5mm! I’ve soldered a few ones and my skin start sweating only by thinking of it. The good part is that if you get it soldered on, you can connect the official controllers and everything would work nicely out the box.

I’ve marked in red the parts you have to solder. I could send you the parts with the Zynaptik-MIDI, but please, don’t ask me to solder them :sweat_smile:

Up to you!

1 Like

Thank you @jofemodo!

What a big dilemma: 0,5 pin pitch, it sounds a ROTRING line, but with a soldering iron in my hand that could transform –easily– in a Tapies tin picture :laughing: A past experience with an old synth, trying to recover some PCB bad tracks, I had to take to service repair to get it out of the induced coma that I gave it.

I´d like doing it but I don´t dare. What about rethinking if you could solder it?
Please, tell me.

1 Like

.5 is no problem :wink: I just built a midiphy - LoopA Enhanced Caseless Essential Kit - MIDIbox shop, DIY MIDI sequencer & studio electronics, PCBs & parts: K-LPA-00 which was full of .5 piched components! Just use enough flux and tiny amounts of solder.

I built this monstrosity with an single MCP23017 for my latetst Zynthian…

1 Like

Hi everybody!

New advance… or not…
I just have desoldered all resistors (3 in each one) of encoders and, can you imagine the difference?
NOTHING changed.
Now are performing exactly the same than before.
Not qualified to comment seriously, but does not sound to incorrect wiring?
Of course, as @Keeze101 pointed out, the problem can be encoders themselves.

Any idea or suggestion?

“.5 is no problem”
This encourages a lot! You made me doubt, but should be more safe for me than @jofemodo could solder it, if possible.

By the way @Keeze101, your electronic competences are light-years far from mine. As most of you, of course!

1 Like

Would it be possible integrate this pcb instead of soldering?

I think so, you can even add 4 seperate and programmable buttons :wink: Very handy for instant jumping to different screens.

Adafruit hase one too: Adafruit MCP23017 I2C GPIO Expander Breakout [STEMMA QT / Qwiic] : ID 5346 : $5.95 : Adafruit Industries, Unique & fun DIY electronics and kits Perhaps you can source it in Spain via one of the distributors…

Soldering on anything under 0.1" ( The veroboard standard) is IMHO pretty hard. You need a fine clean tip and the modern solders are not particularly good, so get some good old fashioned leaded solder if you want to try it. These devices are really designed for flow soldering where they work very well.

You think so, but please, can you give some details of how to integrate the resembled pcb or your adafruit suggestion with midi Zynaptik 3?

Connectors to use, recommended pins, etc.
At the moment I have not been able to make it work encoders on raspi400, based on a few recommended wiring that supposedly should have to work, but until now, some give clear red errors -not working at all-, probably outdated or not suitable for pi400; and some work in erratic manner.

In this case, as I understand, 0.5 pitch is five times bigger than 0.1, so, would you recommend me go on and soldering directly over Zynaptik 3?

Connecting one of those boards to the synaptic module should be pretty straight forward. You connect 6 wires from the zynaptik board to one of those modules: 5V, gnd SDA/SCL and 2 interupt lines. Perhaps @jofemodo can tell us if we can use the Zynaptic1 connector for this?
File:Zynaptik 40pin header.png - ZynthianWiki