完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
我尝试将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 detection 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. |
|
相关推荐
2个回答
|
|
|
配置正确,阈值为62mg / LSB,因此在您的情况下,阈值实际为2g。
你怎么知道中断是由1g触发的? 以上来自于谷歌翻译 以下为原文 The configuration is correct and the threshold is 62mg/LSB, so in your case the threshold is really 2g. How do you know the interrupt is triggered by 1g? |
|
|
|
|
|
我循环了acc_data并打印出每个轴上的测量加速度。
但我再次进行了测试,现在发现加速度确实超过了2g。 因此,数据输出可能以前太慢而无法捕获触发加速度。 谢谢您的回复。 以上来自于谷歌翻译 以下为原文 I looped over the acc_data and printed out the measured accelerations on each axis. But I ran the test again and now found that indeed the acceleration exceeds 2g. So probably the data output was previously too slow to capture the triggering acceleration. Thank you for your reply. |
|
|
|
|
只有小组成员才能发言,加入小组>>
stm32mp157的异核通信的rpmsg_sdb的m4固件和a7驱动该如何编写?
1453 浏览 0 评论
stm32f103用freertos对一个采样率为1kHz的传感器,进行采样,数据出差
1502 浏览 0 评论
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
3649 浏览 1 评论
3842 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
2461 浏览 1 评论
STM32H7打开DCache后,出现了串口接收信息为空的现象,是哪里出了问题?
727浏览 5评论
用NANO STM32F103RBT6的开发板烧录不了是哪里出了问题?
663浏览 5评论
710浏览 5评论
外部中断触发类型为双边沿触发,进入中断回调后有什么办法判断该边沿是上升沿还是下降沿?
941浏览 5评论
STM32L071CBT6低温环境下无法正常工作是什么原因引起的?
745浏览 5评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 13:20 , Processed in 0.875273 second(s), Total 46, Slave 39 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
2780