Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    Sort by:
    ‎08-14-2019 10:25 AM
     Selecting the right part The BMP series of pressure sensor contains 2 products: BMP280 and BMP388. Table 1 shows an overview of the features.                                                     Table 1: Overview of the products in this family Key features LGA with metal lid package SPI or I2C interface Built-in IIR filter.  Differences between products The main differences in the BMP product family are in the thickness of the package, and the overall performance of the MEMS element. BMP388 offers higher performance in a smaller package compared to BMP280. See the complete list of differences in Table 2.                                                                                             Table 2: Differences between BMP product family members Available evaluation tools and software To best to evaluate the products from the BMP family, we recommend the following combination of evaluation tools: COINES Desktop software (Windows version &Linux version & MacOS) Development Desktop Software Application board 2.0 BMP280 shuttle board BMP388 shuttle board Reference design Figure 1 shows a complete schematic of a typical use case.                                                                                           BMP280                                                                                        BMP388                                                        Figure 1: Exemplary Reference design   Bill of materials                                             Table 3: Bill of materials Layout recommendations Because the BMP sensor family contains tiny mechanical structure inside the package, care must be taken during the layout phase to ensure the best performance. The complete handling and soldering guide can be found on the Bosch Sensortec’s website. BMP28x Handling, soldering & mounting instructions BMP380 Handling,soldering & mounting instructions In addition to the attached guidelines, see below for the typical manufacturing procedure for the BMP388 pressure sensor. Landing Pattern                                                                                          BMP280                                                                                      BMP388                                                          Figure 2: Recommended landing pattern Typical Layout                                                                                                   BMP280                                                                                           BMP388                                                                          Figure 3: Typical layout Manufacturing notes                                                               Table 4: Manufacture recommendation First power-on After powering on the sensor for the first time, the initial specs would be tested for communication with the device. This can be done simply by reading the chip identification code in the register 0xD0 (BMP280) 0x00 (BMP388). See below for the expected values:                                                          Table 5: Chip IDs of the BMP product family Here is some sample code on how to perform this test, based on the BMP388 , using the COINES software as the host. /*! * @brief This internal API is used to check the bmp388 sensor chip ID * * @param[in] void * * @return void * */ static void init_bmp3(void) { int8_t rslt; rslt = bmp3_init(&bmp3Dev); if (rslt == BMP3_OK) { printf("BMP3 Initialization Success!\n"); printf("Chip ID 0x%X\n", bmp3Dev.chip_id); } else { printf("Chip Initialization failure !\n"); exit(COINES_E_FAILURE); } } How to read sensor data  Here is some sample code on how to read sensor data, based on the BMP388, using the COINES software as the host /*! * @brief This internal API is used to read the streaming data in a while loop and * print in console. * * @param[in] void * * @return void */ static void read_sensor_data(void) { int times_to_read = 0; while (times_to_read < 200) { bmp3_get_sensor_data(BMP3_ALL, &bmp3_comp_data, &bmp3Dev); printf("T: %.2f, P: %.2f \n", (bmp3_comp_data.temperature / 100.), (bmp3_comp_data.pressure / 100.)); fflush(stdout); coines_delay_msec(10); times_to_read = times_to_read + 1; } }  Sample code The complete sample code shown above can be compiled and executed from the COINES installation directory (by default, C:/COINES under Windows), from the following subfolder: \examples\c\bmp3 Usage The COINES installation provides sample code on how to turn on the sensor, configure it and read out the pressure data. COINES\v1.0\examples\c\bmp3 Sample code /*! * @brief Main Function where the execution getting started to test the code. * * @param[in] argc * @param[in] argv * * @return status * */ int main(int argc, char *argv[]) { int16_t rslt; struct coines_board_info board_info; init_bmp3_sensor_driver_interface(); rslt = coines_open_comm_intf(COINES_COMM_INTF_USB); if (rslt < 0) { printf("\n Unable to connect with Application Board ! \n" " 1. Check if the board is connected and powered on. \n" " 2. Check if Application Board USB driver is installed. \n" " 3. Check if board is in use by another application. (Insufficient permissions to access USB) \n"); exit(rslt); } rslt = coines_get_board_info(&board_info); if (rslt == COINES_SUCCESS) { if (board_info.shuttle_id != BMP3_SHUTTLE_ID) { printf("! Warning invalid sensor shuttle. This application will not support this sensor \r\n" "1.Check the sensor shuttle \r\n" "2.Reset the board \r\n"); exit(COINES_E_FAILURE); } } init_sensor_interface(); /* after sensor init introduce 200 msec sleep */ coines_delay_msec(200); init_bmp3(); read_sensor_data(); coines_close_comm_intf(COINES_COMM_INTF_USB); return EXIT_SUCCESS; Further reads Datasheets: BMP280 Datasheet BMP388 Datasheet Application notes: BMP388 self-test Handling, soldering and mounting instructions BMP280 HSMI BMP388 HSMI
    View full article
    ‎04-27-2022 09:44 AM
    Selecting the right part BMA456 is 16bit, digital, triaxial acceleration sensor with intelligent on-chip motion triggered interrupt features optimized for wearable and hearable applications. BMA456 support different advanced features via different configure file. Table 1 shows an overview of the features. 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 Common characteristics The main characteristics of this product family are: Key features: 2.0 x 2.0 mm² size Pin to pin compatibility with all other 2.0 x 2.0 accelerometers from Bosch Sensortec SPI or I²C interface Configurable range from ±2G to ±16g Configurable output data rate up to 1.6kHz Integrated 1kB FIFO Auxiliary I²C interface for connecting external magnetometer, including data synchronization Built-in smart interrupt controller, with features such as step-counter which offers high performance for all wearing positions, including wrist-worn. BMA456 parameters BMA456 offers higher performance and stability in a smaller package. See the complete description in Table 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 Available evaluation tools and software To best to evaluate the products from the BMA456 family, we recommend the following combination of evaluation tools: COINES Desktop software Application board 3.0 Sensor Shuttle board BMA456 Shuttle board. Layout recommendations Because the BMA4xy sensor family contains tiny mechanical structure inside the package, care must be taken during the layout phase to ensure the best performance. The complete handling and soldering guide can be found on the Bosch Sensortec's website. First power-on After powering the sensor for the first time, the initial specs would be to test for communication with the device. This can be done simply by reading the chip identification code in the register 0x00. See below for the expected values: Device Chip ID BMA456 0x16 Table 3: Chip IDs of the BMA4xy product family 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); } How to test the sensor's functionality The BMA4xy series of accelerometers feature a fully integrated and motionless self-test procedure on the ASIC itself. When the self-test is triggered, the accelerometer uses electric fields to physically move the electrodes in all directions, senses the deflection and compares it with the expected output. Therefore, the built-in self-test features is the recommended way to test the sensor's functionality. Here is some sample code on how to perform this self-test, based on BMA456, using the COINES software as the host. /*!  * @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");     }                } How to test the sensor's performance There are 2 performance parameters that can easily be tested with the device motionless: offset and noise. See below for the typical values of the sensors. Note: Typical values are defined as ±1σ, which means that we expect 68.3% of sensors to fall within these values. Min/Max values are defined as ±3σ, which means 99.7% of sensors shall be within these values. Parameter BMA456 units Offset ±20 mg Noise 120 µg/√Hz Table 4: Typical performance of BMA456 For the offset, the test procedure is quite simple. With the device in a known position, such as a flat surface, calculate the average value for each axis, and substract the expected output (e.g. 0G, 0G, +1G) from the data. The result is the offset of the sensor. Here is some sample code on how to perform this test, based on BMA456, using the COINES software as the host. /*! Average value calculation */ double x_avg_mg=0; double y_avg_mg=0; double z_avg_mg=0; for (int i=0; i<1000; ++i) {     double xval, yval, zval;     /* ( 'datapoint' * '4G' * '2' * '1000mg') / ('scaling factor for 16 bits') */     xval = (((double)sens_data[i].x) * 4. * 2. * 1000) / pow(2,16);     yval = (((double)sens_data[i].y) * 4. * 2. * 1000) / pow(2,16);     zval = (((double)sens_data[i].z) * 4. * 2. * 1000) / pow(2,16);                                    x_avg_mg += xval / 1000.;     y_avg_mg += yval / 1000.;     z_avg_mg += zval / 1000.; }                /*! Offset Calculation */ double x_off_mg=x_avg_mg - X_REST_POSITION_MG; double y_off_mg=y_avg_mg - Y_REST_POSITION_MG; double z_off_mg=z_avg_mg - Z_REST_POSITION_MG;                if( OFFSET_THRESHOLD_MG > x_off_mg && OFFSET_THRESHOLD_MG > y_off_mg && \                                OFFSET_THRESHOLD_MG > z_off_mg ) {     printf("Test #3: Performance. Offset. PASSED: X=%4.1lfmg Y=%4.1lfmg Z=%4.1lfmg Threshold <\        %4.1lf\n",       x_off_mg, y_off_mg, z_off_mg, OFFSET_THRESHOLD_MG); } else {     printf("Test #3: Performance. Offset. FAILED: X=%4.1lfmg Y=%4.1lfmg Z=%4.1lfmg Threshold <\ %4.1lf\n", x_off_mg, y_off_mg, z_off_mg, OFFSET_THRESHOLD_MG); } The noise calculation is a bit more complicated. First, subtract the offset from each datapoint. The RMS value can be calculated as the square root of the arithmetic mean of the squares of the noise values.  x_rms = sqrt[1/n( x_1^2 + x_2^2 + .... + x_n^2)] Since the noise value is affected by the bandwidth of the digital filter, we need to convert it back to noise density with the following formula. Note: this applied only to a second order filter noise_density = noise_RMS/[sqrt(1.22 x bandwidth)] Here is some sample code on how to perform this test, based on BMA456, using the COINES software as the host. /*! RMS Noise Calculation */ double x_rms_noise_mg=0; double y_rms_noise_mg=0; double z_rms_noise_mg=0; for (int i=0; i<1000; ++i) {     double xval, yval, zval;     /* ( 'datapoint' * '4G' * '2' * '1000mg') / ('scaling factor for 12 bits') */     xval = (((double)sens_data[i].x) * 4. * 2. * 1000.) / pow(2,16);     yval = (((double)sens_data[i].y) * 4. * 2. * 1000.) / pow(2,16);     zval = (((double)sens_data[i].z) * 4. * 2. * 1000.) / pow(2,16);                                    x_rms_noise_mg += pow(xval - x_avg_mg,2) / 1000.;     y_rms_noise_mg += pow(yval - y_avg_mg,2) / 1000.;     z_rms_noise_mg += pow(zval - z_avg_mg,2) / 1000.; }                /* rms noise is the square root of the arithmetic mean of the squares of the noise values */ x_rms_noise_mg = sqrt(x_rms_noise_mg); y_rms_noise_mg = sqrt(y_rms_noise_mg); z_rms_noise_mg = sqrt(z_rms_noise_mg);                /*! RMS Noise to RMS noise density convertion */ /* noise density = RMS noise  / sqrt ( 1.22 * bandwidth) */ /* BMA456 has 40.5Hz bandwidth at 100Hz normal mode */   double x_noise_dens_ug = 1000 * x_rms_noise_mg / sqrt(1.22 * 40.5); double y_noise_dens_ug = 1000 * y_rms_noise_mg / sqrt(1.22 * 40.5); double z_noise_dens_ug = 1000 * z_rms_noise_mg / sqrt(1.22 * 40.5);   if( NOISE_THRESHOLD_MG > x_noise_dens_ug &&                                NOISE_THRESHOLD_MG > y_noise_dens_ug &&                                NOISE_THRESHOLD_MG > z_noise_dens_ug ) {     printf("Test #3: Performance. Noise. PASSED: X=%4.1lfug/sqrt(Hz) Y=%4.1lfug/sqrt(Hz) \ Z=%4.1lfug/sqrt(Hz) Threshold < %4.1lf\n", x_noise_dens_ug, y_noise_dens_ug, z_noise_dens_ug,\ NOISE_THRESHOLD_MG); } else {     printf("Test #3: Performance. Noise. FAILED: X=%4.1lfug/sqrt(Hz) Y=%4.1lfug/sqrt(Hz) \   Z=%4.1lfug/sqrt(Hz) Threshold < %4.1lf\n", x_noise_dens_ug, y_noise_dens_ug,\ z_noise_dens_ug,NOISE_THRESHOLD_MG);   } Calibrating the sensor The first question to ask concerning calibration is whether it is required for the intended application. Accelerometer calibration mainly consists of calibrating the accelerometer's offset. The main impact for this is in tilt-sensing application, where the offset will induce an error in the measurement of the horizon. The accelerometer comes from the factory pre-trimmed, but the soldering process and PCB bending due to assembly can vary the offset, therefore it is preferable to calibrate the accelerometer after assembling the device into the device housing. Pre- and post-calibration accuracy     Sample code The calibration procedure is outlined in the inline calibration application note. Here is some sample code on how to perform this calibration, based on BMA456, using the COINES software as the host. Note : Although the concept is the same, the BMA4xy family of accelerometers does not include a built-in offset calculation on the ASIC. Since the offset are calculated inside of the Sensor API itself, it allows for a much more flexible target position.  rslt = bma456_init(&bma456dev); if (rslt == BMA4_OK) {     printf("BMA456 Initialization Success!\n"); } else {                  coines_exit_error("BMA456 Initialization Failure!\n"); } coines_delay_msec(100); rslt = bma456_write_config_file(&bma456dev); /* Enable the accelerometer */ rslt = bma4_set_accel_enable(BMA4_ENABLE, &bma456dev); /* Set the accel configurations */ struct bma4_accel_config accel_conf = { 0 }; accel_conf.odr = BMA4_OUTPUT_DATA_RATE_50HZ; accel_conf.bandwidth = BMA4_ACCEL_NORMAL_AVG4; accel_conf.perf_mode = BMA4_CIC_AVG_MODE; accel_conf.range = BMA4_ACCEL_RANGE_8G; rslt = bma4_set_accel_config(&accel_conf, &bma456dev); dev.delay_us(20000, dev.intf_ptr);                         if (rslt == BMA4_OK) {     /* Set accel foc axis and it's sign (x, y, z, sign)*/ struct bma4_accel_foc_g_value g_value_foc = { 0, 0, 0, 0 };       rslt = bma4_perform_accel_foc( &g_value_foc, &bma456dev);                          if (rslt == BMA4_OK) {         printf("BMA456 perform FOC successful!\n");         /* Delay after performing Accel FOC */         dev->delay_us(30000, bma456dev ->intf_ptr);         /*! calculates the offset after compensation */         rslt = bma4_read_regs(BMA4_OFFSET_0_ADDR, data_array, 3, & bma456dev);         printf("Post-calibration offset : X=%4.1lfmg Y=%4.1lfmg Z=%4.1lfmg", data_array[0],\                data_array[1], data_array[3]);     } else {                  coines_exit_error("Unknown communication error. Exiting...\n");     } } Once the offsets are determined, they can be written into the NVM so that the sensor automatically compensates for the soldering offset even after physically removing the power. Here is some sample code on how to save calibration data to NVM, based on BMA456, using the COINES software as the host. /*!  * @brief This internal API is used to update the nvm content  *  * @param[in] void  * @return void  *  */ static void bma456_update_nvm(void) {     uint16_t rslt;     uint8_t data;       /* unlocks the NVM for writing */     data = 0x02;     bma4_write_regs(0x6A, &data, 1, &bma456dev);                    /* makes sure the BMA456 is not executing another command */ do {         rslt = bma4_read_regs(BMA4_STATUS_ADDR, &data, 1, &bma456dev);         if ( 0 != rslt ) coines_exit_error("Unknown communication error. Exiting...\n");     } while ( 0 == (data&0x10) );                    /* performs the writing of the NVM */     rslt = bma4_set_command_register( 0xA0,  &bma456dev);     if ( 0 != rslt ) coines_exit_error("Unknown communication error. Exiting...\n");                        /* wait for the command to be completed */ do {         rslt = bma4_read_regs(BMA4_STATUS_ADDR, &data, 1, &bma456dev);         if ( 0 != rslt ) coines_exit_error("Unknown communication error. Exiting...\n");     } while ( 0 == (data&0x10) );                    /* locks the NVM writing */     data = 0x00;     bma4_write_regs(0x6A, &data, 1, &bma456dev); }   Further reads Datasheets: BMA456 Datasheet Application notes: Inline calibration of accelerometers Handling, soldering and mounting instructions, Accelerometers HSMI  
    View full article
    100% helpful (1/1)
    ‎08-10-2022 04:52 PM
    The Arduino Nicla Sense ME board featuring a rich set of Bosch Sensortec sensors is a robust and versatile development board that enables users to develop smart sensing applications. This series of tutorial videos aim to help users to get started and familiar with the board and quickly explore some of the functionalities and resources around it.  
    View full article
    ‎04-01-2021 10:22 AM
    Please find attached the two white papers for our BHI260AP self-learning AI sensor: White paper: Me, myself and AI How the new self-learning AI sensor pesonalizes your home workout Fitness tracking is presently experiencing a huge upswing in popularity. The market for fitness trackers and step counters has surged by 65% year-on-year [1], with just the Fitbit platform alone claiming nearly 30 million active users [2]. Current activity tracking devices have demonstrated the huge market potential of this segment and have laid the groundwork for next-generation AI-enabled devices to take centre stage as individual fitness tracking goes mainstream. White paper: Swim like a fish with Artificial Intelligence Combining AI and sensors to create a new generation of intelligent wearables Artificial intelligence (AI) is rapidly becoming a natural and integral part of our everyday lives – working silently and unnoticed in the background. AI makes sense of the multitude of data streaming in from various sensors to deliver detailed and precise insights, which have the potential to increase the utility of virtually all electronic devices on the market today. This defining technology can accurately determine whether the user of a device is walking, running, sitting, sleeping – or even swimming in real-time. This article explores how sensors synergize with AI in wearables to deliver valuable information to users – even in demanding environments like swimming pools.
    View full article
    Top Contributors
    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist