Jump to content

non-detented encoders question (regarding MB-6582)


skunks

Recommended Posts

Hello guys!

Finally I reached my hands to try to fix jumping behavior of non-detented encoders on my MB-6582.

Wilba says that only one (menu) encoder has to be left detented in his CS construction guide. I'm curious then why ALL 15 encoders are assigned as MIOS_ENC_MODE_DETENTED3 in setup_mb6582.asm by default ? Were MIOS_ENC_MODE_DETENTED* modes designed only for detented encoders?

As for my non-detented ALPHA encoders MIOS_ENC_MODE_NON_DETENTED works best. However, not perfect (it's more noticeable on large range values like cutoff): even if I move encoder very slowly, sometimes value gets rapidly advanced by ~10 (jumps a little forward). And sometimes even it jump backward, but not so often at least (like MIOS_ENC_MODE_DETENTED3 mode does). By "forward" I mean sporadic acceleration, and by "backward" I mean direction opposite to direction in which I turn the knob.

So, I've checked all the modes and MIOS_ENC_MODE_NON_DETENTED seems to be the most close to perfect.

I've tried also another encoder. It is almost like my ALPHA, however without "ALPHA" logo on it's bottom and contacts are white instead of yellow. Metal tongue inside is also white, not yellow. I've made it non-detented also. I must admit, this encoder does not jump backwards in MIOS_ENC_MODE_DETENTED3 mode. Almost :-) It jumped to ~30 (of 256 range) back only once. I slowly moved it back and forth during 10 minutes - the feel is very symmetrical and uniform compared to original ALPHA, however, not as smooth and still a little "clicky" (may be I didn't remove detent perfectly). So, if I want to set a precise value - it feels a little rough and non linear compared to original ALPHA, but in large scope (when I turn encoder faster) - it works in polite and predicted manner.

Please, let me know what do you think

Edited by skunks
Link to comment
Share on other sites

Yep, but I wouldn't call it "stepping" in a standard way, because of the nature of described bug - it has audible consequences only when it occurs (i.e. value jumps).

What about Alpha - they have to be good encoders, HawkEye recommended them here 

 

Link to comment
Share on other sites

Correct me, if am wrong, but methinks the MIOS detention mode selection is all about selecting the encoding of the physical encoder pulses sent when turning the encoder - it has nothing to do with physically flattening the "detention lid" of the encoder, which will not alter the pulse encoding. That's why the same mode is used for all encoders in the program.

Basically, flattening that lid just makes the encoders turn smoother - removing them is completely optional - if they are not flattened, you can feel the encoders "click into place" after every step.

I can still highly recommend the Alpha encoders, after many years, they still work flawlessly - they are a bit expensive, but worth their money :-).

Many greets,

Peter

Link to comment
Share on other sites

Theoretically you are right, in newer MIOS8 versions we can select any combination of pulses that MIOS should react to.

However, my menu (still detented) encoder works flawlessly IN ALL MODES comparing to other non-detented encoders, especially some of them. Non-detented encoders have to be set to MIOS_ENC_MODE_NON_DETENTED  in order to work more or less evenly. This was my strange experience.

Of course, in some modes detented menu encoder works with some multiplier (like 2x, 4x), but anyway without unpredictable jumping back and forth. Exactly these modes give me ability to adjust value precisely with non-detented encoders (though it jumps sometimes). It feels like detent gives kinda "guaranty" that full sequence between two detention points will be completed correctly (without bouncing?), and if it is removed and encoder gets an ability to stop somewhere in-between (increasing it's resolution though) - staying in these "in-between areas" can produce some bouncing. Just a feeling.

Hawkeye, why did you recommend:

"If you changed the angle of the metal tongue while flattening the dent with your caliper, push back the metal tongue to an angle as it had before"

This tongue (which we flattened) does not have any electrical contact with any of 3 legs, as far as I understood detention is it's only purpose. Or may be I should have done that for some reason unclear for me yet :-/

Link to comment
Share on other sites

Fwiw, I have the Bourns encoders recommended on the Wiki. I haven't had a chance to really put my new MB-6582 through its paces, but in the couple of days I've spent noodling around on it so far, I haven't noticed significant issues with values jumping. Sometimes the acceleration is more than I expect, but no issues yet with obvious jumping.

Link to comment
Share on other sites

7 hours ago, skunks said:

Hawkeye, why did you recommend:

"If you changed the angle of the metal tongue while flattening the dent with your caliper, push back the metal tongue to an angle as it had before"

This tongue (which we flattened) does not have any electrical contact with any of 3 legs, as far as I understood detention is it's only purpose. Or may be I should have done that for some reason unclear for me yet :-/

Just to make sure the encoder is not wobbly and there is more rotational resistance when turning. I have the alphas (14 modified + 1 menu encoder unmodified) running under the base MB6582 firmware, imho it needs no MIOS alteration because of physical modification, but these are just my 2 cents :). Jumping values can also be caused by low-quality encoders with bad contacts causing bad pulses (Bourns have received some bashing in this forum in the last years) and may not be related to the detention modification.

Many greets,
Peter

Link to comment
Share on other sites

2 hours ago, skunks said:

jaytee, that's great your Bourns encoders work good. Have you removed detents? So, you never-ever have noticed them jumping back, right?

I removed detents on 14 of them yes. Like I said, no issues so far, but that's only about 6 hours total use so far. Occasionally they skip backward by one "click" if I turn it veeeery slowly, but this is an issue I've noticed with many encoders.

2 hours ago, ChinMuzik said:

Why not just order the ones with no detents?

 

Non-Detent Bourns encoder

That's not quite a match, you want these. But the simple answer is: I didn't think to look for them without detents, since literally every mention on these forums of MB6582 encoders involves removing detents! :decayed:, FWIW, removing the detents on these is really easy, looks even easier than with the Alphas. No flattening of parts, just have to pull out a teensy-tiny spring and bearing.

Link to comment
Share on other sites

Thank you, guys. It's strange for me to think something wrong is with the quality of my Alphas.

Maybe something with electronics? Yesterday I noticed one strange thing:

I set DEFAULT_TESTMODE_ENC_SPEED  to 1 and uploaded the application. So I started to experiment with NORMAL speed mode. Mode of all encoders was set to MIOS_ENC_MODE_DETENTED4 (0xa5), that means that the same edges triggers DEC and INC (according to diagram found in mios.h)

I took a piece of wire, pressed one end to encoder's ground leg and started touching encoder's D0 leg with the other end. Touching and releasing, several times. Note, that I touched only D0 leg and did not touch D1 leg at all. And I've got a sequence of values like:

5,6,5,6,5,6,7,6,7,6,7,8,9,10,9,10,9,10,11,10,11,10, ...

Increasing when I touch end decreasing when I release the wire is no surprise - that's exactly how MIOS_ENC_MODE_DETENTED4 should behave.

What surprised me is that numbers started to drift in one direction, and sometimes in other direction. I thought that could be because of speed acceleration in random direction cause by bouncing contacts, but NORMAL speed test mode does not imply any acceleration.

Is it intended to be? This drifting is strange, because for every INC (touch with wire) we have DEC (release). Even if some bouncing e.g. DEC is skipped, there should be no INC because no change was registered.

Could anyone please explain, why it is so

Edited by skunks
inaccuracies corrected
Link to comment
Share on other sites

MIOS does not check for full transition cycle completion, it reacts on each edge regardless if there was a full turn or not. However the question remains.

Meanwhile I'm trying to find manual mode for each encoder. But I suspect I'll have to replace some of them anyway :-(

Or maybe set all to MIOS_ENC_MODE_NON_DETENTED and reduce their speed. 

Edited by skunks
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...