T-Wristband icon indicating copy to clipboard operation
T-Wristband copied to clipboard

Sleep mode battery duration

Open TioRuben opened this issue 4 years ago • 53 comments

¿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.

TioRuben avatar Jan 23 '20 10:01 TioRuben

Same here, I have no idea how to improve it yet

And btw, could you explain why did you use those values in your battery code

#define BATTERY_MIN_V 2.9
#define BATTERY_MAX_V 4.0

I thought that those are from 3.27V to 4.2V, did I miss something?

PolyMeilex avatar Jan 25 '20 17:01 PolyMeilex

Same here, I have no idea how to improve it yet

And btw, could you explain why did you use those values in your battery code

#define BATTERY_MIN_V 2.9
#define BATTERY_MAX_V 4.0

I thought that those are from 3.27V to 4.2V, did I miss something?

@PolyMeilex You are right, the battery management in my code it's still in progress and the code is reused from another project with Li-Ion battery, I should change to the values you propose, as the T-Wristband battery is Li-Po. But also need to port the ADC calibration code from LilyGo.

About the battery life, I've improved a little bit by adding some delays after LCD switch off and adding a reset before SLPIN:

  tft.writecommand(ST7735_SWRESET);
  delay(100);
  tft.writecommand(ST7735_SLPIN);
  delay(150);
  tft.writecommand(ST7735_DISPOFF);

(Point 9.12 of ST7735 Datasheet)

And also disabling RTC timers, alarm and CLK:

  rtc.clearTimer();
  rtc.disableAlarm();
  rtc.disableCLK();
  rtc.disableTimer();

Now I get ~3 days of battery in sleep mode.

Will update my repo during the weekend.

TioRuben avatar Jan 25 '20 18:01 TioRuben

~3 days?? OMG! You are my saviour, thank you very much, I will test it on my device right away

PolyMeilex avatar Jan 25 '20 18:01 PolyMeilex

Another thing to take in account is that, according to the schematic, the backlight LED seems not to have a current limiting resistor. In the case of my unit, it heats up a little bit near the union between the right side of the TFT and touch button. Maybe the current limiting resistor is embedded in the own display, but anyway, I've configured PWM with about 72% duty cycle in TFT_BL pin without noticeable brightness change and a noticeable heat decrease.

Here is my TFT initialization code:

  tft.init();
  tft.setRotation(1);
  tft.setSwapBytes(true);
  tft.fillScreen(TFT_BLACK);
  ledcSetup(0, 5000, 8);
  ledcAttachPin(TFT_BL, 0);
  ledcWrite(0, 185);

The code can be improved to provide more duty cycle at day hours than in night hours.

TioRuben avatar Feb 09 '20 18:02 TioRuben

Also putting the motion sensor to sleep will help a lot.

Just ad this to TioRuben's list: IMU.setSleepEnabled(true);

primaldev avatar Mar 22 '20 08:03 primaldev

@primaldev this is a good improvement, because not all of us, maybe need wake up the wristband after some movements. Maybe it will be a setting from the user in the future for improve the battery life. I tested it on @TioRuben code and works fine.

hpsaturn avatar Apr 12 '20 21:04 hpsaturn

I have the newer imu, have added all the ideas in this thread, but still getting 8-9 hours on sleep..... not much point of a watch that lasts 8 hours ?

Anyone got any further with this?

Thanks

PhilColbert avatar May 15 '20 09:05 PhilColbert

It's a pain for me as well, as I have bought a lot of t-wristbands. :/ Hope there's a solution for this.

boogie avatar May 16 '20 05:05 boogie

Fortunately, I only got two to test, I hope theres a solution to this aswell as they look amazing.

The esp32 in deep sleep is supposed to pull between .15ma and 10µA so some other peripheral is still draining the battery.

The LSM9DS1 specs say 4.6ma during use and around 2.4 ma in low power mode. The pcf8563 is negligible. The me6217 is 100uA. So perhaps the screen is still drawing power aswell.

Perhaps the accelerometer isnt being put to sleep properly....

Ideas?

Edit********

I just measured current consumption with the changes in this thread , with the example program

Clock screen - 90ma accelerometer screen - 75ma sleep - 3.85ma

The battery supposedly is 80ma so at maximum this is 20.77 hours in sleep, but would probably get much less.

This needs to be fixed somehow, a watch that doesnt run overnight is a bit pointless!

I have even tried

imu.settings.gyro.lowPowerEnable = true; imu.settings.mag.lowPowerEnable = true;

PhilColbert avatar May 16 '20 17:05 PhilColbert

Just got a reply from lilygo saying the wristband should do 400UA in sleep... hopefully they will be able to help get the unit to do this, would give around 8 days running which would be acceptable :)

PhilColbert avatar May 18 '20 11:05 PhilColbert

No reply from lilygo, tried emailing them again.... not best service :(

PhilColbert avatar May 22 '20 19:05 PhilColbert

For a different hardware I have seen a tip, that you should set all the (SPI) ports of the display to LOW with digitalWrite, and that is the only way to reduce the power consumption. I have no tools now to check this theory for this band, but maybe you have.

boogie avatar May 28 '20 06:05 boogie

Is that before sleep you mean ? I ran deep sleep at the start of setup() and managed to get 1.5ma current draw, still far away from the 400UA specified by lilygo.

I had a reply from lilygo , linking me to the documentation for esp deep sleep, completely pointless information again..

I have emailed back again asking how they get 400UA, I am feeling the lack of response isnt good

PhilColbert avatar May 30 '20 10:05 PhilColbert

Actually that may not be to bad of an advice because the ESP pins will float in deep sleep but there is an option to tell the ESP to keep certain pins in a specific state even while sleeping, so this might help to keep the display REALLY disabled while deep sleep.

TheNitek avatar May 30 '20 10:05 TheNitek

https://github.com/espressif/arduino-esp32/issues/2712

TheNitek avatar May 30 '20 10:05 TheNitek

Hello, in our project we need to use BLE and WiFi We've disabled all the process as you explain, also the display, and we use BLE 1 time every 30 seconds and WiFi 1 time every 15 minutes (using delay). From 4.3V (max load) to 3.2V we've about 1 hour of usage. As the power reach 3.2V the device turn off. How can you have 3 days in sleep mode? During sleep mode what kind of functionality could you have?

nav-andrea avatar Jun 08 '20 18:06 nav-andrea

Unfortunately still no answer from lilygo after 3 emails about this problem :(

Renders the device useless for most cases I would think :(

PhilColbert avatar Jun 09 '20 14:06 PhilColbert

Indeed, it's a crap this way. I still hope it is fixable.

boogie avatar Jun 09 '20 14:06 boogie

DONT BUY LILYGO® TTGO T-Wristband DIY Programmable Smart Bracelet It is useless, and they are still selling it.

I wrote to their technical email address ([email protected]) - no response, and to their business ([email protected]) and sales ([email protected]) about these issues. The "Quality guarantee" link is not working on their website (http://www.lilygo.cn/). I'm trying to get my money back.

boogie avatar Jun 13 '20 09:06 boogie

I got an answer. It is for development, I can upgrade the battery. I think it won't solve any of these problems.

boogie avatar Jun 15 '20 06:06 boogie

@boogie but this is the reality, it is a development wristband, maybe can you work now in a possible software with this version, in mind in the future maybe LilyGO will launch a device with these issues fixed. For me its fine.

hpsaturn avatar Jun 17 '20 11:06 hpsaturn

Thats pretty shocking, no where on their advertising say its for development.

No use for me if it only lasts a few hours!

PhilColbert avatar Jun 17 '20 14:06 PhilColbert

@hpsaturn I'm happy if it's good for you. Not for me. I've checked their Aliexpress site again, and this device is not advertised as a development wristband at all.

Also think it's not supportive that they're not responding in this thread, and I'm looking forward to see if they can share a code that proves the 400uA consumption they told us in email.

boogie avatar Jun 18 '20 07:06 boogie

I have sent 6 emails so far with one response which was a link to the esp_deep_sleep code.... pointless.

Managed to get the sleep down to 1.5ma , if you just go into deep sleep on boot.... but still not good enough

PhilColbert avatar Jun 18 '20 09:06 PhilColbert

I just wanted to chime in here. I received mine a few days ago, and after figuring out how to upload code, I just turned off the factory tests. I put it in deep sleep overnight ~10 hours and it's still at 3.88 V according to the display (~70%?). Maybe there were library updates that fixed it? Though I just noticed the time is off by about 30 minutes... Not sure why. Looking forward to playing with it some more.

Bearic avatar Jun 24 '20 13:06 Bearic

Maybe @Bearic you could test this firmware too.

hpsaturn avatar Jun 25 '20 07:06 hpsaturn

The battery was still going after 48 hours (3.6V I think), mostly on deep sleep but with occasional turning on.

I have been using Arduino to upload sketches, once have time to figure out how to use platformio, I will give it a try and report back.

Bearic avatar Jun 27 '20 02:06 Bearic

@Bearic which hardware version you have? Maybe they have fixed the issue.

boogie avatar Jun 27 '20 11:06 boogie

The latest current consumption has been updated to a minimum of ~1mA. Compared to the MPU9250, it is much higher, and currently it cannot be lower. The current consumption in the product introduction is MPU9250, I have notified them to change. https://github.com/Xinyuan-LilyGO/LilyGo-T-Wristband/blob/7a265456f2521a0beee733de135a281c8bbaa67d/examples/T-Wristband-LSM9DS1/T-Wristband-LSM9DS1.ino#L907

lewisxhe avatar Jun 28 '20 03:06 lewisxhe

@lewisxhe @TioRuben so Which version of the band is better to take? I need theband able to work for 5 hours with IMU and send data via bluetooth once a minute

utya avatar Jul 06 '20 07:07 utya