I tried Pico W with micropython 1.23 from https://micropython.org/download/RPI_PICO_W/ plugged it into USB and measured current between VBUS and VSYS.
- when just pluggged in it draws 17.7mA
- when I connect to it over usb (e.g. via https://viper-ide.org/ ) it draws 18.7mA
- when just activating BLE it draws 31mA ("import bluetooth;bluetooth.BLE().active(1)")
- when activating micropython over BLE so that it advertises it draws 33.9mA
- when now disconnecting over USB and connecting over BLE it draws 32.9mA (saves the 1mA when usb was opened)
Now the only way I found to reduce power back to initial 18ma is to run
"import bluetooth;bluetooth.BLE().active(0);import network;network.WLAN().deinit()"
It can be seen that turning advertising off to save power makes no sense on this hardware. it was not designed for low power.
If you would use some other BLE hardware that is designed for low power it would draw about 100 times less.
The easiest and widely available is nrf52 family see https://circuitpython.org/downloads?mcu ... s=nrf52840
nice nano clones are ~ $3.50 on aliexpress , microbit 2 is 52833 and widely supported too
And even then with tenths of uA of idle current it would not make much sense to turn off advertising.
if you would not mind writing in C then there is also lot of cheap BLE hardware from China with pretty good SDK support - either devboards or cheap hardware, one example are those Telink or PHY62x2 thermometers ($2-$4 on aliexpress)
https://github.com/pvvx/THB2/
https://github.com/atc1441/ATC_MiThermometer
for power consumption see https://github.com/pvvx/THB2/?tab=readm ... n-features
I like the BTH01 (got pack of 2 for $3.50) - small plastic case with two AAA batteries that lasts ages - the board has some spare gpios and for customizations you just clone the source from github and recompile via make and update over serial
- when just pluggged in it draws 17.7mA
- when I connect to it over usb (e.g. via https://viper-ide.org/ ) it draws 18.7mA
- when just activating BLE it draws 31mA ("import bluetooth;bluetooth.BLE().active(1)")
- when activating micropython over BLE so that it advertises it draws 33.9mA
- when now disconnecting over USB and connecting over BLE it draws 32.9mA (saves the 1mA when usb was opened)
Now the only way I found to reduce power back to initial 18ma is to run
"import bluetooth;bluetooth.BLE().active(0);import network;network.WLAN().deinit()"
It can be seen that turning advertising off to save power makes no sense on this hardware. it was not designed for low power.
If you would use some other BLE hardware that is designed for low power it would draw about 100 times less.
The easiest and widely available is nrf52 family see https://circuitpython.org/downloads?mcu ... s=nrf52840
nice nano clones are ~ $3.50 on aliexpress , microbit 2 is 52833 and widely supported too
And even then with tenths of uA of idle current it would not make much sense to turn off advertising.
if you would not mind writing in C then there is also lot of cheap BLE hardware from China with pretty good SDK support - either devboards or cheap hardware, one example are those Telink or PHY62x2 thermometers ($2-$4 on aliexpress)
https://github.com/pvvx/THB2/
https://github.com/atc1441/ATC_MiThermometer
for power consumption see https://github.com/pvvx/THB2/?tab=readm ... n-features
I like the BTH01 (got pack of 2 for $3.50) - small plastic case with two AAA batteries that lasts ages - the board has some spare gpios and for customizations you just clone the source from github and recompile via make and update over serial
Statistics: Posted by fanoush — Sat Sep 21, 2024 8:00 am