Mechanical rotary encoder

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

In our project we also have 2 mechanical rotary encoders + few capsense key. I am facing a problem with respect to encoder operation. 

   

If we perform Fast/Rigorous scrolling of the encoder then a particular capsense key is always reported active by CSD_bIsSensorActive() even it is not touched by anyone. My suspension is that encoder operation is generating some kind of noise which activate capsense key.  

   

What is your opinion about this?

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

When a mechanical switch is connected interrupt driven there might be the case that due to contact-bouncing several consecutive interrupts occur thus putting a very high load on the CPU and disabling other interrupts for a short time.

   

It could be better to use a separate timer driven interrupt (about 10ms) and look for several (5-10) same readings of the encoder. This will give other intterrupts time to execute.

   

 

   

Bob

View solution in original post

0 Likes
13 Replies
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

This could be a number of things -

   

 

   

1) Layout, proximity of rotary encoder lines to capsense line, c coupling

   

2) Routing, capsense and encoder on same port, again c coupling

   

3) Rotary MIPs being used interfering with Capsense scan

   

 

   

Some design help -

   

 

   

http://www.cypress.com/?id=1575&rtID=435

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

will changing any of following values in software make a differecne?

   
        
  1. Finger threshold
  2.     
  3. Noise threshold
  4.     
  5. Baseline update threshold
  6.     
  7. Sensors autoreset
  8.     
  9. Hysteresis
  10.     
  11. Debounce
  12.     
  13. Negative noise threshold
  14.     
  15. LowBaseline reset
  16.     
  17. Scanning speed
  18.     
  19. Resolution
  20.    
0 Likes
Anonymous
Not applicable

Any help would be helpful.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Is your rotary encoder interrupt-driven? Since CapSense uses interrupts this may turn out to disturb the CapSense readings?

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Yes rotary encoder is interrupt driven. is it bad?

0 Likes
Anonymous
Not applicable

I like to add one more bit, if i enable sensor auto-reset it sloves the partial problem. Earlier a perticular softkey reported active always however now its get reported active for one time only. since auto-reset updates the baseline always.

0 Likes
Anonymous
Not applicable

if Scanning speed = slower, problem does not occures.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

When a mechanical switch is connected interrupt driven there might be the case that due to contact-bouncing several consecutive interrupts occur thus putting a very high load on the CPU and disabling other interrupts for a short time.

   

It could be better to use a separate timer driven interrupt (about 10ms) and look for several (5-10) same readings of the encoder. This will give other intterrupts time to execute.

   

 

   

Bob

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

You can also try to change the interrupt priority, so the CapSense interrupt will be executed with higher priority than the one for the rotary encoder.

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

I am using a timer driven interrupt only. However when i contineously roate the encoder at that time CPU may be overloaded.

   

I have found out that baseline is getting stuck during that period. I have darw a graph for Raw values and baseline values.

   

I am not able to find there is sudden drop in baseline values when problem appears. any suggestion?

   

please find the graph as an attachment.

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Image

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

CPU clock set to Sysclk/1 in Global resources ? 24 Mhz ?

   

 

   

Regards, Dana.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Wrong forum, ignore prior post.

   

 

   

Regards, Dana.

0 Likes