Author Topic: Any good examples on rotary encoder library "WITH" velocity ?  (Read 35881 times)

0 Members and 1 Guest are viewing this topic.

Offline jeroen74

  • Frequent Contributor
  • **
  • Posts: 396
  • Country: nl
Re: Any good examples on rotary encoder library "WITH" velocity ?
« Reply #75 on: September 24, 2013, 06:22:19 pm »
One Philips/Fluke function generator (PM5139 I think) I once took a cursory peek at, at a previous job, had a nice big knob that was apparently quite heavy and undamped. Give it a good spin and it keeps on spinning for like a minute :) I wonder how well that worked.
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Any good examples on rotary encoder library "WITH" velocity ?
« Reply #76 on: September 24, 2013, 06:38:05 pm »
I finally got things in my little research project to the point where I would consider it "not terrible."

Just to remind everyone, for useability testing I have a mock interface to change a voltage between the values of 1.250V and 30.00V, using just a 20PPR rotary encoder.  The challenge here is to give the user the ability to change the setting as conveniently as possible--avoiding overshoots and not requiring the user to spend a lot of time spinning the encoder just to make large changes.

One of the important changes I made was to basically throw away half of the actions (=clockwise or counter-clockwise click) and turn the encoder into a 10PPR encoder instead of a 20PPR encoder.  The problem was that it is actually too hard to control at 20PPR.  It's too hard to keep up with the changes, that is.

Note that, from the standpoint of calculating velocity, I still count the actions that are otherwise thrown away.  This gives better resolution.

I still have the three step sizes that I had earlier: 1mV, 10mV and 100mV.  The problem with my earlier implementation was that I required the user to maintain the velocity to stay at particular step size.  This meant that the user (=me) couldn't keep up with the changes for the larger step sizes and would, more often then not, overshoot.

I changed it so that the user can slow down once they have stepped-up the speed.  The step size can now only increase once the user starts spinning the encoder.  That is, they can step up but not down.  The encoder has to come to a complete stop before the step size returns to the 1mV size.  This actually works out pretty good for this particular mock environment.  (Setting an output voltage.)

Another change that helps a lot is that when the step size is 10mV then the last digit of the setting is always "0", and if the step size is 100mV then the last two digits are always "00".  This helps the user focus on what is actually changing.  (Like Christe4nM suggested.)

There are two velocity thresholds to enter into the 10mV and 100mV step sizes.  The user has to be fairly determined to pass these thresholds.  Once they are passed, however, the user can slow down and catch back up and regain control.  Control is one of the keys. 

Predictability is another key.  So far as the user having a pretty good expectation as to when they are going to "step up."  That doesn't seem too bad currently but could use some improvement.
 
The following users thanked this post: ilium007

Offline BravoVTopic starter

  • Super Contributor
  • ***
  • Posts: 7547
  • Country: 00
  • +++ ATH1
Re: Any good examples on rotary encoder library "WITH" velocity ?
« Reply #77 on: September 25, 2013, 03:36:12 am »
Uhmm ... another new one, geezz ... I haven't finished digesting your previous codes yet.  :-[

Really appreciate that Jack.  :-+

Offline Teemo

  • Regular Contributor
  • *
  • Posts: 58
  • Country: ee
Re: Any good examples on rotary encoder library "WITH" velocity ?
« Reply #78 on: September 25, 2013, 07:49:48 am »
Another idea: probably it is better to use undented rotary encoder with smooth turning. The detents kind of screw up the user experience, because they trick the brain to instinctively thinking that one step with detents should mean one step of adjustment.

Our kitchen radio have volume knob with undented encoder(with velocity) and it feels so natural that most users even do not know it has this magnificent feature. It is possible to turn the volume from 0 to max (or form max to 0) in only half turn when turning really fast.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Any good examples on rotary encoder library "WITH" velocity ?
« Reply #79 on: September 25, 2013, 10:31:04 am »
another way to measure velocity is to measure frequency of the pulses and adjust increments based on that.
================================
https://dannyelectronics.wordpress.com/
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Any good examples on rotary encoder library "WITH" velocity ?
« Reply #80 on: September 25, 2013, 11:58:55 am »
Uhmm ... another new one, geezz ... I haven't finished digesting your previous codes yet.  :-[

Really appreciate that Jack.  :-+

The only file that changed since the last version I posted is main.cpp.  All the other files are the same.

I probably won't be playing around much more with the project.  I don't have an immediate need for an encoder with velocity.  I just thought it sounded like something interesting to research.

Another idea: probably it is better to use undented rotary encoder with smooth turning. The detents kind of screw up the user experience, because they trick the brain to instinctively thinking that one step with detents should mean one step of adjustment.

Our kitchen radio have volume knob with undented encoder(with velocity) and it feels so natural that most users even do not know it has this magnificent feature. It is possible to turn the volume from 0 to max (or form max to 0) in only half turn when turning really fast.

The encoder I'm using has no detents.  I agree that you wouldn't want them for this sort of application.
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: Any good examples on rotary encoder library "WITH" velocity ?
« Reply #81 on: September 25, 2013, 10:28:02 pm »
The encoder I'm using has no detents.  I agree that you wouldn't want them for this sort of application.

That might also be a matter of both taste and the particular application.

The affordable ones on ebay do have the detent. And while I would like to have the detent be a little less forceful they are good enough. Incidentally, does anyone know of a cheap source of decent knobs for these things?

Regarding distinct 10/100/1000 mV steps vs continuous, I prefer the distinct steps. Precisely because that gives me some predictable behavior in step size.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf