`PreArm: Battery 1 unhealthy` dispite voltage and current values are working

hi! I’m running ArduPlane 4.3.2 on a Matek H765-WLITE, and am getting a strange prearm error. it says “battery 1 unhealthy” but i can get a readout of the battery voltage and current, and there all calibrated, so i have know idea what could be causing it.

heres all my BATT* config perams:

BATT_AMP_OFFSET,0
BATT_AMP_PERVLT,66.7
BATT_ARM_MAH,0
BATT_ARM_VOLT,0
BATT_CAPACITY,2200
BATT_CRT_MAH,0
BATT_CRT_VOLT,0
BATT_CURR_PIN,11
BATT_FS_CRT_ACT,0
BATT_FS_LOW_ACT,0
BATT_FS_VOLTSRC,0
BATT_LOW_MAH,0
BATT_LOW_TIMER,10
BATT_LOW_VOLT,10.83
BATT_MONITOR,4
BATT_OPTIONS,0
BATT_SERIAL_NUM,-1
BATT_VLT_OFFSET,0
BATT_VOLT_MULT,21
BATT_VOLT_PIN,6
BATT_WATT_MAX,0
BATT2_MONITOR,0
BATT3_MONITOR,0
BATT4_MONITOR,0
BATT5_MONITOR,0
BATT6_MONITOR,0
BATT7_MONITOR,0
BATT8_MONITOR,0
BATT9_MONITOR,0

like i said, battery voltage and current readouts are OK, but the battery level readout is blank.

any help appreciated

to clarify:

  • it hasn’t worked before. this is the first time I’m trying to arm
  • how do you strip gps data out of logs?

In mission planner press CTRL-F and look for Anon-log.

Then somebody here can try and help with the first round of issues. You’ll need to use a cloud service like dropbox or google to post the log file. Also, if you aren’t able to arm you’ll need to create a log after setting LOG_DISARMED,1.

here is the log, sorry for the random site i usualy use pastebin but this file was too big.

Post the .bin log file not a txt file.

i ran anon log on a .bin log but it just converted it to .log, whats the diff between .bin and .log? isnt the .bin just a more compressed version of the .log?

The file you posted came out as text file when I tried to download it. It wasn’t readable by mission planner, and don’t take this the wrong way but I’m not going to manually parse through a text file looking for data points.

1 Like

Okay, I did fight with it a bit more and I was able to get some data out, but not enough. I can see that it is reporting voltage, and I’m assuming by the numbers you’re using a 3S battery.

What I can’t see is the messages. The only error code I can see that’s coming up is related to the compass, and out of context that could just be a startup error and nothing of significance.

If you can find a way to post the .bin file that’s going to give us a fighting chance. Make sure the log includes a couple of arming attempts.

yea, i don’t expect you to manually go through 13k+ lines of log. I’m still trying to figure this software out : /

i have made a new log where i flip the arm switch on and off a few times. im also trying to use Proton Drive this time so let me know if you have any issues with that.

log file

this one is also in the .log file type, i dont know how to get Anon log to give me a .bin output

You can’t. The massages are plain enough but with a BATT_LOW_VOLT at 10.83 I don’t know why you are getting the health messages.

In your parameter file BATT_VOLT_PIN is set to 6. The Hwdef file for that board shows this:

define HAL_BATT_MONITOR_DEFAULT 4
define HAL_BATT_VOLT_PIN 10
define HAL_BATT_CURR_PIN 11
define HAL_BATT2_VOLT_PIN 18
define HAL_BATT2_CURR_PIN 7
define HAL_BATT_VOLT_SCALE 11.0
define HAL_BATT_CURR_SCALE 40.0
define HAL_BATT2_VOLT_SCALE 11.0

Did you set it to 6?

1 Like

i may have on accident, and mateks ys says it is supposed to be on 10.
i think using the built in GUI for battery cal in mission planer brakes stuff

ill try setting it to pin 10

it works!
thank you :3

1 Like

Glad to hear that worked. Also, that log file you sent worked.

1 Like

How do you find that?

I never remember the Github address so I always Google “arducopter hwdef” and its at the top of the list.

BTW-This same thing was reported for the Pixhawk 6C and in that case the Hwdef was wrong. But it lead me to the issue.

1 Like

Big list of the hwdef files

2 Likes

Thanks @xfacta @dkemxr