Xinyuan-LilyGO / T-Wristband

DIY Programmable Bracelet
313 stars 98 forks source link

Sleep mode battery duration #2

Open TioRuben opened 4 years ago

TioRuben commented 4 years ago

¿How much battery time do you get in sleep mode? I've tried with this code and mine https://github.com/TioRuben/TTGO-T-Wristband-First-Steps and barely get 1 day of battery in sleep mode.

v44r commented 3 years ago

I'm getting 0.43mA of current consumption on the t-wristband (MPU9250) with >4V on the battery right now... That's good enough for a few days on the 40mA battery (I have a vibration module so I cannot put the larger batteries on it).

The key is putting the MPU9250 to sleep (both accel/gyro AND magnetometer). Otherwise you get ~3.75mA.

This gets it down to 0.7mA:

uint8_t b = _bus->readByte(MPU9250_ADDRESS, PWR_MGMT_1);
_bus->writeByte(MPU9250_ADDRESS, PWR_MGMT_1, b | (1 << 6));

And this down to 0.43mA:

_bus->writeByte(AK8963_ADDRESS, AK8963_CNTL, 0x00);

That's after normal usage (i.e., turn on wifi, accel/gyro/mag, tft, etc. and then turn them off and go to deep sleep leaving RTC alarm wakeup and button wakeup on):

esp_sleep_enable_ext0_wakeup((gpio_num_t) RTC_INT_PIN, LOW); // wake by RTC 
esp_sleep_enable_ext1_wakeup(GPIO_SEL_33, ESP_EXT1_WAKEUP_ANY_HIGH); // wake by touch
esp_deep_sleep_start();
ErickRBTK commented 3 years ago

Les hace falta ver mas box. se puede conseguir mas autonomia: 1 usando deepsleep cuando no se ocupa el ESP32 2 apaga la pantalla despues de 5 segundos 3 solo enciendes el wifi cuando lo usas 4 apaga el IMU si no lo usas 5 modificar el brillo pantalla segun la hora 6 bajar la velocidad del CPU

Tengo un MPU9250 con vibrador a 40mA. He conseguido unos 3 dias como reloj y boton wifi para mis proyectos. accel para cambiar horientacion, gyro off, mag off. en la foto ya lleva unas 12hrs desde que lo desconecte. trabajando en:

https://1drv.ms/u/s!ArJwl0aLcuHssArITlP9b0-pt5qz

hpsaturn commented 3 years ago

@ErickRBTK the thread is in English. But anyway, all here we already reached 3 days of duration, and I think that all here has implemented the same improvements.