Can failsafe be set per number of battery cells?

Hi

Is there any way that pixhawk/apm could accurately detect the number of cells that a battery has, particularly from the power module? I think at the moment the only way to do this is by using preset voltage ranges but these can overlap so for instance it would be impossible to tell between a fully charged 3s and a fully depleted 4s.

Is there any way of hacking the 3DR power module to support a balance plug, so we could accurately detect the number of cells from a battery? This way the apm firmware could be updated to automatically set battery failsafes based on the type of battery attached which it can’t currently do. If you switch between different cell batteries currently you have to just turn the failsafes off, or alter them by hand every change which isn’t easy to do in the field.

No, there is no way to determine the LiPo cells with the current configuration.

There is also no way to just “hack” the power module into doing it. To sense cell voltages, you would need 3, 4, 5, 6 (or whatever many cells you want to monitor) voltage sensors. All those voltage sensors need to be connected to the flight controller and supported by the firmware.

Bottom line: No easy way.

You could design a separate voltage sensor module for balance ports which talks to the Pixhawk e.g. via I²C. I’m sure, if you design such a module, somebody could be found to produce it and the developers would happily integrate it into the firmware.

Can you think of a simple way to just detect how many cells there are? For example something that you could plug the balance plug into and say output a voltage based on the number of cells, like 1.1v for 1s, 3.3v for 3s etc, then read that in somewhere (ADC 6.6v input?). Or some reliable way to add this onto the power module input voltage? This wouldn’t tell you how many volts per cell, but it would tell you how many cells which would be the most important thing to be able to automate battery failsafes.

And what if the user doesn’t use LiPos…? Recently, e.g. Li-Ion batteries became popular for endurance builds…
Having the flexibility to configure stuff detailedly is one of the major advantages of the APM software platform. Plus - some people might want to set the failsafe more conservatively, some more aggressively…
If you fly copter and use to fly very high, you might want to set failsafe rather conservatively plus a few extra mV to make sure that the copter has enough battery left to descent and land. If you fly only fun and sport below 10 or 20m, you might not need that…
And so on, and so on…