Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Accelerator click detection and movement detection

Status
Not open for further replies.

jjzai123

Junior Member level 3
Junior Member level 3
Joined
May 12, 2017
Messages
26
Helped
0
Reputation
0
Reaction score
1
Trophy points
1
Activity points
191
Hello guys I am not sure about this, I set the accelerometer for click detection. I expect the accelerometer will generate interrupt when I tap on it, but it seems the accelerometer will generate interrupt when I shake it. Is it normal?:oops:
 

It depends on which accelerometer it is but in general they are motion sensors so any movement, whether a click or shake will register. When you say you set it for 'click detection' what exactly does that imply? Does it just filter out slower movements and if so, there there must be some threshold beyond which it can't tell a fast movement from the vibration of a click.

Brian.
 

I expected to see at least accelerometer model.

In general, that is not normal. For 'click' (or 'tap') detection usually 2-3 parameters are used:
- threshold value for acceleration slope (not the acceleration itself);
- shock time (clicking is very fast motion, so the acceleration change must cease before the shock time ends);
- quiet time (for double-click recognition).

In your case I presume your shock time is too big, so shaking causes the accelerometer to see it as 'click'. But that is only my assumption. It depends on the accelerometer model, settings and your mechanic part.
 

Click detection is when I tap on the accelerometer,it will generate a interrupt. I am using LIS3DH to do this thing.
 

I am using LIS3DH to do this thing. When I tap on the accelerometer, it will generate an interrupt. When I tap on it, it will generate interrupt but when I shake it, the accelerometer also will generate interrupt. I am not sure whether this is normal or not.
 

See p. 29 in the appnote below:
LIS3DH AppNote

One thing I forgot to ask. When you tap the acc, does it generate interrupt? I.e. it generates interrupt both from click and from shake?
I expect your TIME_LIMIT value is too big for your application, you should try to decrease it. Another trap is that TIME_LIMIT depends on ODR, so if your ODR is too low, then time limit window will be too big.
From my experience, 'click' event lasts from ones ms to 10 ms.
 
Yup, it generate interrupt. =) One more thing, can single click and double click activate at the same time?
 

I didn't try that, so I'm not sure. But according to the appnote, if you configure the acc to detect both and single click (in CLICK_CFG), and route them to the same INT pin, then you will have single click interrupt followed by combined single and double click interrupt.
 

That so weird, when I set to double click detection, it will only detect double click and single click is not function. It won't generate any interrupt.
 

What did you write to CLICK_CFG register? Do you have both single and double click turned on? Try to play with it.
 

I enabled both but still no luck... Hmmm....
 

Unfortunately appnote doesn't explicitly states both single and double click detection. Besides CLICK_CFG there is CLICK_SRC register that also setups single/double click. Interrupt registers CTRL_REG3 and CTRL_REG6 doesn't distinguish between single and double clicks.
Show your initialization code. And what behavior you expect? I.e. you need both single and double click detection? Maybe it would be easier to setup only single click in the accelerometer and implement double click in software?
 

Never mind, I just play around with the accelerometer. I think when we set to both single and double tap, it will only generate interrupt when double tap detected and single tap may not generate any interrupt. I think oscilloscope can read the single tap signal.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top