完善资料让更多小伙伴认识你,还能领取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. |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2715 浏览 1 评论
3235 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1807 浏览 1 评论
3643 浏览 6 评论
6031 浏览 21 评论
1333浏览 4评论
207浏览 3评论
195浏览 3评论
对H747I-DISCO写程序时将CN2的st-link复用为usart1,再次烧录时无法检测到stlink怎么解决?
348浏览 2评论
STM32G474RE芯片只是串口发个数据就发烫严重是怎么回事?
440浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-19 14:47 , Processed in 1.618482 second(s), Total 83, Slave 66 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号