Firmware v6.49 vs v5 Power Idle #2009
Replies: 33 comments
-
Posted at 2020-07-27 by parasquid I think @AkosLukacs had a small project http://forum.espruino.com/conversations/339259/ that streamed energy usage of a device, maybe you can try it for the bangle? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-27 by @gfwilliams Wow, thanks - so you actually put it in series with the battery? Or you're measuring the current through the USB charge cable? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-27 by d3nd3-o0 @gfwilliams yes i soldered it. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-27 by @gfwilliams Yes, absolutely - I'll look at this first thing tomorrow. Thanks for taking the effort to really look into this. To help me out tomorrow - please can you boot it completely fresh (eg BTN1 held down at startup) so it displays the Bangle.js logo and see if it's still drawing too much power? At least then I can know if I even need to bother installing apps. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-27 by d3nd3-o0 I did that and it still has the extra power usage utilised. But is there anyway i can confirm i have the .bootrst file for this test to be valid? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-27 by d3nd3-o0 v6 is fine. So the problem lays between v6+ and v6.49 |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-28 by @gfwilliams I've just spent the last hour measuring power usage trying some different things with a Bangle on 2v06, 2v06.49 and the latest firmwares, as well as different JS, and honestly I can't get it to give me any reading much different (~20%) from 1mA - at least not enough to warrant any noticeable change in battery usage. I'm reasonably confident in what I'm using to measure power usage as I've used it before on a bunch of stuff too. So I'm pretty sure that at least with the default apps, and with no apps at all, the power usage hasn't changed. Can you think of anything else that might be causing the change in power usage for you? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-28 by d3nd3-o0 If you can load the code i use, on your 6.49?? .boot0 .bootcde and .bootcde is pulling in: My code turns BT on (.wake()) if you hold BTN1 for 5 seconds, but you have to do it atleast 3 seconds after the screen comes on. I cannot test with BangleApp because i put my watch back together. So i've lost my ability to test power usage now :)
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-28 by d3nd3-o0 I notice that the analog pin reading code is changed between the 2 versions. Since i'm calling AnalogRead, could that be a prime suspect? I think i should trust my power readings too, since I had it in series with a multimeter. I'm really lost and confused as to what this all could mean... The user on this forum named @allObjects could be useful in this matter. @allObjects since you have a power measurement capability, could you please test the idle current draw between v6/v5 and v6.49? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-28 by @allObjects I'm right now out in the boonies, but will have equipment at hand for the next two (2) days and try some readings. Have to get rid of my extra setup do have just the minimum installed as described by @gfwilliams. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-29 by @gfwilliams
https://github.com/espruino/BangleApps/tree/master/apps/boot is the bootloader - however you shouldn't have a Ok, I just tried with your files - still 1mA in idle :( Don't know if this helps but I've got a big capacitor across the power on the Bangle.js side to help smooth out any peaks of power consumption and make the meter's life a bit easier. @allObjects it'd be great if you could give it a go too. Honestly, try it with what you have now. Anything that might add extra power draw would be great! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-29 by @gfwilliams Just an update on this: I noticed that a Flash memory speed optimisation that went in recently was keeping the CS pin low while in sleep. By putting that high and issuing a power down command to it, I've saved 0.3mA, so idle power consumption is down to 0.85mA now. However, I then restarted, and with entirely standard firmware that had been showing the lowest power consumption we'd ever had, and with standard apps, it started drawing 3mA So I'm not really sure how I can reproduce it, but you're totally right. Somehow it can get into a mode where it draws a bunch of power - but that may not have much to do with the JS or even the firmware itself. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-29 by d3nd3-o0 @gfwilliams Thanks for the work and feedback. Not much I can do but sit back at this point, I'm afraid. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-29 by d3nd3-o0 I know that the official Bangle Apps boot code is perfectly fine. But i went OCD on efficiency trying to strip down anything I don't need and disallowing apps to run .boot code eg. It didnt' save much, but do you think there is a pattern here. That by reducing the power consumption down to a threshold then it triggers this 3mA? SOunds like thats what you might be implying. COuld it be a 'time' problem?? I also didnt eval a clock file, i just used the bootcde as my clock code directly.. Hm I mean, like a latency thing of doing stuff slower rather than faster.. after calling .sleep mb ? To be completely honest, I did notice at one brief moment, the Amperage drop to 1mA on 6.49 at one random point after uploading code to it via RAM function on the IDE. Couldn't make out why my code didn't load, so i assumed it crashed or something. I tried to reproduce it with "reset()" but couldn't. I think you are most correct when you talk about it like a 'state' ... I think that once it gets into that state , not much corrects it. Except maybe a full restart via power in, which might be why my BTN1 reset restart tests didn't show reduced power consumption? One of the defining features of my setup is that i use 0.1 brightness(the lowest). This might be an important factor too, somehow. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-29 by @gfwilliams It's possible flash could have been a problem. Just toggling the CS line adds 0.3mA and if it was left in the middle of a read it could have added 3mA - it doesn't really explain how it stays that way after a reboot though (but maybe some arrangements of files in storage mean that flash reads ate left at addresses that cause increased power usage). I haven't been able to reproduce since fiddling with the CS line code. It might be worth upgrading to an absolute cutting edge build and trying, just in case I did fix it without realising. Also I just put the brightness down to 0.1 as well (that was a good thought) but no luck so far. The other thing is it could be a hardware issue - like maybe something (the accelerometer, magnetometer or IO expander?) gets misconfigured and then never resets properly. It's just frustrating not being able to reproduce it reliably. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-29 by d3nd3-o0 The issue is that you can't reproduce it when you want? Once we can reproduce it, then we can simply test some fixes all at once, and find the one that does the magic. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-30 by Tx I can only repeat my point from the other the thread: If I reduce interval calls the battery lasts longer. The more interval calls I have the more dramatically the battery duration drops. Just an observation for my case, but I like to remind to this. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-30 by @gfwilliams
Basically. I had it happening, but since I improved the flash memory code (which is something that definitely changed in 2v06) I haven't been able to reproduce it. Maybe it's fixed, but I just need more people to try the cutting edge firmware and see if battery life improves. In terms of floating point, erratas, etc - these are all things that would be an issue on other Espruino nRF52 devices (it could still be a problem, it's just more likely to have been found over the last few years), and there's also no good reason why they would have started to be an issue in 2v06 when 2v05 was ok. I've added the floating point fix, but at some point just throwing code at the problem when it might be fixed already is going to add more bugs, not fix them. @tx can you try installing a 'cutting edge' firmware and see if that fixes the problem? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-30 by Tx @gfwilliams yes, it's now running the latest version. I will report the next days and I will also re-enable the second interval. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-30 by Tx @gfwilliams from the first 30mins - it's looking good. And if I trust the battery level it even charges the watch without a power plug :-) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-31 by Geza I've tried the Cutting Edge build version and it seems really good! I hope the battery icon has not been hacked ;) Thanks everyone for the quick fix! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-31 by @fanoush
Espruino does not use HW floating point, javascript uses double type which is not what the FPU can do so this FPU fix was not there as it was not needed. If you still have older firmware you could check (and clear) FPU state and pending IRQ with https://gist.github.com/fanoush/1efde25636cd62a82a857cf8b6a5c86f , see end of it, just paste
and then call Anyway having the FPU fix there makes InlineC FPU hacks a bit easier. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-31 by Tx @gfwilliams it seems that with the latest cutting edge firmware my Bangle.js is back in business. Thank you! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-03 by @gfwilliams That's great news, thanks! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-04 by Johan_O Battery life is definitely improved. Have had 2v06.78 installed for a couple of days and the standby time is amazing. I've previously had nights where the watch was laying unused and lost 20% or more overnight, but now it was laying unused for more than 2 days and lost only a few percent. Awesome! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-04 by DrBard awsome I will update to it tonight and see if it helps :-) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-04 by jcmb First of all: I'm using a F18, not an official Bangle.js but I was experiencing similar issues concerning the power consumption. With the current cutting edge build (v6.78), I can also confirm that battery life has improved quite a lot over previous firmware updates. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-05 by @gfwilliams Great! And thanks for being up-front about the F18 @jcmb :) There are actually a few potential things to bump the standby time up further by the look of it - actually putting the flash memory into a 'standby' mode, and maybe trying to reduce how often we look at the accelerometer when the Bangle hasn't moved for a while (eg at night). I'll have to have more of a look at those when I get a moment. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-05 by DrBard There is no "upvote" here but that sounds awesome @gfwilliams |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-12 by d3nd3-o0 Just a heads up, indeed the changes you made have significantly improved idle consumption and thus duration sustained without needing charge. The factor is quite high, I'm still waiting for my watch to hit bottom and its been a while , like 5 days. I would have already had to charge this prior. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-07-27 by d3nd3-o0
So I've hooked the bangle.js in series with a multi meter. To my surprise the idle battery usage on the v5 is 3x as small than on the v6.49.
My meter can't read to a precision greater than 1 mA. So its reading 1 mA on v5 and 3 mA on v6.49, since its a factor of 3 increase, it seems it could be problematic for battery life.
Can anyone who has access to power monitor confirm or deconfirm my findings. And does anyone have any pointers/directions/clue to help me find out what could be the root of this?
Beta Was this translation helpful? Give feedback.
All reactions