-
Notifications
You must be signed in to change notification settings - Fork 126
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
Battery life lower than expected #1
Comments
While waiting for my mitosis parts to arrive, I took a look at the transmiter code and the datasheet of the chip. And I have some ideas how to optimize it:
when I will get my hands on the cpu and when I will have time to setup the toolchain, I will implement the changes myself if nobody will by that time (2-3 months from now). |
I looked at the SDK and could not figure out default channel table size (it is <16 because of enforced 5 mhz spacing when generated), it is generated from paired hosts id because it must match on both ends. As per documentation, channel table hopping is used for synchronizaiton, afterwards it runs on selected frequency for the synchronization lifetime which can be canged (nrf_gzll_set_sync_lifetime), don't know the defaults, which would be nice! |
Thanks for the comments!
Default channel table is in sdk/components/properitary_rf/gzll/nrf_gzll_constants.h line 115: {4, 25, 42, 63, 77}, which is just 2404, 2425, 2442, 2463, 2477MHz respectively. If you're feeling a little rebellious, the chip supports channels out of the licenced bands too, but of course I wouldn't default that. I really appreciate the attention and suggestions, thanks. |
In my case GP batteries went completely dead (0.6v) after about 1 month of sleep mode (jul 31 - sep 5). So yeah, something's going on there. |
Yeah, this has progressively got worse for me. It may be that I've had a bad batch of batteries, but I've had a few only last a month too. A battery from the same batch with a 10mA CC load lasted out to 120mAh, but pulsed loads are probably a different thing. I think that the chip draws much more power after a brown out, so internal resistance causing a dropout can can kill the entire cell. Obviously this is a bad thing. I'm going to try running for a bit with alkaline cells, see if it's a firmware or a battery issue. Because tracing and summing the current for a transmit show millions of keystrokes possible, with 4uA sleep current, shouldn't kill a battery in weeks. |
Have you considered adding a pair of through-holes and another regulator to allow for other battery options? For example, a JST connector/header for a thin lipo, or larger through-holes to fit something like this 18650 holder - that would double as a tenting mechanism |
@whostoleallthenames I used an Adafruit JST-PH breakout board and a pair of female headers to connect a 3.7v lithium polymer battery pack to the programming pins in a way that's easily removable. So far, this is working great, seems like no regulator is required. 😄 |
@datagrok Is that powering the board through the programming pins? Which pins are which? |
@whostoleallthenames yes it is! |
@kdayns could you look at https://github.com/joric/mitosis/tree/devel/mitosis-bluetooth it's very alpha but it works, maybe you could help with the battery life there as well. I don't think it's even remotely energy effective at the moment. |
I've noticed keyboards send gazell packets in bursts, like 6-7 the same packets for every pressed key. Shouldn't they send only one? |
I am running firmware with the following modifications:
I am writing this here because on my rigth side the battery just died in exatly 3 months. Joric, I will check this week how many retransmits per keypress I It is hard to know how many keypresses in total was processed by each side for effective comparison, I tried running hid_listed which logged some info, but I think It started to perform not very vell after some hours or days of operation and I dropped the idea. It would be interesting to wire the antennas directly together to exclude the radio interferrence in battery life, but then we need somebody to comment on how to properly do that. |
@kdayns I don't know why you have 40 tx attempts I currently just use |
@joric max tx attempts 0 means maximum! |
I tried increasing sync lifetime 2x and collected the stats on ~100k strokes. |
@kdayns, it's claimed that this fork has better battery life:
If someone could make a pull request out of it and get it merged that'd be cool. |
yeah, I don't see the fix too, just different debounce logic. Maybe it is relevant only to the repne's branch. |
@kdayns, not just debounce, it uses a single RTC timer at 125ms. Plus there's something going on with the receiver as well. |
I'am also running single rtc but at 1ms, debounce, send and go to sleep. |
I was the one who said he was on 7 months with the same batteries that @joric linked to above. The modifications seriously made a huge difference in battery life. It seems like he changed up debounce logic, single RTC, antenna at 4 dbm, changes for receiver timeout, (6 ms) and a few other things in the receiver code that I haven't had a chance to sift through yet However, some of it looks like its just cleanup by moving certain things that used to be in the main function into their own separate functions to be called upon. I'm looking at some of the commentary that Repne made in my Discord channel while he was actively working on the fork, and here are a few things he mentioned:
|
Thanks, @nhou7 I'll check it up. I'm also considering a possibility of adding bluetooth (nrf5x) support to QMK, instead of adding QMK to the bluetooth firmware (QMK is not really a library, rather a hardware platform), might be easier this way. |
I just had a CR2032 battery in one of my keyboard halves die on me, after 2.5 months of use. This is much lower life than I expected, as calculations showed 6-12 months of use.
Possible causes:
If there's none of the above, possible ways to reduce power consumption:
I know it'll take months before anyone has another data point, but does anyone have any ideas?
The text was updated successfully, but these errors were encountered: