How to connect APM Power Meter to Cleanflight and INAV

This topic was eluding me for some time now. It’s time fix the problem and finally present a short tutorial how to connect 90A APM Power Meter for flight controller boards like Naza32, SP Racing F3 or any other running Cleanflight / Betaflight / INAV software and equipped with Current Meter ADC input.

I will not show where to connect APM Power Meter to flight controller, since this differs from board to board. Some boards have dedicated pins, on some boards PWM input pins are used for Current Meter ADC. You have to refer FC documentation and / or flight controller software documentation.

Continue reading “How to connect APM Power Meter to Cleanflight and INAV” »

Read More

How to dispose / utilize LiPo batteries

LiPo batteries that run RC hobby are potentially dangerous devices. When not handled properly they can ignite or even explode. And they do not live forever. Even the best battery, no matter how taken care off, loses capacity, swells and has to be disposed. When we combine both facts we face a problem: how to dispose old LiPo batteries if they can catch fire? It’s extremely hard to find a place that accepts them for utilization. Throwing out with garbage is not a good idea. Disposing with popular alkaline batteries might sound as a good idea, but it is not either. So, how to utilize old LiPos? This is quite easy…

  1. Build a LiPo discharge device using 24V halogen light bulb. No high-tech here, just a way to connect light bulb to a battery. 12W halogen is generally a good option for both 3S and 4S LiPos
  2. Put a battery inside ceramic pot with some sand (not flammable if thing go very very wrong for any reason), connect “discharge device” and let it do its job. Light bulb limits discharge current, so LiPo should discharge nicely without extra swelling or overheating Magical LiPo tree Continue reading “How to dispose / utilize LiPo batteries” »

Read More

The best way to mount LiPo on a drone: 3M Dual Lock

LiPo battery, as the heaviest single element of any racer quadcopter, is mostly the first one to fell off during crash. Or displace in high-g maneuvers. Or simple fell off in flight. Like on this picture below I’ve found on Reddit. Grrrr… for sure this is something I would like not to see personally again. And I’ve seen it on my first build based on X525 frame.

battery fell off

So, solid and strong battery mount is a must. Battery strap for sure. Even few in case of heavier ones. But battery strap is not enough. LiPo can always slip out. To prohibit that, I’ve been using velcro strips and it worked fine. But velcro has a few drawbacks: it is not very strong connection, allows some movement, and looses strength after some time. Few weeks ago I’ve discovered something that is way way better than regular velcro: 3M SJ3550 Dual Lock Reclosable Fastener. Continue reading “The best way to mount LiPo on a drone: 3M Dual Lock” »

Read More

Three flying weekends with Turnigy Graphene batteries

It is still too early to decide if new Turnigy Graphene are worth the money, but after 3 flying weekends with them I do have some thoughts about them already.

Turnigy Graphene LiPo Battery

  1. They discharge differently than Turnigy Nano-Tech I'm using in parallel. Discharge curve seems to be flatter
  2. Voltage drop on high load is much smaller comparing to Nano-Tech. Also, they do not regain voltage when disconnected. I usually try to fly until voltage goes below 3.5V per cell. More less 4:30 up to 5 minutes of flight with my regular style. Before charge Nano-tech's voltage usually goes up to 3.7V. With Graphene, it's different story. Before charge voltage per cell is around 3.65V. Maybe it's only half volt, but does tell something about discharge curve and general battery performance
  3. Althought they behave different than Nano-techs, they both accept more less the same charge during load
  4. My Graphenes are new, while Nano-techs not, but Graphenes seems to balance faster. Looks like cells are a better match. I still would have to confirm this
  5. They are indeed quite heavy, but I did not noticed lower flight times or worse performance

Read More

Battery C rate: do I need a lot of it?

One of the values that describe LiPo batteries used in RC crafts is so called C rating. For example: 3S 1300mAh 45-90C. Or 3S 5000mAh 25-30C. Or 4S 1300mAh 65-95C. S is simple, it tells the voltage. mAh or Ah tell capacity.

But what about C rate? According to Wikipedia is can be described as:

The C-rate is a measure of the rate at which a battery is being discharged. It is defined as the discharge current divided by the theoretical current draw under which the battery would deliver its nominal rated capacity in one hour. A 1C discharge rate would deliver the battery’s rated capacity in 1 hour. A 2C discharge rate means it will discharge twice as fast (30 minutes). A 1C discharge rate on a 1.6 Ah battery means a discharge current of 1.6 A. A 2C rate would mean a discharge current of 3.2 A.

So, if we take a look at Turnigy Nano-tech 3S 1300mAh 45-90C we will know that:

  • Constant discharge current on 45C is 58.5A
  • Burst discharge current (10 seconds) on 90C is 117A

Neat, yeah? Almost 60A constant current! That gives 15A per motor. And that a lot on 250 or smaller quad. So, I should be fine! Continue reading “Battery C rate: do I need a lot of it?” »

Read More

Hands-on: Turnigy Graphene LiPo batteries

LiPo battery life is hard. Charged, discharged, beaten in a crash, charged, discharged and so on. Because last week I had to utilize few of my old Turnigy Nano-tech LiPos, I’ve decided to try something “better” this time. Turnigy Graphene 1300mAh 3S 65C. Package came today and this is what I got:

Turnigy Graphene LiPo in box

Turnigy Graphene LiPo there is even a bag inside

Turnigy Graphene LiPo Battery

Turnigy Graphene LiPo

  • Box is huge. Really, it would fit 3 LiPos, not just one. Kind of waste. But box is nice enough to reuse for something else
  • Black is the color of choice here. Black and red. I like this combination
  • They are noticeably heavier than 1300mAh 3S Nano-tech LiPos. But they have 20C more, so that was predictable

More after the weekend when I should be able to give them a first try.

Read More

Magical LiPo tree

Magical LiPo tree

Since LiPo batteries are potentially dangerous, they can not be just put into garbage. They have to be properly handled, utilized, before they can be safely thrown out. I will write more on this topic later. Here is only a picture of my magical LiPo tree. Knife, electrical connector, 12V halogen lightbulb, some sand, a flowerpot and LiPo discharger ready.

Read More

How to measure battery capacity with Arduino

Battery capacity measurement can be useful in many situations. And it is not hard, only requires enough time to discharge battery completely with know resistance and a way to measure voltage in the circuit. Ohm’s law will to the rest: I = U / R

Let’s say, we want to measure standard AA 1.5V alkaline battery capacity. Why 1.5V? They are common, made by many manufacturers and sold for different prices. And not always more expensive is better. To do this, we will need:

  • AA 1.5V battery
  • resistor to discharge it. We need high current to discharge battery in reasonable time, so low resistance is suggested. On the other hand, high current means o lot of heat, so we need a resistor that can survive this. I suggest using 2.2Ohm 5W ceramic resistors.
  • Arduino to measure voltage in circuit. Any Arduino or plain ATmega or ATtiny with A/D converter will do.

So, first a simple electrical circuit:

how to measure battery capacity with arduino

And some code that will be run every second:

voltage = 5.0 * ((float) analogRead(V_METER)) / 1024.0;

float current = voltage / R_LOAD;
joules += voltage * current;
float wattHours = (joules / 3600.0) * 1000.0;

And here how it work:

  1. We need to measure voltage in circuit. This is why, in first step, we read 10bit A/D converter and scale output to 5V. Why 5V? Arduino Uno works on 5V, and it is the reference voltage here,
  2. Next, lets compute current using Ohm’s law I = U/R,
  3. With know current current we can compute work using P = U * I and store it in joules variable,
  4. Last step is to change joules to Watt hours.

If instead of Watt hours we want Ampere hours, there is no need to count joules. Instead of that, sum current and final value divide by 3600 (there are 3600 seconds in one hour). Like this:

voltage = 5.0 * ((float) analogRead(V_METER)) / 1024.0;

float current = voltage / R_LOAD;
ampereSeconds += current;
float ampereHours = ampereSeconds / 3600.0;

Full code is available here


  • this circuit allows to measure batteries with voltage up to 5V. Anything above it will damage A/D converter
  • to measure higher voltages, voltage divider will be required
  • with higher voltage, power loss on resistor will increase. It will get very hot and might burn

Read More

LiPo on fire

It is true what internet writes: LiPo batteries can be dangerous. This is how ended one of my buddy’s batteries during indoor FPV session. Small crash, 2 seconds later cloud of white smoke and flames.

Reason was pretty simple. During crash battery got loose and still spinning propeller has cut 2 cells. Good thing, besides dead LiPo, no damage. We were lucky enough to get that thing outside before it damaged quadcopter or got anything else on fire.

LiPo battery on fire

Read More