ST意法半导体
直播中

陈舒斌

7年用户 218经验值
私信 关注
[问答]

LIS2DE12加速度计如何自由落体检测

嗨,我正在使用LIS2DE12加速度计。直到现在,我能够读取芯片提供的原始数据。现在,我必须检测同样的自由落体。在数据表中,我找不到为此目的分配的任何特定寄存器。我唯一能找到的是有两个中断引脚可用于运动检测和自由落体检测。但我不知道如何配置此中断。任何人都可以为我提供配置步骤吗?如何确定生成此自由落体检测的阈值?先谢谢你!!!

以上来自于谷歌翻译


以下为原文




  • Hi, I am working with LIS2DE12 accelerometer. till now, I am able to read the raw data provided by the chip. Now, I have to detect free fall for the same. In the data sheet, I couldnt find any specific registers assigned for this purpose. The only thing I could find is that there are two interrupt pins available for the motion detect and free fall detect. But I dont know how to configure this interrupts. Can anyone provide me the steps for the configurations? How can I decide the threshold value for generating this free fall detect?? Thank you in advance!!!

回帖(2)

曾玲娟

2019-4-28 16:00:16
下面是如何使用INT1进行自由落体检测的示例。
1.将57h写入CTRL_REG1 //打开传感器,启用X,Y和Z // ODR = 100 Hz
2.将00h写入CTRL_REG2 //禁用高通滤波器
3.将40h写入CTRL_REG3 //中断活动1驱动到INT1焊盘
4.将00h写入CTRL_REG4 // FS =±2 g
5.将08h写入CTRL_REG5 //中断1引脚锁存
6.将16h写入INT1_THS //设置自由落体阈值= 350 mg
7.将03h写入INT1_DURATION //设置最小事件持续时间
8.将95h写入INT1_CFG //配置自由落体识别
9.轮询INT1垫;如果INT1 = 0,则转到10 //轮询INT1引脚,等待自由落体事件
10.(发生了自由落体事件;在此处插入代码)//事件处理
11.读INT1_SRC寄存器//清除中断请求
12.转到9

以上来自于谷歌翻译


以下为原文




Below is an example how to use INT1 for free fall detection.
1. Write 57h into CTRL_REG1 // Turn on the sensor, enable X, Y, and Z // ODR = 100 Hz
2. Write 00h into CTRL_REG2 // High-pass filter disabled
3. Write 40h into CTRL_REG3 // Interrupt activity 1 driven to INT1 pad
4. Write 00h into CTRL_REG4 // FS = ±2 g
5. Write 08h into CTRL_REG5 // Interrupt 1 pin latched
6. Write 16h into INT1_THS // Set free-fall threshold = 350 mg
7. Write 03h into INT1_DURATION // Set minimum event duration
8. Write 95h into INT1_CFG // Configure free-fall recognition
9. Poll INT1 pad; if INT1 = 0 then go to 10 // Poll INT1 pin waiting for the free-fall event
10. (Free-fall event has occurred; insert your code here) // Event handling
11. Read INT1_SRC register // Clear interrupt request
12. Go to 9
举报

陈舒斌

2019-4-28 16:10:40
非常感谢您的回复!!
检测到自由落体时,INT1引脚变为高电平!

以上来自于谷歌翻译


以下为原文




Thanks a lot for your Reply!!
The INT1 pin goes high when the free fall is detected!!
举报

更多回帖

发帖
×
20
完善资料,
赚取积分