Hi,
Try adding this before sensor.sleep(True)
Code: Select all
sensor.__write_reg(0x4F, 0x18)
sensor.sleep(True)
This disables the internal core regulator, I know it doesn't make sense but it seems to work.
Note sensor.sleep pulls PWDN high regardless of the argument (True or False), so you shouldn't use it if you want the sensor working. It's all a hack for now I'll add functions for this in the next release.
I also noticed the power consumption varies (I think it depends on the temperature), so a longer RTC wake up time allows the temp to drop down and the consumption. So here's the full example I'm using, measured ~500uA with this:
Code: Select all
import pyb, machine, sensor
# Create and init RTC object.
rtc = pyb.RTC()
# (year, month, day[, hour[, minute[, second[, microsecond[, tzinfo]]]]])
rtc.datetime((2014, 5, 1, 4, 13, 0, 0, 0))
# Print RTC info.
print(rtc.datetime())
sensor.reset()
# Bypass internal regulator
sensor.__write_reg(0x4F, 0x18)
# Shutdown the sensor.
sensor.sleep(True)
# Enable RTC interrupts every 30 seconds.
# Note the camera will RESET after wakeup from Deepsleep Mode.
rtc.wakeup(30000)
# Enter Deepsleep Mode.
machine.deepsleep()