Current sensor is often used in multirotors to monitor real-time current draw and capacity consumption during flight in OSD or Telemetry. In this article we will discuss the benefits of current sensor and how to calibrate it to get more accurate readings.
Benefits of Current Sensor
Knowing your “amp draw” and how much “mah” has been used are very useful.
- LiPo battery consumption (aka “mah consumed”) tells you directly when your battery is depleted. In my opinion, it’s a much better battery indicator than voltage (VBAT) which sags with throttle
- A good indicator if your battery is getting old and should be retired – if voltage is reaching 3.5V from 4.2V, but your mah used is only 80% of the original capacity, then you know the pack is getting old
- You can easily compare the current draw of different motor and propeller combinations in real flights
Types of current sensor
- Built-in Current Sensor in PDB and flight controller
- External current sensor that connects between your battery and PDB
For mini quad builds, I don’t recommend external current sensor, which are heavy and large in size. They are probably more suitable for larger builds like a 450. FC ro PDB with integrated current sensor and OSD are becoming popular for tight builds like mini quads.
Virtual Current Sensor
Virtual current sensor is a feature in Cleanflight and Betaflight. It doesn’t require any of the current sensor hardware, but the current consumption is purely estimated by throttle level. It can be a handy tool to have in your quad if you wish to have current sensor capability but not have the hardware.
Wrong Current Readings? Calibrate it!
Current sensors are useful, however sometimes these current sensors are not calibrated in the factory. Even 2 identical current sensors could give you slightly different results, therefore it’s important that you know how to calibrate them
If the data of current sensor is not correct, then there is no point of having a current sensor at all. So you should calibrate it.
Current sensors use a simple equation to allow users to adjust/calibrate the output:
y = ax + b
a is the scale, and b is the offset.
Different FC might need different offset and scale values, and this is what makes current sensor calibration necessary. Luckily, in most cases, you don’t need to change the offset and you can just leave it at default which is zero. All that you need to change normally is the scale parameter.
How to Calibrate Current Sensor
There are 2 common ways to calibrate current sensors.
Trial and Error
This is my “go-to” way of current sensor calibration. It’s much safer, and doesn’t require any additional equipment. However it can take a little longer to get it done.
Basically, you just need to fly a battery, write down what “mAh consumed” is in your OSD. Then charge the battery and see how much capacity is put back. Using this formula you can calculate the new current sensor scale:
new_scale = old_scale x (OSD_mAh_consumed / mAh_charged)
You might need to repeat this process some more times to get an accurate result.
Note that the current scale in Betaflight works backwards, i.e. to make the current sensor read lower, you need to increase scale. For example, if the OSD is reading 10% too high, we need to INCREASE the scale by 10%, this will make the OSD to read 10% lower… I know, it’s confusing :)
Let me give you an example in Betaflight:
- You fly a battery with your quad, and at the end of the flight, Betaflight OSD shows 1100mAh drawn
- When you fully re-charge the battery the charger shows 1000mAh was put back into the battery
- Now you get to calculate the new scale value: New scale = Old scale x (1100/1000)
- If the old scale was 400, the new scale would be 400*1.1 = 440
- Now repeat until you are happy with it
Bench Test and Power Meter
This way can be quicker to work out the scale and offset values for your current sensor. You need to strap your quad on the bench, attach a power meter to the quad so you can measure the actual voltage and current draw while running the motors.
However this way can be dangerous, therefore do this at your own risk. You can make it safer by putting the opposite props on so they don’t spin up but down.
You will need a power meter (watt meter) to begin with: https://oscarliang.com/turnigy-7in1-mega-watt-meter/ or this http://bit.ly/2pcP4Eg
I found it more reliable to use the motor tab in Betaflight to spin up the motors. You can use your radio transmitter to arm your quad and throttle up, but when PID controller is active, motors speed tend to change constantly which can affect the accuracy of your current readings. Motor tab gives you a more stable reading.
Compare the data from the power meter to the data from the OSD.
First you are going to notice there is small current draw when the motors are idle, that’s normal because your FC, RX, ESC etc are drawing current. If the difference between power meter and OSD is within 0.1A, you can safely ignore it. If it’s larger than 0.1A, you can adjust the offset to make it as close to the power meter as possible. Normally, offset at 0 works for most current sensors I have come across with.
Now spin up the motors and you are going to notice a high current draw. Aim for a whole amp value on your power meter, such as 30A.
If you get a higher or lower value on the OSD, you should adjust the scale. Change it by a small amount at first to see how much it affect the result.
For example if you get 35A on your OSD, increase the scale by +50, and now you get 27A in the OSD, and you know if by raising scale, you could decrease the reading. And we can work out the proportion between the current and scale: (27-35)/50 = -0.16A, for every scale increment.
In this example, we are still 3A lower than the expected value, so we know we need to lower the scale in this example a little bit more by 3/-0.16 = -18.75.
And that’s it!