Negative temperature

LY3FF
Posts: 1
Joined: Fri Feb 19, 2021 10:58 am
Location: KO24PQ

Negative temperature

Post by LY3FF » 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

User avatar
F1RMB
Posts: 2518
Joined: Sat Nov 16, 2019 5:42 am
Location: Grenoble, France

Re: Negative temperature

Post by F1RMB » Fri Feb 19, 2021 11:56 am

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

VK3KYY
Posts: 7478
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: Negative temperature

Post by VK3KYY » Fri Feb 19, 2021 8:54 pm

Lol

Never gets below zero here...

VK3KYY
Posts: 7478
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: Negative temperature

Post by VK3KYY » Sat Feb 20, 2021 3:54 am

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.

VK3KYY
Posts: 7478
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: Negative temperature

Post by VK3KYY » Sat Feb 20, 2021 4:13 am

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

User avatar
YT5HOK
Posts: 213
Joined: Sat Nov 16, 2019 11:36 am
Location: Belgrade, KN04FR

Re: Negative temperature

Post by YT5HOK » Sat Feb 20, 2021 8:06 am

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

VK3KYY
Posts: 7478
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: Negative temperature

Post by VK3KYY » Sat Feb 20, 2021 8:43 am

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 ?

VK3KYY
Posts: 7478
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: Negative temperature

Post by VK3KYY » Sat Feb 20, 2021 10:15 am


User avatar
YT5HOK
Posts: 213
Joined: Sat Nov 16, 2019 11:36 am
Location: Belgrade, KN04FR

Re: Negative temperature

Post by YT5HOK » 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.

VK3KYY
Posts: 7478
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: Negative temperature

Post by VK3KYY » Sat Feb 20, 2021 10:44 am

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

Post Reply