我尝试将LIS3DH用作老年人安全装置中的跌倒传感器。
我想使用比仅使用自由落体中断更精细的检测方法,因此我尝试将跌落定义为自由落体中断,然后是活动或“唤醒”中断。
对于自由落体,一切都按预期工作。我将寄存器设置如下:
写(0x25):0x02 //将高电平有效变为低电平有效
写(0x20):0x57 //使能100Hz的所有轴
写(0x22):0x40 //在INT1上使能中断
写(0x23):0x00 // fs 2g
写(0x24):0x08 //锁存中断
写(0x33):0x02 //持续时间20ms
写(0x32):0x1f //阈值16mg * 31 = 496mg
写(0x30):0x95 //和x,y,z低事件的AND
收到中断后,我将配置更改为以下内容:
写(0x20):0x57 //使能100Hz的所有轴
写(0x22):0x40 //在INT1上使能中断
写(0x23):0x20 // fs - 10:±8 g
写(0x24):0x08 //锁存中断
写(0x33):0x01 //持续时间10ms
写(0x32):0x20 // 1 LSb = 62 mg @ FS =±8 g - >阈值62mg * 32 = 1984mg
写(0x30):0x2a // x,y,z高事件的OR
我遇到的问题是,显然Treshold寄存器的规模不是62mg / LSB而是32mg / LSB,因为如果稍微超过1g而不是预期的2g,我会得到一个中断。
如果我将阈值设置为0x41 * 32mg = 2080mg,如果加速度超过2g,我只会得到中断。
我某处有错误的假设吗?或者我配置错了什么?
谢谢你的帮助。
以上来自于谷歌翻译
以下为原文
I try to use the LIS3DH as a fall sensor in an security device for elderly people.
I want to use a more elaborate detec
tion method than just using the free fall interrupt and therefore I try to define a fall as first a free fall interrupt and then an activity or "wake-up" interrupt.
For the freefall everything works as expected. I set up the registers as follows:
Write (0x25): 0x02//Change active high to active low
Write (0x20): 0x57//Enable all axis with 100Hz
Write (0x22): 0x40//Enable Interrupt on INT1
Write (0x23): 0x00//fs 2g
Write (0x24): 0x08//Latch interrupt
Write (0x33): 0x02//Duration 20ms
Write (0x32): 0x1f //Threshold 16mg * 31 = 496mg
Write (0x30): 0x95//AND of x,y,z low events
After I receive the Interrupt I then change the configuration to the following:
Write (0x20): 0x57//Enable all axis with 100Hz
Write (0x22): 0x40//Enable Interrupt on INT1
Write (0x23): 0x20//fs - 10: ±8 g
Write (0x24): 0x08//Latch interrupt
Write (0x33): 0x01//Duration 10ms
Write (0x32): 0x20//1 LSb = 62 mg @ FS = ±8 g -> Threshold 62mg * 32 = 1984mg
Write (0x30): 0x2a//OR of x,y,z high events
The problem I experience is that apparently the scale of the treshold register is not 62mg/LSB but 32mg/LSB as I get an interrupt if 1g is slightly exceeded and not 2g as expected.
If I set the threshold to 0x41 * 32mg = 2080mg I only get the interrupt if the acceleration exceeds 2g.
Do I have a false assumption somewhere? Or am I configuring something wrong?
Thanks for your help.