Cristiano

SCS encoder jumps

6 posts in this topic

Hi all,

today I would like to share my experience with encoder on scs, the board version made by ilmenator (semper laudetur), attached to MBHP_CORE_STM32F4, midibox_NG project.

I noticed that sometimes, especially when fast rotating my encoder (I choosed a bourns PEC12R), midibox_NG detects more events than really executed, or worse, events in opposite verse.

Using an oscilloscope I saw many spikes on encoder pin, duration shorter than 1 ms.

Following suggestion on attached datasheet (I hope attaching this document is permitted, I did not find any rule against, but if so I will remove it immediately), second page, bottom right, I modified circuit with some patches.

Now it works perfectly, but I have some requests/suggestion to improve design

  • if anyone knows, please tell me if there is a NGC parameter to allow debouncing on encoder inputs, otherwise
  • for TK, please modify SCS scheme to suggest RC filter usage;
  • for ilmenator, please modify your board design and allow to connect necessary 4 resistances and 2 capacitors.

Thanks to anyone,

Regards,

Cristiano

PEC12R.pdf

Share this post


Link to post
Share on other sites

Hi!

Yes, there is a debounce_mechanism:

SRIO debounce_cycles=<0..65535>  

Anyway: Improving the hardware should be better than software debouncing. 

Share this post


Link to post
Share on other sites

Thank you FantomXR, I missed it!

And now I cannot try, damn! :rolleyes:

Ok, I am not pretty sure which of two soultion is better, but... who cares :innocent:

Share this post


Link to post
Share on other sites

I'm not sure if software debounce affects encoder events? We've heard a lot of stories about low-quality Bourns encoders. Better seem to be ALPS EC12.

Share this post


Link to post
Share on other sites
24 minutes ago, latigid on said:

I'm not sure if software debounce affects encoder events?

You're right it doesn't affect it, SW debounce just let some times for the inputs to stabilize, in counterpart we loose reactivity, it's a balance to find depending on the hardware, and encoder quality of course ;)
Note: PEC12 and PEC16 are not equivalent(replacement), I also never get any trouble with the PEC16 which is bigger and more solid than the PEC12.
 

4 hours ago, FantomXR said:

Anyway: Improving the hardware should be better than software debouncing.

Alright! An interesting article.

https://hifiduino.wordpress.com/2010/10/20/rotaryencoder-hw-sw-no-debounce/

 

Edited by Antichambre

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now