pvvx / ATC_MiThermometer

Custom firmware for the Xiaomi Thermometers and Telink Flasher
https://github.com/pvvx/pvvx.github.io/tree/master/ATC_MiThermometer
Other
2.75k stars 196 forks source link

[Feature request] Show battery only if <20% #458

Open AleXSR700 opened 6 months ago

AleXSR700 commented 6 months ago

Hi, I could have sworn this used to be normal behavior, but would it be possible to add the option to show battery level on the screen if it drops below a certain value (e.g. 20 % or 25 %)?

The information is not needed as long as battery is full, but once it heads towards a certain level, BLE will stop working. Being able to see low battery warning would be great.

Thank you Alex

pvvx commented 6 months ago

measured_data.battery_level <= 5

AleXSR700 commented 6 months ago

measured_data.battery_level <= 5

Is this <= 5%? If so, I think the threshold is too small as bluetooth will stop working long before that.

pvvx commented 6 months ago

It works for me at 0% for about another month.

AleXSR700 commented 6 months ago

Including bluetooth?

I will "reboot" the device by removing the battery and see if the ble broadcasts again.

pvvx commented 6 months ago

image

AleXSR700 commented 6 months ago

? Your charts only go to ~20% battery level, not 0%. What were you trying to show me? :)

pvvx commented 6 months ago

At lower temperatures the battery percentage will be lower. And so on until zero. The thermometer will then turn off. Will wait for the warmth. The battery will heat up and the thermometer will turn on.

AleXSR700 commented 6 months ago

But the issue is not the temperature. I was/am talking room temperature.

At room temperature the ble will not work at 0% battery. It will probably stop working somewhere between 0-20 % battery level. So it would be a nice feature if the battery percentage would start showing once the battery level drops below x %. That way the user can see that ble stopped working due to low battery.

pvvx commented 6 months ago

I have many thermometers. And they all work at 0% battery for quite a long time.

image

image

pvvx commented 6 months ago

At room temperature the ble will no work at 0% battery.

Usually at 0% battery and +25C it still works for about a week.

Do you want the program to analyze temperature, battery quality, the presence of a capacitor in the power supply and other parameters?

AleXSR700 commented 6 months ago

I am not sure that is the case when the battery is discharged at room temperature. But I will monitor and report back.

pvvx commented 6 months ago

0% battery = 2.2V. The chip operates up to 1.8V. Software limited to 2.0 V.

Option with CR2016: image

pvvx commented 6 months ago

I am not sure that is the case when the battery is discharged at room temperature. But I will monitor and report back.

If a capacitor is not soldered into the thermometer, then some batteries will work up to 20% and immediately turn off. Loss of battery charge in the absence of a capacitor recommended by the manufacturers in the power supply is up to 40%.

When there is a pulse load during transmission, the battery voltage drops and the thermometer turns off.

AleXSR700 commented 5 months ago

Interesting. Any way of checking without breaking?

Mine, according to my data, dropped quite suddenly from 8% to 2%, stopped working and is showing:

20240113_102712.jpg

Is that number supposed to represent something, like e.g. mV?

pvvx commented 5 months ago

This is the voltage in mV. The recorded value is below 2.0 V, at which the thermometer goes into sleep mode for a few minutes.

edmundo096 commented 5 months ago

The info on the last comments are actually interesting features of the CFW.

Not sure if those "facts" are commented on the main README but they are quite nice:

Usually at 0% battery and +25C it still works for about a week.

0% battery = 2.2V. The chip operates up to 1.8V. Software limited to 2.0 V.

If a capacitor is not soldered into the thermometer, then some batteries will work up to 20% and immediately turn off. Loss of battery charge in the absence of a capacitor recommended by the manufacturers in the power supply is up to 40%. When there is a pulse load during transmission, the battery voltage drops and the thermometer turns off.

The recorded value is below 2.0 V, at which the thermometer goes into sleep mode for a few minutes. ...and LCD shows the mV.