大家好,
我正在尝试实现LIS3DSH的自检功能,但我得到的结果与设备数据表中的数字不一致。这是我的程序:
1)设置 - / + 2g范围和400 HZ ODR。
2)在正常模式下捕获20个样本(即在CTRL_REG5中ST2:1 = 00)
3)在启用正号自检的情况下捕获20个样本(即ST2:1 = 01)
4)计算2组样本之间的平均差异
根据数据表,X轴和Y轴的差值应为140 mg,Z轴的差值应为590 mg。但是,我已经在10个不同的
电路板上使用LIS3DSH进行自检,对于X和Y,我得到的值在175到220之间,而Z轴的值在500和620之间。
当在同一设备上重复测试时,结果看起来非常一致,但是从一个设备到另一个设备存在很大的差异。数据表没有指定任何错误余量来决定测试是“通过”还是“失败”。这使我很难从结果中确定设备是否工作不正常。
我想知道我得到的输出是否是预期的,或者我执行测试的方式有问题。
#lis3dsh
以上来自于谷歌翻译
以下为原文
Hi all,
I am trying to implement the self-test func
tion of the LIS3DSH, but the results I am getting do not agree with the numbers in the device datasheet. Here is my procedure:
1) Set -/+2g range and 400 HZ ODR.
2) Capture 20 samples in normal mode (ie ST2:1 = 00 in CTRL_REG5)
3) Capture 20 samples with positive sign self test enabled (ie ST2:1=01)
4) Compute the average difference between the 2 sets of samples
According to the datasheet the difference should be 140 mg for the X and Y axes and 590 mg for the Z-axes. However, I have run the self-test on 10 different boards with an LIS3DSH and for X and Y I get values between 175 and 220, while for the Z axis values between 500 and 620.
The results look pretty consistent when the test is repeated on the same device, but there is quite a big variability from one device to the other. The datasheet does not specify any error margins for deciding whether the test has 'passed' or 'failed'. That makes it difficult from the results that I am getting to decide if a device is not working properly.
I wonder if the output I am getting is expected or there is something wrong with the way I carry out the test.
#lis3dsh