You have a current sensor that does not store value between usage. You use the same battery for several rounds of usage, this is especially often done with RX-battery. How do you keep track on capacity? Some current sensors can keep track on that but then there is a reset-issue, how do you reset the value? Following voltage is not that accurate either.
You could do without clearing values from screen after flight and write down the used value per flight. But isn’t that a bit 70’s? Let’s do it with Lua instead!
- User selectable capacity sensor
- User selectable voltage sensor for automatic reset
- User selectable reset switch
- Optional Lua control for example for alarms
- Stores used capacity between usage (Model can be powered off)
- Stores used capacity even when transmitter is turned off between usage
- Reset possible to current value or reset to zero
- Automatic reset avialable based on battery voltage
- Telemetry window for main screen
- Automatic detection of current-sensor with Ah or mAh values
Available for DC/DS-14/16/24, requires firmware 4.22 or higher. App does not run with older firmware.
In short: Copy the .lc (or .lua, the .lc is memory-optimized) file from github here to your transmitters Apps-folder, if there is a translation file copy the .jsn file to Apps/Lang-folder on your transmitter. Head on to “Applications” -> “User applications” and add the app. Guide on installation of Lua-apps available here if you need some more in-depth guide.
Setting up and usage of OneCapacity
After installation open the app and you are presented with easy setup with few options:
Sensor select is self-explanatory, so is reset switch (Usage is momentarily). Alarm value has a double function. If left to zero alarm-function is disabled. Alarm value is the total value of capacity used where you want the Lua control to activate. For example if we have a 5000mAh battery and want alarm when 20% is left then the value here should be 4000.
You also have a telemetry window to use for main screen:
Lua Control – Alarm
OneCapacity offers a Lua control to trigger voice output or any other function you can think of a switch-type control can do. great for example for voice output. You will find it in switch selection dialog under “Apps” named as CAP.:
Value is 0% (OFF) when no alarm is active and 100% (ON) when you have used capacity over your alarm threshold.
Use of OneCapacity
Usage is very easy. Let’s use a battery for a few flights and see what happens. After setup here is a picture of MUI current sensors telemetry screen and OneCapacity telemetry screen when no flights are done and battery is fully charged:
After first flight we have used 3mAh of capacity and then powered model off:
We know we have capacity left in battery, no alarm is triggered, let’s fly another round. Here is a screenshot after we landed on our second flight, we used again 3mAh as can be seen on MUI screen. The OneCapacity shows the total of two flights, that is 6mAh consumed:
Now we can do as many flights as we want, we can change model in transmitter, we can turn off transmitter and the OneCapacity will still show the total capacity used.
If you are using voltage sensor total capacity is reset when new battery voltage is 2% higher than in previous use. If no voltage sensor is selected in app then automatic reset is not in use.
There is two reset options depending on to what value you want to reset OneCapacity:
- Reset to zero
- Reset to current reading after flight
In order to reset OneCapacity to zero, power of your model and activate reset switch momentarily. Simple as that.
In order to reset OneCapacity to the current value of capacity sensor displayed keep model powered on and activate reset switch momentarily.
- 1.0 Original version
- 1.1 Added German translation by Norbert Kolb
- 1.2 Added automatic reset with voltage sensor
- 1.3 Added automatic detection of current-sensor with Ah or mAh values
Some rules do of course apply!
- Never use Lua to control a function that would take the model down if misbehaving!
- Always, always test the function thoroughly!
- If you do not know, then don’t!
- RC-Thoughts or myself is NOT responsible for anything this application does
- Applications are free to use (MIT-license) and linking to this page is encouraged!