Select Option Encoder/Switch not accurate

Hi guys,

Since I’m using my Zbox I’m experiencing the Select Option Encoder/Switch it’s not accurate very often. I mean, I rotate the encoder to select my choice but when pressing the switch the item selected moves up or down and then it is loaded.

Has anyone experienced this issue?

Regards.

1 Like

Hi @smespresati,

I have sometimes the same problems but I thought that maybe a problem of my (cheap) china encoders.

Do you also use cheap encoders?

Regards, Holger

Hi @C0d3man,

I ordered a full kit containing all parts to build the ZBox to @jofemodo, so I cannot tell you where he got it from.

Regards.

He has the right ones (not as my china ware) for sure @smespresati.

@jofemodo sent me the specification of his encoders and compared to my ones they are very good.

Regards, Holger

Hi @C0d3man, here is the spec:

https://github.com/zynthian/zynthian-hw/blob/master/parts/RotaryEncoderBourn-PEC11R.pdf

Anyway, it’s not a hardware problem, but a software problem: Currently, the list selector changes the selected item every 4 encoder ticks. The encoder have 24 detents, with 4 ticks each detent. That’s OK and every detent changes the selected item. This is great when going down thru the menu: you need to move a complete detent (4 ticks) to jump to the next item. However, when going up this doesn’t work very fine. A slighty movement of only 1 tick will change the selection. This can happend very often when clicking the switch, and you get selected the wrong option.

But i’ve a solution in my mind. Let me try it and will see … :wink:

Hi! I’ve implemented a kind of histeresis in list selectors, so it should work slighty better.
Please, from Zynthian Admin Menu:

  • Update Zynthian Software
  • Restart GUI

And test if it works better …

I also noticed that the schematic on github not always represents the physical pinout of the used encoders. Mine common was in the middle (A-C-B), while others are A-B-C.

Perhaps take a look at the midibox software, where this also was a problem…

Current PCB design is for ACB or BCA encoders. Perhaps the schematic is not accurate :flushed:
You better ignore it and use the breadboard view or directly the PCB.
Anyway, with the software fix that i have implemented, it should be enough :wink:

Hi all,

Just updated my ZBox and now the enconder works much better. I guess the @jofemodo’s patch did the trick. Thanks.

Regards, Jose.

Hi @all!
I have implemented a new speed-sensitivity algorithm for the rotary encoders in the zyncoder library. After you update your zynthian software from the admin menu, you will note the difference in the controller screen. Now you can adjust step by step the parameters when you move the rotary slowly, but if you twist fast, the step will increase to 2 or 4 to allow sweeping the full range without changing your fingers.

Please, try it and give me feedback! :wink:

Looks like the interface (scrolling) is more responsive :+1:

Can I update without having to alter the /boot/config.txt?

Hi @Keeze101!

You can protect your boot/config.txt against the update system by adding this line:

#NO_ZYNTHIAN_UPDATE

any place in the file.

Currently this trick only works with the boot/config.txt, but i would like to extend the trick (or something equivalent) to any configuration file affected by the auto-updating system.

Update your software. I’ve fixed some details …

Hi @jofemodo,

I’ve jus updated my ZBox and I think something it’s not working properly. I will describe. When one of saved presets is selected and loaded the Back switch stop working, which means the ZBox must be rebooted in order to change the engine/instrument.

Can you check it out, please?

Regards, Jose.

I do not have this issue… All seems to work fine.

Hi @smespresati!
Can you confirm the issue? The problem is still there?

@jofemodo
I have tested yesterday the update and had no problems.

Regards, Holger

Hi @jofemodo,

Yes, the problem is still here. Seeing the update worked fine for other users I assume something went wrong with my update. The problem is really weird because if I don’t use any of saved presets the Back switch works as it should.

The easy way to fix it I think is reimaging my SD. Perhaps @jofemodo can tell me a way to re-update without reimaging (I tried several times to do it using the admin menu without success).

In other hand, I’m thinking it’s worth it to reimage using the image @C0d3man has created with the promising MOD-UI. By the way, this new image can be updated, as usual, using the admin menu?.

Regards, Jose.

Hi @smespresati!

Please, can you give a “operation sequence” that reproduce the problem for you?
Can you login into your zynthian and run the zynthian’s software from the command line, as explained in the wiki?

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

In that way you can see the messages printed by Zynthian UI and perhaps you see something “interesting” …

Regarding the MOD-UI image from @C0d3man, it’s not a zynthian image … yet :wink:
This image is intended to test the MOD-HOST + MOD-UI software, a kind of “proof of concept”, but it’s not connected to the Zynthian UI (TouchScreen + Rotary Encoders) yet. Anyway, i think you will love to see the MOD-UI working, so please, give a try!! :wink:

Hi @jofemodo,

Here my findings about Back switch problem.

First, I’ll explain the issue details.

Inmediatly after boot the ZBox shows a list of presets on the screen. If I select and load any of them the back switch stop working. Nevertheless if I select NEW to create a preset or just press Back switch to go to the Engine Selection window the Back switch works as it should.

Because it was very simple to do it, I decided to “reimage” the SD card. Once done and before to perform the update, I tested the back switch which worked perfectly. Then, I updated the Zynthian Software and then the problem arose again. Below the messages logged in the ssh session (I tried to upload a txt file but it’s not possible)

I hope all my testings will help you to fix my issue.

pi@zynthian ~ $ sudo /etc/init.d/zynthian stop
pi@zynthian ~ $ sudo /etc/init.d/zynthian startx
pi@zynthian ~ $

X.Org X Server 1.17.2
Release Date: 2015-06-16
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.8.11-2-ARCH armv7l Raspbian
Current Operating System: Linux zynthian 4.1.19-v7+ #852 SMP Mon Mar 7 14:39:14 GMT 2016 armv7l
Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2709.boardrev=0x2a21041 bcm2709.serial=0x7c1e1ce4 smsc95xx.macaddr=B8:27:EB:1E:1C:E4 bcm2708_fb.fbswap=1 bcm2709.uart_clock=2441000 bcm2709.disk_led_gpio=47 bcm2709.disk_led_active_low=0 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
Build Date: 11 January 2016 01:32:44PM
xorg-server 2:1.17.2-1+rpi1 (http://www.debian.org/support)
Current version of pixman: 0.33.3
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (–) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: “/var/log/Xorg.0.log”, Time: Sun Jun 12 09:41:39 2016
(==) Using config directory: “/etc/X11/xorg.conf.d”
(==) Using system config directory “/usr/share/X11/xorg.conf.d”
./zynthian.sh: line 33: echo: write error: Device or resource busy
performanceperformanceperformanceperformancejackdmp 1.9.10
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2014 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK MIDI <-> ALSA sequencer MIDI bridge, version 8 (7383d268c4bfe85df9f10df6351677659211d1ca) built on Mon May 20 04:37:10 2013
Copyright 2006,2007 Dmitry S. Baikov
Copyright 2007,2008,2009,2011,2012 Nedko Arnaudov

Bridge starting…
Using JACK server 'default’
Hardware ports will be exported.
Failed to open server
Bridge started
Press ctrl-c to stop the bridge
port created: Midi Through [14] (capture): Midi Through Port-0
port created: Midi Through [14] (playback): Midi Through Port-0
port created: USB ProKeys 88 [20] (capture): USB ProKeys 88 MIDI 1
port created: USB ProKeys 88 [20] (playback): USB ProKeys 88 MIDI 1
port created: USB ProKeys 88 [20] (capture): USB ProKeys 88 MIDI 2
HW version PROTOTYPE-4
Zynswitches poll thread created successfully
SWITCHES INIT!
SETUP GPIO SWITCH 0 => 107
SETUP GPIO SWITCH 1 => 23
SETUP GPIO SWITCH 2 => 106
SETUP GPIO SWITCH 3 => 2
Short Switch 3
Starting Engine setBfree
Getting Bank List for setBfree
Loading snapshot /home/pi/zynthian/zynthian-ui/my-data/snapshots/BF-001.zss =>
{“engine_nick”: “BF”, “midi_chan”: 0, “max_chan”: 3, “instr_name”: [“Jimmy Smith Plus”, “”, “Lowr/Upr Split”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”], “bank_name”: [“most popular”, “”, “split”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”], “instr_index”: [21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], “bank_set”: [["./data/setbfree//pgm-banks/upper/most_popular.pgm", 0, “most popular”, “"], null, ["./data/setbfree//pgm-banks/pedals/split.pgm", 1, “split”, "”], null, null, null, null, null, null, null, null, null, null, null, null, null], “instr_set”: [[21, [0, 0, 104], “Jimmy Smith Plus”, {“drawbar_1”: “8”, “rotaryspeed”: “chorale”, “vibrato”: “c3”, “drawbar_9”: “0”, “vibratoupper”: “on”, “drawbar_6”: “0”, “percspeed”: “fast”, “perc”: “on”, “drawbar_5”: “0”, “drawbar_7”: “0”, “drawbar_3”: “8”, “percharm”: “3rd”, “drawbars”: “88 8800 000”, “percvol”: “soft”, “drawbar_4”: “8”, “drawbar_2”: “8”, “drawbar_8”: “0”}], null, [0, [0, 0, 56], “Lowr/Upr Split”, {“keysplitlower”: “58”}], null, null, null, null, null, null, null, null, null, null, null, null, null], “bank_index”: [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], “ctrl_config”: [[[[[“volume”, 1, 88, 127], [“percussion on/off”, 80, “on”, “off|on”, “perc”], [“rotary speed”, 91, “chr”, “off|chr|trm|chr”, “rotaryspeed”], [“vibrato on/off”, 92, “on”, “off|on”, “vibratoupper”]], 0, “main”], [[[“16”, 70, “8”, [[“0”, “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”], [128, 120, 104, 88, 72, 56, 40, 24, 8]], “drawbar_1”], [“5 1/3”, 71, “8”, [[“0”, “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”], [128, 120, 104, 88, 72, 56, 40, 24, 8]], “drawbar_2”], [“8”, 72, “8”, [[“0”, “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”], [128, 120, 104, 88, 72, 56, 40, 24, 8]], “drawbar_3”], [“4”, 73, “8”, [[“0”, “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”], [128, 120, 104, 88, 72, 56, 40, 24, 8]], “drawbar_4”]], 0, “drawbars low”], [[[“2 2/3”, 74, “0”, [[“0”, “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”], [128, 120, 104, 88, 72, 56, 40, 24, 8]], “drawbar_5”], [“2”, 75, “0”, [[“0”, “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”], [128, 120, 104, 88, 72, 56, 40, 24, 8]], “drawbar_6”], [“1 3/5”, 76, “0”, [[“0”, “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”], [128, 120, 104, 88, 72, 56, 40, 24, 8]], “drawbar_7”], [“1 1/3”, 77, “0”, [[“0”, “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”], [128, 120, 104, 88, 72, 56, 40, 24, 8]], “drawbar_8”]], 0, “drawbars hi”], [[[“drawbar 1”, 78, “0”, [[“0”, “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”], [128, 120, 104, 88, 72, 56, 40, 24, 8]], “drawbar_9”], [“vibrato selector”, 83, “c3”, “v1|v2|v3|c1|c2|c3”, “vibrato”], [“percussion decay”, 81, “fast”, “slow|fast”, “percspeed”], [“percussion harmonic”, 82, “3rd”, “2nd|3rd”, “percharm”]], 0, “percussion & vibrato”], [[[“overdrive on/off”, 23, “off”, “off|on”, “overdrive”], [“overdrive character”, 93, 64, 127, “overdrive_char”], [“overdrive inputgain”, 21, 64, 127, “overdrive_igain”], [“overdrive outputgain”, 22, 64, 127, “overdrive_ogain”]], 0, “overdrive”]], null, [[[[“volume”, 1, 96, 127], [“percussion on/off”, 80, “off”, “off|on”, “perc”], [“rotary speed”, 91, “off”, “off|chr|trm|chr”, “rotaryspeed”], [“vibrato on/off”, 92, “off”, “off|on”, “vibratoupper”]], 0, “main”], [[[“16”, 70, “8”, [[“0”, “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”], [128, 120, 104, 88, 72, 56, 40, 24, 8]], “drawbar_1”], [“5 1/3”, 71, “8”, [[“0”, “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”], [128, 120, 104, 88, 72, 56, 40, 24, 8]], “drawbar_2”], [“8”, 72, “8”, [[“0”, “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”], [128, 120, 104, 88, 72, 56, 40, 24, 8]], “drawbar_3”], [“4”, 73, “8”, [[“0”, “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”], [128, 120, 104, 88, 72, 56, 40, 24, 8]], “drawbar_4”]], 0, “drawbars low”], [[[“2 2/3”, 74, “8”, [[“0”, “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”], [128, 120, 104, 88, 72, 56, 40, 24, 8]], “drawbar_5”], [“2”, 75, “8”, [[“0”, “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”], [128, 120, 104, 88, 72, 56, 40, 24, 8]], “drawbar_6”], [“1 3/5”, 76, “8”, [[“0”, “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”], [128, 120, 104, 88, 72, 56, 40, 24, 8]], “drawbar_7”], [“1 1/3”, 77, “8”, [[“0”, “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”], [128, 120, 104, 88, 72, 56, 40, 24, 8]], “drawbar_8”]], 0, “drawbars hi”], [[[“drawbar 1”, 78, “8”, [[“0”, “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”], [128, 120, 104, 88, 72, 56, 40, 24, 8]], “drawbar_9”], [“vibrato selector”, 83, “c3”, “v1|v2|v3|c1|c2|c3”, “vibrato”], [“percussion decay”, 81, “slow”, “slow|fast”, “percspeed”], [“percussion harmonic”, 82, “3rd”, “2nd|3rd”, “percharm”]], 0, “percussion & vibrato”], [[[“overdrive on/off”, 23, “off”, “off|on”, “overdrive”], [“overdrive character”, 93, 64, 127, “overdrive_char”], [“overdrive inputgain”, 21, 64, 127, “overdrive_igain”], [“overdrive outputgain”, 22, 64, 127, “overdrive_ogain”]], 0, “overdrive”]], null, null, null, null, null, null, null, null, null, null, null, null, null], “engine”: “setBfree”}
Set MIDI CH 0, Bank MSB: 0
Set MIDI CH 2, Bank MSB: 1
Set MIDI CH 0, Bank MSB: 0, Bank LSB: 0, Program: 104
Set MIDI CH 2, Bank MSB: 0, Bank LSB: 0, Program: 56
ERROR: set_controller_config(1) => unorderable types: str() >= int()
ERROR: set_controller_config(2) => unorderable types: str() >= int()
ERROR: set_controller_config(3) => unorderable types: str() >= int()
ERROR: zynthian_gui.zyncoder_read() => list index out of range
ERROR: zynthian_gui.zyncoder_read() => list index out of range
ERROR: zynthian_gui.zyncoder_read() => list index out of range
ERROR: zynthian_gui.zyncoder_read() => list index out of range
ERROR: zynthian_gui.zyncoder_read() => list index out of range
ERROR: zynthian_gui.zyncoder_read() => list index out of range
ERROR: zynthian_gui.zyncoder_read() => list index out of range
ERROR: zynthian_gui.zyncoder_read() => list index out of range
ERROR: zynthian_gui.zyncoder_read() => list index out of range
ERROR: zynthian_gui.zyncoder_read() => list index out of range
ERROR: zynthian_gui.zyncoder_read() => list index out of range