Arduino Nano 33 IoT behaves differently by different power source

Hi there.

I have gas sensors connected to my Arduino Nano 33 IoT now. The Arduino collects the gas sensors’ data and sends them wirelessly to the desktop. Current coding can turn off the gas sensors for 50 min and wake them up for 10 min to form a one hour cycle. When I tested the Arduino board by connecting and powering it via usb cable from desktop the sensors can be turned off in the 50 min schedule. However, when I connected the Arduino board via USB cable from a power bank, the sensors cannot be turned off. The reason I need the sensors to sleep for 50 min is to save battery. But as now, since the board can’t put the sensors to sleep, I can’t save battery life.

Does someone know why by different power sources, the board behaves differently? And how to solve this?


Most user run into the issue of the while(!Serial); in their sketch when they connect the Arduino into a power bank for the first time. It stops the sketch from running until the Serial Monitor is connected.

If that is not your issue please post your code, a link to the datasheet of non-Arduino components and a schematic (simple hand drawn is OK).

Hi Klaus. Thank you for your reply. I don’t think it is the problem here because the sensor is found to be working and sending data to the laptop. The only problem is the sensor cannot be turned off. I use the arduino to send a line of cmd to the sensor and when I tested it via the USB from the computer the cmd goes through whilst if I connected it via the USB from a power bank the sensor cannot be turned off (i.e. the cmd does not go through). I did a little search and someone says the power noise. I am now using a 10uF capacitor in parallel to the sensor but it still does not sleep.
Any thought?

As I said, can you please:

  • post the code
  • share a schematic
  • provide links to non-Arduino component datasheets e.g. your sensor
  • if the sensor is a module please provide a link to that and the sensor datasheet

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