Replies: 2 comments 7 replies
-
To verify the logic that averages the readings, computes state and percentages, I pulled out the code and ran it on my X86 linux.
|
Beta Was this translation helpful? Give feedback.
-
I'm starting to answer my own question. It seems like Heltec has made a change to the schematic. Not all V3s are the same. Schematics: The function of ADC control seems active low for V3 and V3.1. Now, have to figure out how to tell part what version the code is running on |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I probably should open this as an issue ....
I've been digging into the battery reporting on Heltec V3 boards.
Basically, RNode always reports a percentage of 0 where I know battery is charged.
I poked around a bit and figured I ask here, if people have some history on it, before I dig further.
I did some other troubleshooting and verified that values, if set properly, do get to the host.
I then I modified the following to use the existing message for sending direct reads of pin 1 (pin_vbat).
This code uses the two bytes in CMD_STAT_BAT to send direct read from analyRead. I also shifted it over by 2 to see if any of the other 12 bits have values.
I verified that pin_vbat is 1, as it should be based on the schematic.
Based on my calculation, if the battery is there and functional, it should result in a ADC read of around 800-900 due to the voltage divider on the V3 board.
Based on my modified code, I would have expected the firmware to report some value other than 0 for state and voltage based on how I modified the code.
I get 0 and 0 on the host side.
Anybody have historical info on this?
Any thoughts on why analogRead is returning 0?
P.S.
I'm using my newly modified LoRaMon to look at KISS messages.
Beta Was this translation helpful? Give feedback.
All reactions