You are here

Mechanical rotary encoder | Cypress Semiconductor

Mechanical rotary encoder

Summary: 13 Replies, Latest post by danaaknight on 06 Mar 2013 10:18 AM PST
Verified Answers: 1
Last post
Log in to post new comments.
tkgrahul's picture
User
13 posts

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?

user_14586677's picture
User
7648 posts

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.

tkgrahul's picture
User
13 posts

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

  1. Finger threshold
  2. Noise threshold
  3. Baseline update threshold
  4. Sensors autoreset
  5. Hysteresis
  6. Debounce
  7. Negative noise threshold
  8. LowBaseline reset
  9. Scanning speed
  10. Resolution

 

tkgrahul's picture
User
13 posts

Any help would be helpful.

user_1377889's picture
User
10803 posts

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

 

Bob

tkgrahul's picture
User
13 posts

Yes rotary encoder is interrupt driven. is it bad?

 

tkgrahul's picture
User
13 posts

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.

tkgrahul's picture
User
13 posts

if Scanning speed = slower, problem does not occures.

user_1377889's picture
User
10803 posts

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

hli
user_78878863's picture
User
2759 posts

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.

tkgrahul's picture
User
13 posts

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.

Attachments: 
Log in to post new comments.