-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sleep mode battery duration #2
Comments
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. |
~3 days?? OMG! You are my saviour, thank you very much, I will test it on my device right away |
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. |
Also putting the motion sensor to sleep will help a lot. Just ad this to TioRuben's list: |
@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. |
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 |
It's a pain for me as well, as I have bought a lot of t-wristbands. :/ Hope there's a solution for this. |
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. 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 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; |
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 :) |
No reply from lilygo, tried emailing them again.... not best service :( |
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. |
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 |
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. |
Hello, in our project we need to use BLE and WiFi |
Unfortunately still no answer from lilygo after 3 emails about this problem :( Renders the device useless for most cases I would think :( |
Indeed, it's a crap this way. I still hope it is fixable. |
DONT BUY LILYGO® TTGO T-Wristband DIY Programmable Smart Bracelet I wrote to their technical email address (zhang@lilygo.cc) - no response, and to their business (lily@lilygo.cc) and sales (sales@lilygo.cc) 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. |
I got an answer. It is for development, I can upgrade the battery. I think it won't solve any of these problems. |
@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. |
Thats pretty shocking, no where on their advertising say its for development. No use for me if it only lasts a few hours! |
@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. |
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 |
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. |
Maybe @Bearic you could test this firmware too. |
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 which hardware version you have? Maybe they have fixed the issue. |
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 |
Send once a minute, 5 hours? This is impossible unless the battery is replaced |
sadly |
Can we mount a bigger battery on this thing? |
I was just researching LilyGO-T-Wristband when I found this thread. What I was thinking is that the board should have a soft latch circuit (like https://www.instructables.com/id/Soft-Latch-Power-Switch-Ardweeny/ i have used in one of my projects) that completely cuts of the power via MOSFET and can be switched on either by signal from the tap sensor or via a programmable wake-up from the RTC, This way you can activate the device, do some stuff like show time on tap or periodically send data on RTC wake up and then send signal to power down. |
Would getting the model with LSM9DS1 instead of MPU9250 give lower sleep mode power usage? |
so which version of the board would have the lowest power consumption? |
For what it's worth, I've ordered a LSM9DS1 board, once it arrives I'll see how it performs, shipping will be a while however. I ordered it with a 105maH battery so if ~1mA is possible then it could be useful, we shall see... :) |
I have a number of LSM9DS1 bands, this newer (and poorer) design is total and utter rubbish, I'm wanting to use the IMU but only for temperature, once I've turned it on and then everything to turn it off again, I'm at around 4.2ma still with ESP in timer sleep......what! why they didnt power it from an I/O pin so I could chop it totally is beyond me. I'm fairly sure the MPU9250 is the better device Yes you could add a bigger battery but it probably wont fit inside the case, maybe that 105mah will just Tomorrow I'm hot airing the LSM off, see where that leaves me and then see if I can fixup anHTU21D somehow |
I have resorted to hot airing the LSM9DS1 off, ESP deep sleep with timer now at 0.518ma down from 1.67ma with the IMU in place, why they didnt hang it off an I/O pin is beyond me or give us a library that makes it sleep efficiently |
@wide-area-devices thanks for sharing your findings, if I had a hot air rework setup I'd try the same thing myself. |
Lol I believe we have been doing the exact same thing the past 2 days. I agree on this and what could be confusing is -HOW- you need to modify the library files since the issue is in the LSM9DS1 library defaults actually. So here a very 4 step tutorial on what you should actually do in order to gain the control of the LSM9DS1
and PASTE it in this same file right above the word "protected" (making the functions part of the public / exposed functions)
After this Re-compile your Arduino project and make sure to uncomment these two statements
|
You are a star, I'll try that today, does this mean it's possible to get close to halting the IMU or is it to get it down to ~1ma, which is still an obstacle for the little battery, all I'm after is temperature. Having taken off the RTC also I've picked up I2C from wires and using an HTU21D sensor instead. At present it wakes once a minute and sends via wifi then sleeps for a minute, on a not full battery I got 247 mins running, which makes me feel my once an hour and sleep for a few days might be reachable, if the IMU only goes down to 1ma it'll have a huge impact btw "air rework" makes my £23 YORKING 858D from amazon sound more amazing than it is :)))) |
I believe it is. It really was the IMU killing the battery but I do not have a scope attached to see the exact usage. I believe the imu.sleepGyro(true); will ENABLE the temperature as the imu.sleepGyro(false); would even DISABLE this. I also don't know if the code
disables the gyroscope or merely brings it into a low power state and whether issuing the imu.sleepGyro(true) after this would shut it down completely. |
@genotix Wow! Is it working without modifying the hardware? Respect for figuring this out. |
Well I surely do get a way better usage this way. |
Sadly I just broke my screen of the LiliGo. :( Opened a github page with my current developments; I'm merely using it as a Watch and built a Tesla Watchface for it: CTRL + Click to Check the project here |
Did some measurements: 00:10 => 89% So with this latest sketch it would function for about 40 hours I think. As soon as I get the new watch I'll continue tuning. |
Not sure why, maybe it's my multimeter but everything I try gets the circuit to be 1.77-2.09ma at best, this would mean a sleep time of 40ish hours at best By taking the RTC and IMU off and putting on a different I2C tempsensor (controlled by gpio pin) I'm down to more like 0.2ma I'm now looking towards the D4pico modules to see where I can get to with that and might if I'm unlucky have to prototype my own design that fits in the same case Lilygo should have thought more in the design stage for sure |
Well that seems to be spot-on compared to my latest tests. Being honest I am not sure what else we could do other than start desoldering components. I agree with you on the fact that LiliGo could have done more to make the device more Low energy. Even with these on-board sensors. Surely a v2 could fix that and I would surely buy that. |
Going a little deeper into the initialization of the LSMD9DS1 I noticed that there is a call to the function init() that initialize the device with the default settings of Sparkfun that obviously do not take into account the sleep mode. So I think that any settings made before are overwritten by this call I suggest to comment it out Personally I was able to go well over 24 hours of battery life (I'm using a 300mah) using appropriately deep sleep, cpuclock at 10mhz with jumps to 80mhz to make ble connections when necessary and accellerometer settings to low power |
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:
And this down to 0.43mA:
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):
|
Les hace falta ver mas box. 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:
|
@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. |
¿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.
The text was updated successfully, but these errors were encountered: