完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好,
我正在使用LSM303AGR,加速度计和磁力计,没有任何问题,但现在我想用嵌入式温度传感器进行一些测试,数据表并没有说太多。 首先,请您确认TEMP_CFG_REG_A寄存器的用法吗? 如数据表所示,向其写入0xC0似乎无法启用温度测量,但写入0x80似乎也有效。那么请您澄清数据的解释吗?该值作为二进制补码存储在OUT_TEMP_H中,但是有一个偏移量要考虑吗? 最后,这个嵌入式传感器能否成功用于测量环境温度?我们需要校准每台设备以获得准确的结果吗? 谢谢你的帮助,纪尧姆 #lsm303agr 以上来自于谷歌翻译 以下为原文 Hello, I'm using the LSM303AGR, accelerometer and magnetomter, without any problems but now I would like to do some tests with the embedded temperature sensor and datasheet doesn't says much about it. Firstly could you please confirm the usage of the register TEMP_CFG_REG_A ? Writing 0xC0 to it, as specified by the datasheet doesn't seem to enable temperature measurements, however writing 0x80 seems to work.Then could you please clarify the interpretation of the data ? The value is stored in OUT_TEMP_H as two's complement but is there an offset to account for ? Finally, could this embedded sensor be successfully used to measure ambiant temperature ? Would we need to calibrate each device to obtain an accurate result ? Thanks for your help,Guillaume #lsm303agr |
|
相关推荐
5个回答
|
|
您是否还将BDU位设置为寄存器
CTRL_REG4?结合0xC0 in TEMP_CFG_REG对我有用。 OUT_TEMP_L 和OUT_TEMP_H包含25度C的偏移量。 在低功耗模式下使用就足够了 OUT_TEMP_H,只有这8位包含tempature。只需添加25并将其视为int8_t。 在高分辨率和普通模式下,您需要使用整个16位值并向右移动六次(如带符号),因为它将包含左对齐的10位值。然后再加25以获得温度。 我的经验是,这种传感器不能真正用于环境温度,内部温度会受到传感器本身的影响。 以上来自于谷歌翻译 以下为原文 Have you also set BDU bit in register CTRL_REG4? Combined with 0xC0 in TEMP_CFG_REG it works for me. OUT_TEMP_L and OUT_TEMP_H contain the offset from 25 degress C. In low-power mode it is enough to use OUT_TEMP_H, only these 8 bits contain the tempature. Just add 25 and treat it as int8_t. In high-res and normal mode you need to use whole 16-bit value and shift six times to the right (as signed), as it will contain left-justified 10-bit value. Then again add 25 to get temperature. My experience is that this sensor cannot really be used for ambient temperature and the internal temperature will affected by the sensor itself. |
|
|
|
你好Rastislav,
非常感谢您的回答,价值观现在有意义。 我的坏,写入0xC0 TEMP_CFG_REG确实是正确的,我感到困惑,因为我错过了25°C的偏移量。 关于高分辨率正常模式(左对齐10位)您是否确认灵敏度为0.25°C /位(与低功耗模式下的1°C /位相比)? 这也意味着OUT_TEMP_H中的数据始终可以读取为度数,与功耗模式无关,这与数据表一致。 谢谢 以上来自于谷歌翻译 以下为原文 Hello Rastislav, Many thanks for your helpful answer, the values make sense now. My bad, writing 0xC0 in TEMP_CFG_REG is indeed correct, I got confused because I was missing the 25°C offset. About the high-res an normal mode (10bits left justified) do you confirm that the sensibility is then 0.25°C/digit (compared to 1°C/digit in low power mode) ? This also means that data in OUT_TEMP_H can always be read as degrees, irrelevant of the power mode, which is consistent with the datasheet. Thank you |
|
|
|
我只在低功耗模式下使用它,但我的理解是分辨率总是以度为单位,所以你需要两个寄存器。我现在没有传感器。
以上来自于谷歌翻译 以下为原文 I've used it only in low power mode, but my understanding is that the resolution is always in degrees, so you'll need both registers. And I don't have the sensor with me right now. |
|
|
|
好吧,实际上我在低功率和正常模式下做了一些快速测试(温度变化)。
这就是我注意到我们总能读取OUT_TEMP_H的方式 以度为单位(我们获得与电源模式无关的相同结果)。 所以在正常/高分辨率模式下,如果我们读取两个寄存器(我们添加2位数 ),敏感度是0.25°C /位。 鉴于数据表总是只读取OUT_TEMP_H,或许额外的敏感性没有多大意义,即使在我的测试中它似乎是一致的。 以上来自于谷歌翻译 以下为原文 Ok, actually I did some quick tests (temperature variations) in low power and in normal mode. That's how I noticed that we can always read OUT_TEMP_H in degrees (we get the same results irrelevant of the power mode). So in normal/high-res mode, if we read both registers ( we add 2 digits ), sensibility is then 0.25°C/digit. Given that the datasheet says to always read only OUT_TEMP_H perhaps the extra sensibility doesn't make much sense, even if in my testing it seemed consistent. |
|
|
|
感谢您的测试,在0.25°C分辨率下,温度传感器在某些部署中更有意义。
以上来自于谷歌翻译 以下为原文 Thank you for your test, with 0.25°C resolution the temperature sensor can make more sense in some deployments. |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2738 浏览 1 评论
3241 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1810 浏览 1 评论
3650 浏览 6 评论
6039 浏览 21 评论
1339浏览 4评论
202浏览 3评论
对H747I-DISCO写程序时将CN2的st-link复用为usart1,再次烧录时无法检测到stlink怎么解决?
353浏览 2评论
STM32G474RE芯片只是串口发个数据就发烫严重是怎么回事?
444浏览 2评论
STM32处理增量式编码器Z信号如何判断中断是正转的还是反向转的?
275浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-25 23:37 , Processed in 1.177380 second(s), Total 86, Slave 70 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号