Battery Voltage (BAV)

Status
Not open for further replies.

Jimco

Member
Joined
Nov 30, 2005
Messages
308
Reaction score
22
Location
Dallas/Fort Worth
If I send the BAV command to my scanner, the return I get doesn't seem to correlate with what I believe it should be. Even with fully charged batteries, the result is 134 or something like that. Seems to me that it should be close to 255 in that condition.

Does anyone have any experience monkeying with this command and calculating an accurate battery level using the result?

Jim
 

gr8amp

Member
Joined
Jan 12, 2003
Messages
129
Reaction score
0
Location
Boston, MA
bwhite said:
Looks like a candidate for any kind of firmware update (which we'll probably never see)


I dont see it as needing a firmware update at all. This doesn't create any problems with how the radio operates in any way, and is probably how uniden intended the data to be returned. I believe this was a documentation error, and a documentation update would be more appropriate.

If anything, a firmware update would only complicate matters for software that has already been written and released. Spending 10 minutes measuring voltages, and adding a scaling factor in your software is extremely simple. Why complicate matters?

As for the differences between the data collected by jastx and myself, I would tend to blame uncalibrated meters. The meter I used had not been calibrated for many years, and I provided the data as a ballpark reference only. There will be small variations between radios as well.
 

Al42

Member
Joined
Apr 29, 2005
Messages
3,457
Reaction score
0
Location
Long Island, NY, USA
The firmware seems to be reporting the raw output count of the A/D converter, rather than converting it to a voltage value. But firmware often does that and, as jastx said, it's no big deal for the software to multiply the return of the command by .021 before putting it on the screen - it's just

Code:
<screen location> = <variable with the value> * .021
rather than

Code:
<screen location> = <variable with the value>
Not something you waste much time thinking about whren you're writing a program.
 

jastx

Member
Joined
Feb 8, 2004
Messages
128
Reaction score
1
Location
Houston, Texas
bwhite said:
John,
Just curious, what does "Personally, I find reporting of counts quaint" mean?
In the rest of your post I think you are saying that it would be nice if a meaningful value of
voltage was displayed. Thanx
"Counts" are the "raw" values reported by instruments of various types. Counts must be converted to something meaningful by the computer before using the instrument reading for anything. This is the way things worked for decades until processing power got less costly and instruments got "smarter". In fact, most new instruments now report meaningful values instead of counts.

The new scanners Uniden makes are pretty "smart" yet they continue to report counts in this case. I remember many old systems and find this new use of counts to be charming, but a direct report of battery voltage would be an improvement.
 

jastx

Member
Joined
Feb 8, 2004
Messages
128
Reaction score
1
Location
Houston, Texas
An alternative would be to display a relative battery charge, much like Windows does for laptop computers running on batteries. That calculation might look something like:

charge = counts / 1.28
if (charge > 100) charge = 100

I picked 1.28 using 128 as the nearest power of 2 (likely to be used by the A/D converter) divided by 100 to yield a percentage when used as a divisor.
 
Last edited:
Status
Not open for further replies.
Top