ADXL345水平放置:正常XYZ轴读数为:
X:0—30mg
Y:0—30mg
Z:255---264(255==1g)
实际仿真连续读取XYZ轴数据如下:
XY轴数据偶尔跳变到:60-90mg
Z轴数据偶尔跳变到:1mg或者 2g! 具体原因不明!!
实验数据如下: 红颜色的部分为明显错误数据!
实际测试数据如下; X轴, Y轴, Z轴
测试结果说明:读数存在非正常大幅度跳变!
测试条件:ADXL345水平静止放置,VDD=VS=3.2V
X=7,Y=34,Z=261
X=5,Y=45,Z=265
X=6,Y=35,Z=265
X=10,Y=35,Z=265
X=5,Y=32,Z=262
X=244,Y=35,Z=258
X=5,Y=37,Z=261
X=8,Y=36,Z=265
X=5,Y=35,Z=262
X=6,Y=36,Z=261
X=255,Y=37,Z=266
X=6,Y=36,Z=266
X=5,Y=36,Z=265
X=65286,Y=34,Z=259
X=7,Y=31,Z=262
X=6,Y=35,Z=288
X=5,Y=34,Z=264
X=6,Y=39,Z=265
X=7,Y=31,Z=259
X=4,Y=35,Z=260
X=5,Y=36,Z=263
X=7,Y=36,Z=265
X=7,Y=30,Z=263
X=7,Y=61,Z=262
X=3,Y=35,Z=261
X=7,Y=34,Z=262
X=9,Y=32,Z=267
X=15,Y=37,Z=500
X=6,Y=37,Z=263
X=7,Y=33,Z=262
X=5,Y=34,Z=265
X=7,Y=38,Z=256
X=7,Y=35,Z=263
X=3,Y=37,Z=261
X=8,Y=37,Z=261
X=5,Y=39,Z=261
X=5,Y=34,Z=261
X=5,Y=35,Z=411
X=9,Y=13,Z=264
X=7,Y=43,Z=265
X=8,Y=35,Z=264
X=7,Y=37,Z=264
X=6,Y=44,Z=266
X=4,Y=32,Z=260
X=7,Y=34,Z=260
X=8,Y=32,Z=263
X=5,Y=54,Z=262
X=10,Y=35,Z=264
X=5,Y=38,Z=5
X=7,Y=36,Z=262
X=5,Y=36,Z=269
X=6,Y=35,Z=302
X=65285,Y=38,Z=407
X=6,Y=32,Z=55
X=9,Y=33,Z=262
//***************************************************************
考虑到数字输出的二进制补码:程序判断处理补码负数转化为十进制数后数据如下:
负数补码全部转换处理:
//**********************************************************
X=3,Y=27,Z=265
X=256,Y=26,Z=267
X=180,Y=24,Z=273
X=250,Y=30,Z=262
X=2,Y=26,Z=263
X=2,Y=29,Z=266
X=4,Y=23,Z=268
X=252,Y=27,Z=502
X=1,Y=29,Z=343
X=2,Y=27,Z=262
X=1,Y=26,Z=262
X=256,Y=190,Z=262
X=4,Y=28,Z=269
X=3,Y=27,Z=264
X=10,Y=27,Z=264
X=4,Y=24,Z=267
X=256,Y=228,Z=263
X=7,Y=25,Z=261
X=3,Y=28,Z=267
X=253,Y=29,Z=264
X=1,Y=28,Z=267
X=2,Y=30,Z=6
X=2,Y=27,Z=262
X=5,Y=27,Z=268
X=2,Y=24,Z=262
X=2,Y=24,Z=265
X=253,Y=27,Z=261
X=2,Y=28,Z=263
X=3,Y=26,Z=266
X=2,Y=31,Z=308
X=7,Y=27,Z=262
X=6,Y=27,Z=278
X=2,Y=28,Z=264
X=7,Y=28,Z=502
X=2,Y=25,Z=260
X=2,Y=28,Z=267
X=1,Y=29,Z=264
X=5,Y=28,Z=262
X=3,Y=28,Z=262
X=2,Y=27,Z=265
X=3,Y=6,Z=265
X=249,Y=26,Z=492
X=3,Y=38,Z=263
X=2,Y=28,Z=262
X=3,Y=28,Z=271
X=5,Y=231,Z=264
X=7,Y=26,Z=266
X=2,Y=27,Z=266
X=5,Y=35,Z=259
X=2,Y=28,Z=264
X=4,Y=28,Z=263
X=2,Y=30,Z=264
X=4,Y=29,Z=269
X=1,Y=26,Z=267
X=255,Y=26,Z=264
X=6,Y=29,Z=262
X=2,Y=26,Z=269
X=255,Y=27,Z=264
X=4,Y=25,Z=265
X=1,Y=27,Z=265
X=5,Y=61,Z=267
X=5,Y=24,Z=261
X=3,Y=25,Z=261
X=3,Y=28,Z=267
X=251,Y=26,Z=260
X=1,Y=27,Z=263
X=1,Y=31,Z=263
X=4,Y=27,Z=270
X=2,Y=33,Z=263
X=3,Y=79,Z=265
X=252,Y=26,Z=264
X=3,Y=25,Z=260
X=4,Y=30,Z=263
X=239,Y=26,Z=264
请根据以上数据帮忙分析,问题的根本原因?如何解决数据不稳定的问题??
|