Arduino Nano 33 BLE Sense Rev 2

On REV 2 of the Nano 33 BLE Sense the sensors have been replaced, so new libraries need to be used when updating from the previous version of the board.

LSM9DS1 (9 axis) IMU Inertial Measurement Unit sensor is replaced by BMI270 (6 axis Accelerometer and Gyroscope) and BMM150 (3 axis Magnetometer). A new library is available as Arduino_BMI270_BMM150.h.

The HTS221 temperature and humidity sensor is replaced by a HS3003 sensor.

For the new IMU this is the basic code to get the readouts:

// updated from the sample code for the original board by Riccardo Rizzo 

// update the library from Arduino_LSM9DS1.h to this:
#include <Arduino_BMI270_BMM150.h> 

// x, y and z are on a scale of -8192 to +8192; 
// x and z are the fraction of the gravitational pull, so not the angle; y = rotational force 
float s, x, y, z;
String oBuf = "";

void setup() {
  Serial.begin(9600);
  while (!Serial);
  Serial.println("Started");

  if (!IMU.begin()) {
    Serial.println("Failed to initialize IMU! Halted.");
    while (1);
  }

}

void loop() {

  if (IMU.accelerationAvailable()) {
    IMU.readAcceleration(x, y, z);
    s = IMU.accelerationSampleRate(); 
  }

    oBuf = String(s) + " " + String(x) + " " + String(y) + " " + String(z); 
    Serial.println(oBuf);

}

Hi! did you have time to test the new modules? I am pretty interested in the IMU (I use mine a lot of my nano BLE).
do you think a separate magnetometer give more accurate results, or just simpler to communicate with ?

thanks.

1 Like

Hi i have bought both of the nano 33 ble sense, and what really sucks is i havent found a good library, The library thats given above, actually for either of the BLE sense , only gives the raw analog data. Which means it has to be calibrated and filtered and fused... Paul mcwhorter on you tube has a good imu tutorial. What I really want is solid quaternion data like you can get with the BNO055 or the Waveshare 10dof(MPU9255) , those modules are great. i think the accuracy will only depend on the calibration code. I may try to write my self , The data sheet for BMI270 is over 170 pages. I got reading to do .

Hi,

I see you're looking for accuraute measure and high level calibration!
To write your own library must not be so complicated: I wrote mine for LSM9DS1 (and LSM6DS for the nano 33IOT) using examples as models. This way, I export data the way I want (And I have work left to handle it properly!)
For sure, the data sheet is mandatory if you want to get the best of your module! And I bet you will find into some critical info!

1 Like

im not even sure i want to start it . I feel like someone else is already writing one , and they probably have better coding skills than me. But I know i will learn alot if I try it. With so many projects out there its hard to decide what to focus my time on. good day to you GrandPete, I think these nano 33 modules have alot to offer , i just didnt realize there were no formal libraries.

Not the main topic of this thread, but to avoid misleading in debugging...

The HS3003 temperature and humidity sensor is replaced by a HTS221 sensor.

This has been said on some websites, but in fact it is the other way around: HTS221 has been replaced by HS3003.

See both datasheets of ABX00069/ABX00070, section 10 (Revision History):

Date        Revision  Changes
10/11/2022  3         Updated to account for Rev2 changes:
                      LSM9DS1 -> BMI270+Bmm150,
                      HTS221 -> HS3003,
                      MPM3610 -> MP2322,
                      PCB modification

Tested here, the HS3003 works perfectly with Arduino_HS300x library at I2C addres 0x44. Also see:

https://docs.arduino.cc/tutorials/nano-33-ble-sense-rev2/humidity-and-temperature-sensor

Yes I did. Resolution of the accelerometer is -8192 to 8192. That is pretty impressive and it is quite fast, but also very instable. Just leaving the board on you desk gives 90 readings per second with variations of 20 points. Fine for my purposes, but it could be a killer for some applications.

Thanks for pointing that out! I revised the post.

:+1:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.