Hello guest, if you read this it means you are not registered. Click here to register in a few simple steps, you will enjoy all features of our Forum.
This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BF Auto PID Profile by Battery Voltage(no work)
#1
BF Auto PID Profile by Battery Voltage is not automatically changing.
I have this exact setup working on many other quads (using 6S on 4S quads)
I narrowed down so far in the battery tab BF recognizes the correct voltage of 4S and 6S
but when it sees the charged 6S battery it reports the voltage correctly but software sees it as a 4S
So my PID profile never changes..[Image: CIH9aDsl.jpg]
Reply
Login to remove this ad | Register Here
#2
Interestingly it seems that the number of cells is being correctly reported as "6S" next to the green battery symbol in the header bar but only 4 cells in the Power State information box.

Save a "diff all" of your current settings and then re-flash the Betaflight 4.3.1 firmware to the FC with the "Full chip erase" option switched on. Apply the custom defaults when prompted but don't change anything else. Then check to see if the number of cells is being recognised correctly in both the header bar and the Power State info box. If they are then re-apply your "diff all" in the CLI and check again to see if the cell count is still being shown correctly.
Reply
#3
Reflashed BF4.3.1 full chip erase, applyed defaults
the voltages 4S and 6S were reported correctly in both the header bar and the Power State info box (after I changed the "voltage meter source" under battery tab from None to Onboard ADC).
Before I applied my DIFF ALL
I setup my profile 0 for 4S and profile 1 for 6s

profile 0 (4S)
motor_output_limit = 100
auto_profile_cell_count 4
profile 1
motor_output_limit = 66
auto_profile_cell_count 6

While in the PID tuning tab I selected Profile 2 (profile 1 in CLI setup for 6S)
I plugged in a 4S battery and indeed it did correctly change to profile 2 (in the PID Tuning tab)
Selected profile 1 and plugged in a 6S and the BF auto selected profile 2, it works!

But when I loaded my original DIFF ALL the problem came back, someting in the DIFF ALL is causing this issue.
I have not been able to figure out what the issue is.
attaching both DIFF ALL's (fresh after reflash only modifying ADC voltage sensor and setting up profiles for 4S and 6S.
See 2 attachments.


Attached Files
.txt   BTFL_cli_Cirro_XF_20220915_4.3.1DIFFALL.txt (Size: 6.22 KB / Downloads: 34)
.txt   BTFL_cli_20220915_DIFFALLafterfreshloadandbattprofilesetup.txt (Size: 1.03 KB / Downloads: 37)
Reply
#4
Additionally before I posted originally I calibrated the battery voltage.
While battery was plugged into quad I read the voltage off the ballance lead, it was off by .01 but I adjusted and calibrated.
Reply
#5
additionally
vbat_max_cell_voltage = 440
I changed this value to 430 (max battery voltage 4.3)
Still have the issue.
Reply
#6
I found the problem.
The following parameter is the root cause.
"set force_battery_cell_count = 4"
I have NO idea how this got set.
I changed it to
"set force_battery_cell_count = 0"
All is well.
I so appreciate your help!!!!
Reply
#7
Well I just learnt something new as well because I never even knew there was a force_battery_cell_count setting to override the calculated cell count (or at least I never took notice of that setting before). I guess most people don't know about that setting and they just leave it at the default value of ZERO.

Betaflight can only see the total LiPo voltage, so it calculates the cell count from the total battery voltage and the configured maximum cell voltage by using the following algorithm:
  • (Total Battery Voltage / Maximum Cell Voltage) + 1
What this does mean is that with your Maximum Cell Voltage set at 4.4, if you plug in a 6S LiPo that is less the 22V it will be identified as a 5S battery instead of 6S. Likewise, if you plug in a 4S LiPo that is less than 13.2V it will be identified as a 3S battery instead of 4S. So keep that in mind.

Looking back through GitHub it appears that the force_battery_cell_count setting was implemented to overcome the cell count being miscalculated where you always use LiPos with the same cell count, but you sometimes connect a non fully charged LiPo to the quad.

What this means is that when using the automatic PID Profile selection feature based on LiPo cell count it's important that you always connect fully charged LiPos to the quad if you intend to fly it.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Quick Question: How do you know which PID Profile is active? Ekliptiko 5 1,704 11-Mar-2024, 03:54 AM
Last Post: Christo
  Betaflight first flight PID and filters setup access777 1 185 10-Feb-2024, 08:54 AM
Last Post: matt0725
  Betaflight PID and filter tuning notes aerokam 22 3,365 04-Oct-2023, 12:48 PM
Last Post: aerokam
  Mobula7 Betaflight PID caution warning Kramesor 1 898 27-Dec-2022, 05:36 AM
Last Post: sevro
  pid for protek 35 rezafpv 11 2,593 27-Sep-2022, 05:57 PM
Last Post: SnowLeopardFPV


Login to remove this ad | Register Here