Controller 1..4? Which is which?


#1

Hi,
can someone tell me, which is controller 1,2,3,4?
The building instructions are not clear in this point. I can see from the pictures (according to the wire colours), that the both upper are controller 1 and 3 and the lower ones controller 2 and 4 (looking on the front panel),
But are 1 and two on the left or on the right side?

Clarification would be great.

Thank you in advance.

Regards, Thorsten


#2

Well working it out . . .

Controller 3 is connected to GPIO pins 11,7, 7(2in1) and 9,
Controller 4 is connected GPIO pins 16, 15, 13 and 14
Controller 1 is connected GPIO pins 32,29,8(2in1), and 30
Controller 2 is connected GPIO pins 38,36,33,39 .

of these 9,14,30 & 39 arre grounds from the Raspberry pi GPIO pin diagrams

Looking in the config data of the non current file zynthian -gui.py than comes straight from the pre burned image you see:

hw_version=“PROTOTYPE-4”

Controller RBPi connector upside / Controller Singles

elif hw_version==“PROTOTYPE-4”:
zyncoder_pin_a=[26,25,0,4]
zyncoder_pin_b=[21,27,7,3]
zynswitch_pin=[107,23,106,2]
select_ctrl=3

Thee don’t seem to match but there is a layer of mapping that, perhaps, isn’t obvious.
This is because to the Software there are virtual concepts called GPIO pins which the software refers to by number and this is largely related to the CPU used on the board,

But the designer of the raspberry pi ( and indeed anyone that uses the chip) is free to map these onto a header on their board in any way that seems fit to them.

So there is GPIO map to actual physical pins that appear on, what to us, is the defacto standard set of pins.

Controller 3 is connected to PI pins 11 (GPIO17) ,7 (GPIO4), 7(2in1) (not on Rasp-pi header),
Controller 4 is connected Pi pins 16 (GPIO23), 15 (GPIO22), 13 (GPIO27)
Controller 1 is connected Pi pins 32 (GPIO12),29(GPIO5),8(2in1)(not on Rasp-pi header),
Controller 2 is connected Pi pins 38 (GPIO20) ,36 (GPIO16),33 (GPIO13) . . .

zyncoder_pin_a=[26,25,0,4]
zyncoder_pin_b=[21,27,7,3]
zynswitch_pin=[107,23,106,2]

But it still seems confused . … . Anyone see my mistake … ?

In answer to the original question

encoder 1 is Channel
Encoder 2 is Back
Encoder 3 is L/S
Encoder 4 is Select


#3

That’s what i need to know. Thanks :slight_smile:


#4

I would add that I built it as per the diagram above and it works so that seems to be the correct mapping and naming of the encoders, but treat the information above as suspect . . .


#5

You can find a scheme in the wiki user’s guide:

http://wiki.zynthian.org/index.php/Zynthian_Users_Guide

I just added this scheme to the “Building Tutorial” too :wink:

Thanks for the feedback!


#6

Hello,
yes, i was also a bit confused about which controller is which, so here is my resolution:
… I followed (connection-wise) exactly the instructions given in Jofemodo’s tutorial for an official Zynthian kit.
… using the controllers supplied with the kit, follow the exact Fritzing wiring diagram, where you find the controller’s numbers 1,2,3,4
… check correct cable placing with best possible concentration (I had to re-do it about 10 times until I found out that it is much easier to first connect the cables to the ribbon cable connector and only after that fasten the controllers and display to the box cover .

Now you want to know which controller is responible for which of the four function “CH, BACK, LS, SELECT” as printed on the box covers? Ok, the main tutorial does not describe that very clearly, and confusion arises when you try to find the resolution in some other corners of the repository, mainly because several modified models are described, and there is also some confusion about the RPi GPIO pin numbers until you find on one of the last tutorial pages that GPIO numbering follows the Wiring Pi system. I had already planned to add some diagrams with some clarifications, but i have not found out until now how to upload PNG or JPG without creating a big mess :-((

For the "Official/Reference Box I have finally found the correct functionality in the software repository, and it’s working in my box as follows:
… controller 1 = top left = CH controller 3 = top right = LS
… controller 2 = bottom left = BACK controller 4 = bottom right = SELECT

hope that helps a little - for more explanation see the other valuable responses ;-))
regards tom


#7

Great stuff. That will help a lot!

I took a look at the schematic, but the encoders were marked with local language acronyms (LB, RO, …, maybe netherlands?). Nevertheless, i got it because of the L and B in combination with the knowledge that 1 and 3 are the upper ones :slight_smile:
So another Suggestion for improvement: Always use language independent (if possible) and clear descriptions/abbreviations in schematics.

Cheers, Thorsten


#8

That’s a Sunday Morning I ain’t going to get back :slight_smile:

I must have been lucky with hifiberry amp+ wiring co it all kind of fell into place.

We certainly need a comprehensive chart of this to map he pins properly to the code mechanism.
I will have another go when I get the time.

I’ve chased the encoder switches throu’ the software but the values generated by the up/down encoding seems to be routed differently . Once I’ve got that mapped and explained I will try to produce a summary.
Sorry for polluting this thread with (semi) un-related discussion but it does seem to me that if the community can resolve this then that frees up jofemodo for higher things and also spreads a little love and knowledge . . .


#9

Hello wyleu,

thanks for your sympathy - I will be sending some (hopefully) tables, diagrams etc by end of the week to decrease some of the uncertainties in the descriptions.
Maybe I myself am a bit too picky about comprehensive and exact descriptions (in my former job we called that to make a paper fool-proof),
and maybe a bit more explanation (which, of course all the fine wizards don’t really need) can help to encourage more beginners like me to b uild their own box.
But maybe some will have to double check what I seem to have found out …
In order not to create more loops, do you think it would be OK to put these remarks into a new topic like “zynthian parts layout, pins and wiring” before the more important clarifying parts are added to the tutorial(s) and wiki pages ?

regards, Tom


#10

I wouldn’t invest too much time. As far as i remember, there will be a one-controller solution in the future.


#11

It’s more an exercise of comprehension and helping the home builder . . .