¿ªÔÆÌåÓý

Re: Encoder Behavior


Jack Purdum
 

Farhan didn't user a standard encoder library, but rather has his own enc_read() function in ubitx_ui.ino. You need to put some Serial.print() calls to see what is being returned from enc_state() and the reading of the encoder pulses. I haven't looked at the code for a while, but it may be that the Bourns encoder is not returning the same data that the stock encoder returns, or at least Farhan's code uses it differently.

Jack, W8TEE
On Saturday, August 25, 2018, 10:44:15 PM EDT, W0PWE <j.b.hall@...> wrote:


When changing frequency or trying to step through the menus my encoder has a very annoying behavior. Sometimes with a single click it will act like 2 or 3 clicks. Sometimes you have to rotate it 2 or 3 clicks to make any change at all. So for example: lets say you are on 7.039.900 and you want to go to 7.040.000. You might have to do something like this: Right one click and you are on 7.040.200, left one click - no change, left one click and you are on 7.039.900, right one click and you are on 7.040.100..... and so on until you eventually land on 7.040.000.

I built two Raduino clones and they both operate this way. One is breadboarded with a parallel display and the other is built on a VK4PLN board with an I2C display. Both are running KD8CEC code V1.08.

The encoder I'm using is a brand new Bourns PEC16-4220F-S0024 part that I bought from Digikey. I have tried it with 0.01uf caps, 0.22uf caps and with no caps on the EncA and EncB lines and basically saw no change in behavior. ?I have used that encoder part in some other projects without issue. I tried one of the cheap e-bay encoders and it was even more annoying. Any ideas would be appreciated.

Join [email protected] to automatically receive all group messages.