Hi,
I am working with an Arduino Nicla Vision running on Firmware Version 4.3.0, powered via the 3.7V battery connector.
I am trying to write a script that takes an image and deep-sleeps, to minimize power consumption.
When only deep-sleeping, like so:
import pyb, time
time.sleep(2)
# Configure RTC to trigger wakeup ever 2 seconds
rtc = pyb.RTC()
rtc.wakeup(2000)
pyb.standby()
The Nicla draws ~4.3 mA during deep-sleep.
If I turn on the camera sensor:
import pyb, time, sensor
time.sleep(2)
# Configure RTC to trigger wakeup ever 2 seconds
rtc = pyb.RTC()
rtc.wakeup(2000)
# Initialize sensor
sensor.reset()
pyb.standby()
The Nicla now draws ~20 mA during deep-sleep.
However, when I try to turn off the sensor:
import pyb, time, sensor
time.sleep(2)
# Configure RTC to trigger wakeup ever 2 seconds
rtc = pyb.RTC()
rtc.wakeup(2000)
# Initialize and shutdown sensor
sensor.reset()
sensor.shutdown(True)
pyb.standby()
The Nicla still draws ~20 mA during deep-sleep.
It seems that the sensor.shutdown(True) does not do anything.
If I try to use sleep, instead of shutdown:
import sensor
sensor.sleep(True)
I get:
OSError: Sleep Failed
Is there a way to turn of the camera sensor during sleep, so the drawn current is similar to the ‘pure’ deep-sleep?