Page 1 of 2

Negative temperature

Posted: Fri Feb 19, 2021 11:16 am
by LY3FF
Hi,
I accidentally left my radio in car overnight and today noticed it doesn't display negative temperature.
Instead of -17 'C I got this:
Image
Radio: Baofeng DM-1801
Firmware: D2021.02.16.01

Vilius, LY3FF

Re: Negative temperature

Posted: Fri Feb 19, 2021 11:56 am
by F1RMB
Hi,
LY3FF wrote:
Fri Feb 19, 2021 11:16 am
Hi,
I accidentally left my radio in car overnight and today noticed it doesn't display negative temperature.
Instead of -17 'C I got this:
Image
Radio: Baofeng DM-1801
Firmware: D2021.02.16.01

Vilius, LY3FF
LOL. Okay, it seems we need to add some boundary checking when crazy values are returned by the ADC.


Cheers.
---
Daniel

Re: Negative temperature

Posted: Fri Feb 19, 2021 8:54 pm
by VK3KYY
Lol

Never gets below zero here...

Re: Negative temperature

Posted: Sat Feb 20, 2021 3:54 am
by VK3KYY
Looking at the code, the function I wrote is

uint32_t getTemperature(void)

Note. uint32_t is an Unsigned number :-(

So negative values would evaluate to large positive numbers

The value from the ADC has an positive offset of 9250 on the GD77, as an average calibration value.
Possibly values below 9250 are negative temperatures

I'll update the code to handle negative numbers, but apart from putting one of my radios in the freezer, its going to be had to test.

BTW. I thought Lithium Ion batteries should not be frozen, but perhaps I'm wrong.

Re: Negative temperature

Posted: Sat Feb 20, 2021 4:13 am
by VK3KYY
LY3FF wrote:
Fri Feb 19, 2021 11:16 am
Hi,
I accidentally left my radio in car overnight and today noticed it doesn't display negative temperature.
Instead of -17 'C I got this:
Image
Radio: Baofeng DM-1801
Firmware: D2021.02.16.01

Vilius, LY3FF
Please test this version

https://github.com/rogerclarkmelbourne/ ... 1_2111.zip

Note.
_JA versions are Japanese language only

Also. This is built from the latest code.

If the radio does not boot up.

Turn the radio off
Remove the battery.
Press and hold SK1 and SK2 to enter the bootloader and download and install the version from 16th Feb

Re: Negative temperature

Posted: Sat Feb 20, 2021 8:06 am
by YT5HOK
VK3KYY wrote:
Sat Feb 20, 2021 3:54 am
...
BTW. I thought Lithium Ion batteries should not be frozen, but perhaps I'm wrong.
I thought that too, but my new motorcycle has Li-Ion battery. It is small and light as 5 packs of cigarettes stacked side by side, but it has a punch to start 2 cylinder 1100ccm engine in minus temperatures. Just one quirk, you need to wait half a minute to 4-5 minutes depending on how low temp is, for the battery to "re-activate".
[/Off-topic] :D

Re: Negative temperature

Posted: Sat Feb 20, 2021 8:43 am
by VK3KYY
YT5HOK wrote:
Sat Feb 20, 2021 8:06 am
Just one quirk, you need to wait half a minute to 4-5 minutes depending on how low temp is, for the battery to "re-activate".
[/Off-topic] :D
Do you need to re-activate before using the battery to start the bike ?

Re: Negative temperature

Posted: Sat Feb 20, 2021 10:15 am
by VK3KYY

Re: Negative temperature

Posted: Sat Feb 20, 2021 10:17 am
by YT5HOK
VK3KYY wrote:
Sat Feb 20, 2021 8:43 am
Do you need to re-activate before using the battery to start the bike ?
Yes. If you wanna torture the battery, then you can just try starting immediately, it will fail, but next try it will be fully kicking and starting the bike like it was nothing.

Edit: by re-activation I mean turning bike on and leaving (LED) lights on for some time.

Re: Negative temperature

Posted: Sat Feb 20, 2021 10:44 am
by VK3KYY
YT5HOK wrote:
Sat Feb 20, 2021 10:17 am
VK3KYY wrote:
Sat Feb 20, 2021 8:43 am
Do you need to re-activate before using the battery to start the bike ?
Yes. If you wanna torture the battery, then you can just try starting immediately, it will fail, but next try it will be fully kicking and starting the bike like it was nothing.

Edit: by re-activation I mean turning bike on and leaving (LED) lights on for some time.

Interesting.

Probably some way to warm the battery, perhaps by taking a small amount of current to "Activate" it