BMA456 是16 位数字三轴加速度传感器,具有智能片上运动触发中断功能,针对可穿戴和耳戴式应用进行了优化。 BMA456 通过不同的配置文件支持不同的高级功能。表 1 显示了这些功能的概述。
Parameter |
BMA456 |
Digital resolution |
16bit |
Range and sensitivity |
+/-2g: 16384LSB/g +/-4g: 8192LSB/g +/-8g: 4096LSB/g +/-4g: 2048LSB/g |
Zero-g offset(typ.) |
+/-20mg |
Noise density(typ.) |
120µg/√Hz |
Bandwidths |
5Hz …684Hz |
Interfaces |
SPI & I2C, 2 x digital interrupt pins |
Supply voltage |
VDD: 1.62 to 3.6V VDDIO: 1.2 to 3.6V |
LGA package(mm3) |
2.0 x 2.0 x 0.65 |
Feature/Interrupts |
Step Counter/Step detector (optimized for wearables) |
Activity recognition: running, walking, still | |
Tilt on wrist | |
Tab/Double Tab | |
Any-motion/No-motion | |
High-g/ low-g |
Table 1: Overview BMA456 features
关键参数:
- 2.0 x 2.0 mm² 尺寸
- 与 Bosch Sensortec 的所有其他 2.0 x 2.0 加速度计引脚对引脚兼容
- SPI 或 I²C 接口
- 可配置范围从±2G到±16g
- 可配置的输出数据速率高达 1.6kHz
- 集成 1kB FIFO
- 用于连接外部磁力计的辅助 I²C 接口,包括数据同步
- 内置智能中断控制器,具有计步器等功能,可为所有佩戴位置(包括腕戴式)提供高性能。
硬件参数:
BMA456 在更小的封装中提供更高的性能和稳定性。请参阅表 2 中的完整说明
Parameter |
BMA456 |
Units |
Height |
0,65 |
mm |
Digital resolution |
16 |
bits |
Zero-g offset (typ.) |
±20 |
mg |
Noise density (typ.) |
120 |
µg/√Hz |
TCO (X&Y axis) |
0.2 |
mg/K |
TCO (Z axis) |
0.35 |
mg/K |
TCS |
0.005 |
%/K |
Cross Axis Sensitivity |
0.5 |
% |
Table 2: BMA456 parameter value
首次上电:
首次为传感器供电后,初始规格将测试与设备的通信。只需读取寄存器 0x00 中的芯片识别码即可完成此操作。以下是一些关于如何执行此测试的示例代码,基于 BMA456,使用 COINES 软件作为主机。
Here is some sample code on how to perform this test, based on BMA456, using the COINES software as the host.
/*!
* @brief This internal API is used to initializes the bma456 and verify the
*communication by reading the chip id.
*
* @param[in] void
* @return void
*
*/
static void init_comm_test_bma456(void)
{
int8_t rslt;
struct bma4_dev bma456dev = { 0 };
rslt = bma4_interface_init(&bma456dev, BMA4_I2C_INTF, BMA45X_VARIANT);
rslt = bma456_init(&bma456devbma425dev);
if (rslt == BMA4_OK)
{
printf("BMA456 Initialization Success!\n");
printf("Test #1: Communication. PASSED. Chip ID 0x%x\n", bma456dev.chip_id);
}
else
{
char err_string[255];
printf("BMA456 Initialization Failure!\n");
if (BMA4_E_INVALID_SENSOR == rslt)
{
sprintf(err_string, "Test #1: Communication. FAILED. Expected Chip ID: 0x%x. Received 0x%x\n",\
BMA456_CHIP_ID, bma456dev.chip_id);
}
else
{
sprintf(err_string, "Test #1: Communication. FAILED. No response from the sensor.");
}
coines_exit_error(err_string);
}
coines_delay_msec(100);
}
测试BMA456功能:
BMA4xy 系列加速度计在 ASIC 本身上具有完全集成的静止自测程序。当自检被触发时,加速度计使用电场在各个方向上物理移动电极,感测偏转并将其与预期输出进行比较。因此,内置自检功能是测试传感器功能的推荐方法。
以下是一些关于如何执行此自检的示例代码,基于 BMA456,使用 COINES 软件作为主机。
/*!
* @brief This internal API is used to test if the sensor is working by triggering the self-test.
*
* @param[in] void
* @return void
*
*/
static void function_test_bma456(void)
{
uint16_t rslt;
uint8_t testrslt;
rslt = bma4_perform_accel_selftest(&testrslt, &bma456dev);
if ( 0 != rslt ) coines_exit_error("Test #2: Functionnality. FAILED. Unknown communication error\n");
if ( BMA4_SELFTEST_PASS == testrslt )
{
printf("Test #2: Functionnality. PASSED. Sensor self-test successful\n");
}
else
{
printf("Test #2: Functionnality. FAILED. Sensor self-test failed\n");
}
}