I have a setup using Nano 33 BLE with external barometric and GPS sensors connected to Nano's I2C pins. Multiple I2C-Scanners are unable to find I2C devices.
hardware:
- Arduino Nano 33 BLE (ABX00030)
- GY-63 MS5611
- Arduino MKR GPS SHD (ASX00017)
Using Arduino IDE 2.0.0 rc3 under Windows 11. Communication via COM Ports (upload to the Nano BLE board and serial monitor) is working as expected, tested with the basic blink example and two different I2C scanners.
fritzing:
diagnostics:
power supply for Nano BLE
The Nano BLE Board is powered by USB. External sensors are powered via the Nano BLE Board. I also tried with external power supply (5V breadboard module, connected to Nano's VIN [5V input] and to external sensors directly), with same results.
power supply for external sensors
Since the Nano BLE is obviously working (upload and serial monitor working), I focussed on the power supply of the external sensors. Both sensor modules take 5.0 V input, working with 3.3 V internally. So I tested different power supply setups:
- 5.0 V external power supply, connected directly to the external sensors
- 5.0 V input (Nano BLE pin VIN, which supplies 5.0V when USB is powered)
Nano 33 BLE documentation says:
NOTE: Since VUSB feeds VIN via a Schottky diode and a DC-DC regulator specified minimum input voltage is 4.5V the minimum supply voltage from USB has to be increased to a voltage in the range between 4.8V to 4.96V depending on the current being drawn
As a 3rd option I could use the +5.0V output for peripherals ("+5V"), which is inactive by default for security reasons, because all digital input pins are limited to 3.3 V. Therefore the pin "+5V" needs to be soldered, what I have not done yet. Nano 33 BLE documentation says:
NOTE: Arduino Nano 33 BLE only supports 3.3V I/Os and is NOT 5V tolerant so please make sure you are not directly connecting 5V signals to this board or it will be damaged. Also, as opposed to Arduino Nano boards that support 5V operation, the 5V pin does NOT supply voltage but is rather connected, through a jumper, to the USB power input
https://support.arduino.cc/hc/en-us/articles/360014779679-About-Nano-boards-with-disabled-5-V-pins
PIN description:
PIN 12
VUSB
Power In/Out
Normally NC; can be connected to VUSB pin of the USB connector by shorting a jumper
Measured power supply is stable in all tested power supply setups. The GY-63 module has a red LED on when powered, which I found to be an operating indicator in other other examples found by Google search.
power level of I2C signals
The external sensors are operating with 3.3 V internally. So one could assume that power level of I2C signals is not exceeding 3.3 V. Measuring with a multimeter shows 3.8 V.
In found some forum threads about I2C pull up. Nano 33 BLE documentation says:
NOTE: As opposed to other Arduino Nano boards, pins A4 and A5 have an internal pull up and default to be used as an I2C Bus so usage as analog inputs is not recommended
i2c scanner on duplicated hardware
For testing purposes and later LoRa connectivity I bought and built the setup twice.
On two very exactly duplicated hardware setups I did i2c scans. None of them found any i2c device. But I noticed different timings. Scan on first breadboard/Nano finishs within milliseconds (without "Scan finished" message), while second breadboard/Nano finishes after 20 seconds.
First breadboard:
10:46:53.920 -> Scanning...
10:46:53.959 -> No I2C devices found
10:46:53.959 ->
10:46:58.943 -> Scanning...
10:46:58.987 -> No I2C devices found
10:46:58.987 ->
10:47:03.964 -> Scanning...
10:47:04.003 -> No I2C devices found
10:47:04.004 ->
Second breadboard:
10:49:09.135 -> --- Scan started ---
10:49:31.474 -> No I2C devices found
10:49:31.474 -> --- Scan finished ---
10:49:31.474 ->
10:49:36.467 -> --- Scan started ---
10:49:58.777 -> No I2C devices found
10:49:58.777 -> --- Scan finished ---
10:49:58.777 ->
10:50:03.806 -> --- Scan started ---
10:50:26.121 -> No I2C devices found
10:50:26.121 -> --- Scan finished ---
10:50:26.121 ->
Code:
#include <Wire.h>
void setup()
{
Wire.begin();
Serial.begin(9600);
Serial.println("\nI2C Scanner");
}
void loop()
{
byte error, address;
int nDevices;
Serial.println("Scanning...");
nDevices = 0;
for(address = 1; address < 127; address++ )
{
Wire.beginTransmission(address);
error = Wire.endTransmission();
if (error == 0)
{
Serial.print("I2C device found at address 0x");
if (address<16)
Serial.print("0");
Serial.print(address,HEX);
Serial.println(" !");
nDevices++;
}
else if (error==4)
{
Serial.print("Unknow error at address 0x");
if (address<16)
Serial.print("0");
Serial.println(address,HEX);
}
}
if (nDevices == 0)
Serial.println("No I2C devices found\n");
else
Serial.println("done\n");
delay(5000); // wait 5 seconds for next scan
}
Conclusions:
At this point I have no further ideas about troubleshooting. Next step could be to buy an oscilloscope to measure the I2C signals of the external sensors.
Any else suggestions?