Diagnostics for Nano 33 BLE Sense

First, I am new to Arduino. I purchased a Nano 33 BLE Sense from Digi-Key for a class I am taking. I have gone through all of the Arduino setup pages and have both the IDE and CLI installed. I have the board connected via USB to my Ubuntu 22.04 laptop. I have tried to work through the temperature and inertial sensor docs and tried the sample code. In the IDE I can see that the verification completes successfully for the sample code compiles. I then upload to the board and this succeeds. However, after uploading I do not see any output in the serial console of the IDE. If I reset the board I normally will see that the sensor failed (IMU and HTS both fail to be found). The silk screening on the board shows that I have a Nano 33 BLE Sense Rev 2. My questions are:

  • Is there a diagnostic I can run to see if the sensor are actually working correctly?
  • Is there something that I need to do differently?

Thanks in advance for any help.

Does the temperature sensor program print anything on the serial monitor?

If so, post that code (using code tags) and describe what happened.

yes and yes, and you could do everything by yourself (hope it is a good news).

So:

  • your code is an example (I assume it is work, and I did use the LSM9DS3 library on BLE version1)
  • the upload seems to be complete and ok
  • you cant achieve to have exact results on what happens in your card.

My advice will be:

first upload the blink example sketch, as it will light the on board led. No serial monitor requested, you can see the result.
Make sure everything works fine, as connected to your computer, as on stand alone (if you have external power available).

Please come back if everything ok with the very simple Blink code, then we may dive deeper in the Serial monitor function and eventually I2C protocol.

Thanks for replying. Like I said, I'm really new to Arduino.

To answer your question, after the upload the serial monitor is blank. If I press the reset button a couple of times I see the output of the Serial.println that states: Failed to initialize humidity temperature sensor!

The code is example code for HTS. It is as follows:

/*
  HTS221 - Read Sensors

  This example reads data from the on-board HTS221 sensor of the
  Nano 33 BLE Sense and prints the temperature and humidity sensor
  values to the Serial Monitor once a second.

  The circuit:
  - Arduino Nano 33 BLE Sense

  This example code is in the public domain.
*/

#include <Arduino_HTS221.h>

float old_temp = 0;
float old_hum = 0;

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

  if (!HTS.begin()) {
    Serial.println("Failed to initialize humidity temperature sensor!");
    while (1);
  }
}

void loop() {
  // read all the sensor values
  float temperature = HTS.readTemperature();
  float humidity    = HTS.readHumidity();

  // check if the range values in temperature are bigger than 0,5 ºC
  // and if the range values in humidity are bigger than 1%
  if (abs(old_temp - temperature) >= 0.5 || abs(old_hum - humidity) >= 1 )
  {
    old_temp = temperature;
    old_hum = humidity;
    // print each of the sensor values
    Serial.print("Temperature = ");
    Serial.print(temperature);
    Serial.println(" °C");
    Serial.print("Humidity    = ");
    Serial.print(humidity);
    Serial.println(" %");
    Serial.println();
  }

  // print each of the sensor values
  Serial.print("Temperature = ");
  Serial.print(temperature);
  Serial.println(" °C");

  Serial.print("Humidity    = ");
  Serial.print(humidity);
  Serial.println(" %");

  // print an empty line
  Serial.println();

  // wait 1 second to print again
  delay(1000);
}

The blink example sketch worked as expected. I can's get the LSM9DS3 example to work. I did add that Library into the IDE too. Thank you for replying.

If you are using the example program without modification, then the sensor may be defective. There may be other problems.

Run the Arduino I2C address scanner program to see what devices are connected to the I2C bus.

I will run the I2C address scanner to see. I'll do that after my work day and report back to this thread. Thanks.

yep, just read your answer to Jremington.

So if youre able to read "failed to initialize" in serial port, even after some reboot, it is good news: your board is completely operative, and so there is a "problem" certainly with the I2C protocol.

Could be a pain to clean if you are not confortable with I2C, and quite easy task to code your own protocol (at least for testing).

A quick read on the datasheet (for the module to communicate with can give you the register's adress where the data are stored.
Then you use the wire.h library (that allows you to speak with I2C) and reach the correct register.
here a simplified coding:

Setup(){
Wire.begin();
}

dedicated function to read one or more register:

int8_t readBytes(uint8_t I2C_adresse, uint8_t register_adresse, uint8_t *data, uint8_t size) {

  Wire.beginTransmission(I2C_adresse);
  Wire.write((uint8_t)register_adresse);
  Wire.endTransmission();

  Wire.requestFrom(I2C_adresse, size);

  for (int i = 0; i < size; i++) {
    *(data + i) = Wire.read();
  }
}

This is great information. It's been a few years since I've done any hardware work. I'm slowly remembering everything. Thank you for replying.

no problem, I will be glad to help.
and I know too much that sad feelings to have some stuff not working without explanation. This is exactly what do I2C protocol if not correctly set up.
Once done, no more issue (till next module with its own prerequisites) !

The internal sensors of the Nano33BLESense are on the alternative Wire1 bus. You will need to modify the scanner program

#include <Wire.h>

void setup() {
  Serial.begin (115200);

  // Leonardo: wait for serial port to connect
  while (!Serial) 
    {
    }
  delay(2000);
  Serial.println ();
  Serial.println ("I2C scanner. Scanning ...");
  byte count = 0;
  
  Wire1.begin();
  for (byte i = 8; i < 120; i++)
  {
    Wire1.beginTransmission (i);
    if (Wire1.endTransmission () == 0)
      {
      Serial.print ("Found address: ");
      Serial.print (i, DEC);
      Serial.print (" (0x");
      Serial.print (i, HEX);
      Serial.println (")");
      count++;
      delay (1);  // maybe unneeded?
      } // end of good response
  } // end of for loop
  Serial.println ("Done.");
  Serial.print ("Found ");
  Serial.print (count, DEC);
  Serial.println (" device(s).");
}  // end of setup

void loop() {}

Thank you.

First, Thank you to everyone who helped me in this thread. I'm happy to say that my board is working with the sensors now. Below is a summary of what I found.

I've had a chance to run the I2C Scanner that @cattledog provided. This resulted in the following.

I2C scanner. Scanning ...
Found address: 16 (0x10)
Found address: 57 (0x39)
Found address: 68 (0x44)
Found address: 92 (0x5C)
Found address: 104 (0x68)
Done.
Found 5 device(s).

After seeing this I checked the documentation for the Nano 33 BLE Sense Rev2 and looked at the Accelerometer and Temperature sensors. I noticed that the libraries are different for the Rev2 opposed to the original board. I used the BMI270_BMI150 lib instead of the LSM9DS1 lib for the accelerometer and that worked as expected. Then I tried the HS300X lib instead of the HTS221 lib for the Temp and that works.

Wow! Not just the libraries, the sensors are completely different. Maybe others too. For further experiments, make sure that you have the Rev2 documentation and libraries on hand.

Exactly. I did not mention the HW change. I was really surprised, but will be watching the board REVs closer now.

Unfortunately there are several unanswered questions about nano 33 BLE sense devices. First it was nano 33BLE sense, then there is nano 33BLE sense Lite and finally there is nano 33BLE sense Rev2. As a result, the vendors don't specify (in their description) which one they are selling you. So if you are unlucky like me, and you are not able to get any result for the humidity example, wonder no more. Your board is nano 33BLE sense Lite, which does not have humidity sensor. I don't know who to blame, Arduino for creating such a confusion or the vendors.

Hmmm... I don't see Arduino BLE 33 nano sense lite listed on the Arduino site or Digi-Key. I have an Arduino BLE 33 Sense Rev2. I see that Arduino and Digi-Key both designate the no Rev # and the Rev2. I'll have to keep looking for the lite model.

Just jumping in on this as I just had a student who had a similar problem. They bought their sense as part of the machine learning kit (Arduino Tiny Machine Learning Kit | The Pi Hut) but hadn't realised that it was the "lite" version. It is communicated in the product description but you have to click the "view more" part.

It is seemingly impossible to find official Arduino coverage of this, Pi Hut says the following on the page

For us to be able to have this kit back in stock Arduino have produced a Nano 33 BLE Sense without the humidity sensor. This change does not affect this kit's usage and/or content experience. This board is fully compatible with the standard documentation.

So I guess it was a sourcing issue from the chip crisis. Still not sure why there is no communication about this.

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