-
Notifications
You must be signed in to change notification settings - Fork 50
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
High battery consumption #11
Comments
With the same frequency of sending data, Zigbee has many times more consumption (!) than BLE. PS: В итоге приходится производить обратные действия – перепрошивать самый дешевый термометр Tuya Zigbee TS0201 с али в BLE и включать BLE Long Range. Это экономит и на платформе HA. Не требуется ресурсоемкие приложения к HA и дорогие адаптеры для поддержки ZigBee |
Xiaomi LYWSD03MMC B1.4, fw: /~https://github.com/devbis/z03mmc/releases/download/1.0.2/z03mmc.bin First run: After binding with Xiaomi Gateway 3: Averge: 108.9 uA Typical impulse: Window: 14 ms, 4.654 mA Periodic strange pulses: Window: 26 ms, 4.897 mA The "Reset" contact does not reset the binding. |
@pvvx Thanks for measurements! Reset pin waits for 3 seconds to reset Zigbee internal state to avoid accidental resetting |
Analog - Tuya ZTU Module - the TLSR825x chip is used ZTU Module Datasheet TX and RX power consumption
|
Малая оптимизация по потреблению - среднее потребление 19 мкА для Xiaomi LYWSD03MMC B1.4, при опросе 10 сек. (30ms*4.28mA+(10000ms-30ms)*0.0062mA)/10000us=0.0190214mA Но в BLE Long Range выходит меньше, а передача длиннее и заголовки на 3-х каналах: В таком-же window 30 ms - Average 2.55 мА. Т.е. при одинаковых интервалах передачи, с опросом датчиков, шифрованная передача (BTHome v2), в два раза большей дальностью, отношение примерно в 4.28/2.55 = 1.68 раз. |
I started testing this fork. I have two sensors on the street, one was flashed with the version from pvvx, the second from devbis. The battery charge was the same for both sensors. I'm very curious what the difference will be. Now, since the release of 1.0.4, on all my 4 sensors (2 at home and 2 outdoors), on average, the battery charge has dropped by 5-6% (after about a week of use). |
Previous versions in fork were intended for variant tests, not for work... Will have to test for about 4 months. |
Я как раз вчера увидел, что вы обновили всё, и собрал последнюю версию. К тому же расчётные 4 месяца с зигби - очень даже хорошо, на вашей ble датчики прожили уже более полугода, но у меня не всегда стабильный приём из-за особенностей квартиры. Сейчас в прошивке от devbis всё-таки высоковато потребление |
Consumption measurements shows that current version could last for 9+ months from cr2032 battery |
В среднем Xiaomi LYWSD03MMC от дешевых батареек CR2032 работает от 10 месяцев. От дорогих - более года. @Alex500317 - Не утруждайтесь – уже сравнил. Сделал усреднение по множеству замеров, менял только прошивку. Прошивка от devbis потребляет в случае простого bind – 24.5 мкА, у варианта "с малой оптимизацией" – 21 мкА. В случае с binding c активацией ответов по температуре и влажности – devbis 70..78 мкА, у варианта "с малой оптимизацией" – 54..58 мкА. |
I am using a rechargeable battery. The new firmware has been installed only 3 days, new battery that started at 100%. It is now down to 86%. Loses about 5% a day. Sorry if this is irrelevant---I can't read many of these replies. |
@jds11111 Battery remaining percentage is not linear. It would be nice if you could report about how many days your rechargeable battery will last until 0% |
https://habr.com/ru/companies/lamptest/articles/555158/ Differences in CR2032 battery capacities - 11...100% @devbis - The range 0..100% is plotted according to the formula from the source code:
Most of the new CR2032 under load during measurement (current 3..5 mA) have a voltage of 3.0..3.2 V. @jds11111 - Given the incorrect calculations of the remaining capacity in the current code, the real remainder of your battery is about 10..20%. |
@pvvx Your calculations are wrong. 100% is at 3.0v while the working range is 2.2 - 3.0V |
Yes, I forgot that Zigbee is all weird and not suitable for people. The current battery percentage in Zigbee is 200%. :) Пример оптимизации по питанию окончен итогом: Итоговое среднее потребление LYWSD03MC B1.4 при измерении от источника 3.3V от 14 до 26 мкА в зависимости от динамики изменений температуры и влажности. |
Release 1.0.6 Rejoinig cycles:
Press key 3 sec and Join:
Pasue, In between (re)joinig (Only sensor polling and display): Не оптимизированный цикл опроса датчика и отображения и оптимизированный: |
Reducing battery consumption should be top priority. Is it possible to make it as efficient as AQARA WSDCGQ11LM, which has 2 years of battery life with the same CR2032 battery? |
@andrazek It probably could. But this sensor has a different philosophy. While other sensors can sleep longer and wake up to send data every 5 minutes, this sensor needs to update screen in reasonable period. For this device it is 10 seconds. You can build your own fork: disable screen module and significantly increase coordinator poll period and sensor read period to increase battery life. |
@vladimir1408v You may revert to bluetooth firmware using /~https://github.com/pvvx/ATC_MiThermometer/tree/master/zigbee_ota and local OTA index in zigbee2mqtt. |
Спасибо за ответ и за проделанную работу, я останусь на вашей версии, и понаблюдаю. Мне кажется это началось на 1.6 до этого была 1.5 и расход был меньше, по ощущениям возможно я не прав |
@vladimir1408v Sometimes, you need to rejoin the sensor after OTA to get lower consumption rate. I was told that sometimes after OTA it polls more frequently than during normal work. |
Extremely high consumption is observed if the network coordinator is disabled.
Минимальное среднее потребление после связывания и если данные не передаются (заданы большие пороги и максимальное время) у Releases 1.0.6 от 23 мкА. |
Thanks for that hint. I have 10 sensors which i am planning to convert to Zigbee using your firmware. Glad to hear that there is an easier way back to a bluetooth based firmware in case the power consumption is to high (6 months would be good). |
File name decryption?
TelinkMiFlasher.html v7.1 support downloading *.zigbee directly for all current BLE firmware (from version 4.6). Current measurements of average consumption over a long period for Xiaomi LYWSD03MMC B1.4 (default settigs): 1141-0203-10063001-z03mmc.zigbee - from 30 µA, on average 32 µA This will let you know how long your battery will last. |
Thanks for clarification. Still, why would consume more on Zigbee compared to bluetooth, if both having the same update frequency? I always thought zigbee is the most efficient tech for battery devices. Would extending the reading interval to every 30s instead of 10s noticeable improve the battery life? Having a lot of these devices and short battery life is pain in the ass. |
In BLE mode, with default settings, the screen refresh interval is 2.5 seconds. Data transmission via RF every 2.5 seconds on three channels. Sensor polling - 10 seconds. |
An update on power consumption in my hygrometer. I am using a rechargeable battery, which has its own power curve. Within a couple of days it dropped to about 83%. I did update the firmware about that time, but the drain rate could just be the battery. It has now been about four weeks and is draining much more slowly. Unfortunately, HA is storing data on the device for only a couple of weeks. Here is the last 10 days to give an idea. I assume that the fluctuations are the temperature swings in the house. I would estimate the current rate to be about 0.4%/day. |
CR2032 batteries from different manufacturers have a difference in capacity of more than 4 times. There is no point in analyzing consumption based on the behavior of a specific battery. Differences may vary from operating temperature and battery storage conditions prior to use. |
I would argue that a single data point is more useful than zero data points. |
Dual zigbee--ble device - Xiaomi LYWSD03MMC B1.4 - 18 µA |
Do I understand this correctly? You are running both radios for simultaneous ZigBee and BLE, with just 18uA?? That is wild. |
Yes, this is a big battery drain. Cycle = 5 sec = 5000 ms
But the big cycle is 10 seconds (5x2). And it has one short active processor period, in which only BLE is transmitted. And this is a couple of ms. The second phase accounts for more - BLE transmission, sensor polling, Zigbee. |
I would benchmark against 1 year endurance, a CR2032 gives 240mAh (220-240 mAh is common presumed). With these numbers the budget would be 27,4 µA of which 6 µA seems to be consumed for the continuous sleep mode. The latest configuration (poll+lcd+ble+zigbee) would just fit (97% of budget) |
Only a fresh CR2032 from the best manufacturers produces 240 mAh at a constant test load with a current of less than 0.5 mA. As a result, with a consumption of about 20 μA, the average life of Xiaomi LYWSD03MMC for users will be no more than 6 months. The main reason is the large pulse current for Zigbee at RF TX +3dB (23 mA !). Reducing the transmit power significantly affects the operating time of the CR2032. At +0dB the peak current does not reach 8 mA. https://www.ti.com/lit/wp/swra349/swra349.pdf Due to the massive use of ancient chips in Zigbee routers and coordinators, for most, provided RF TX +2 dBm in LYWSD03MMC (set by default), the operating range will be up to 10 meters without obstacles. In this case, the battery will last about 6 months when using ZigbeeTLc and less when using firmware from the current repository. |
The larger the capacitance of the capacitor, the greater its leakage current. Balance required. |
Just to comment that in my case the battery completely drained after I flashed the device with the zigbee firmware in less than one week. It was a new battery. |
After flashing custom firmware onto five LYWSD03MMC devices, I observed a complete battery drain within just two weeks. While my initial assumption pointed towards low-quality stock batteries, upon further reflection, it seems more likely that the issue lies with the Zigbee firmware. |
How about fitting in a CR2450? Some other from the shelf Zigbee thermometers seem to use one. From first sight it might be possible to just 3d print a new PCB cover so a CR2450 possibly fits in. |
I have switched to BLE 5.0 with coded PHY and have a feeling, that since that the battery life is shorter, only few months with CR2032. Do I need to change the default values to increase the battery life? Or is there anything I'm doing wrong? |
In LE LR (Coded PHY) the consumption increases by about 3..4 times. Not suitable for CR2032. My current history for the MJWSD05MMC (CR2450) battery is limited to March 2023 in HA: TS0201 (2xAAA) working in the refrigerator at -24C on LE LR: You can observe 2 defrosts. After warming up, the batteries recover a little :) Other devices operating in LE Long Range have a shorter history of operation and cannot participate in statistics. For comparison: |
CR2032 Batteries Test (best and worst battery on the market): Load current: start 3 mA, stop 2 mA |
UPD: major improvements were introduced in version 1.0.3
The text was updated successfully, but these errors were encountered: