Encoders made EASY?

Ignore + pin.
Connect GND pin to a common ground / OV.
Connect the SW pin as the switch.
CLK & DT are the two encoder pins.

In the example chart you have posted, CH, BCK, LS & SEL represent the four encoders: Chain (layer), Back, Layer/snapshot & Select.

So with this example, the top left encoder would be connected:

23: SW
24: DT
25: GND
26: CLK

(I may have DT & CLK reversed - try it and test.)

Note that that pinout uses the I2S pins which would not be compatible with most audio hats.

1 Like

Thank you very much for your fast response.
Game starts now :wink:

Encoders are the original naming convention…

CH is Channel ( the original name for chain) top Left,
BCK is Back… Bottom Left
LS was Layer /Snapshot and is Top Right
SEL is Select Bottom Right.

As the person who drew up the chart above in all it’s colourful glory, I can, perhaps, shed a little light.

And explain some of the complications.

Firstly the encoder you have is not the possibly the one that is used on the zynthian in it’s initial state with 1/0 connection.

The normal one used is a simple pair of switches that connect to wires to each encoder to OV in a clever sequence that allows the 1/o pin to work out if the encoder rotary mechanism is
1/ not turning
2/ turrning left
3/ turning right

As you say the other connection is for the switch, but once again the zynthian 1/o pins for this switch are expecting to be connected to 0v ( or GND ) to signal that the switch ( a completely seperate device from the rotary component) has been pressed.

The four encoders where designed in this scenario to allow four grouped wires to be connected to adjacent pins on the 40 pin connector on the Pi.

So the group of wires and a ov go to the appropriate encoder.

If you have a multimeter available ( mine blew up yesterday … growl) You can test the encoder to see if it does indeed make the appropriate connections to 0v at the appropriate time. The switch should be open circuit when not pressed and at 0v when pressed.
The encoder can be checked by the continuity setting on the multimeter showing a series of brief connection that connect briefly as it is turned. across BOTH + & - pin and then checking the individual connections to OV on each side.
This is the grouping of the colours in the right hand column, marked New i/o

Again with a multimeter you can check the actual pins on the encoder itself and see which of the labelled pins they are connected to. I don’t know what the clk connection does.

The rainbow coloured pins are the pins of the Pi GPIO connector.

This gets the hardware connected but you need further information from the chart to configure the hardware configuration you have used to match what the zynthian expects…

.Ok. Just read @riban reply. He seems to recognise the encoder module so assume he knows better.

He’s right about the 12c pins but this was all inside a tiny case and it didn’t use 12c…

I also don’t know if the table is current I did have to change at least one pin, because something deep within the Pi changed and they no longer worked. The secret with getting it all going is getting one encoder working and work from there. The select is the easiest because it does the most work. BCK next, and then look at the top two. To do anything that isn’t approached logically get’s confusing quickly, and thats before you consider the two avaailable numbering sequences for BCM pins versus IO pins.

1 Like

Thank you very much @wyleu !
Probably this afternoon I´ll give a try and comment later.

Hi @riban and @wyleu!

I have made a cable “very carefully” with the settings of this table soldering only the first encoder (CHANNEL) to test if it works properly

After that, I have made the wiring as the next image,

but nothing happens. I have tried several configurations found on the discourse zynthian, changing addresses but the only result got was a red error.
So I am guessing if I must procede to soldering the 4 encoders before getting a result? Or should have to work, with a different wiring settings? This is crazy! :scream_cat:
I promise, after make it functioning, I will make a dummies guide to connect encoders directly to GPIO

You have to use the WiringPi numbers (wPi on your picture):
A-pins: 10,21,23,28
B-pins: 11,22,24,29
Switches: 14,26,27,25

1 Like

Start with the select and back encoder switches and work up from there.

1 Like

Ok. I see. Was suspecting something was missing out…
Tomorrow will try again. I will comment later.

Thank you very much guys!

Hi @gilrain!

After changing settings as suggested, I am getting RED ERROR.
So, I ask again: may be a consequence of having soldered ONLY first encoder (CH) to test?

Does it work if you set hardware to dummies?

HI @riban!
I changed to dummies as the picture, and red error disappear but nothing works. Do I have to write the wiring of encoders on dummies and save?

I have a question. May be some kind of interaction with my sound card? I am using a Behringer UMC404hd in the sense that any of the pins was assigned to it?

One thing more. I have soldered all 4 encoders and problem is the same

Another more. I am using a PI 400. May be some kind of interaction with keyboard?

The reason I suggested setting to Dummies was to prove that it was the Wiring configuration that was causing the problem. With it set to Dummies can you see the UI and get audio out?

Putting a 0 in a specific place prevents that position working which is very useful for testing individual parameters.

Yes. Set to dummies the raspi worked alright again.

I did some changes copying other configurations I found from you. Specifically one, in which you suggested the A and B configs recommended, but setting all switches to 0.
Gave red error too.

May I have “burnt” an encoder with an improper hot application?
The first one I soldered with a more powerful iron, but last three changed to a soldering iron less powerful.

I doubt it, it’s all about 0v so you arent passing currents of any large size.

I found that guessing and trying does’t really help because the encoders require both pins to be connected for the software to make any sense out of it all.
The best approach I found was to use the switches to get it sorted out using the Back & select switches because these have the most useful effect…

Work out which pins these are on and follow the rather confusing route to work out which configs you need to put in the wiring sections.
Once you have the four switches worked out then proceed to the select encoder and connect hat up and select the correct values for your configuration.

That will prove one encoder ( the select) and once you have done that it’s just a matter of being methodical to sort out the others.

A parameter page is good because that does nothing other than use the encoders to move values on the screen rather than elements like menus, and it will allow you to see if you have the encoder pins the right way round.

Try to work out the relation between the GPIO pins & the pin from the chart.