Hermione in wonderland.

Took her outside this morning, and the safety test without LiPo consistently threw I²C errors as yesterday.  I brought her straight indoors, still powered up, both her and my piPad and ran the same test; she worked perfectly. Curiouser and curiouser.

P.S. Shortly after writing the above, I had a eureka moment in the shower: I remembered reading LiPos don’t work well in the cold, and even the Mavic instructions suggest letting it run for a while before take off to let the battery chemistry warm out.  Next test then is to wrap both LiPos (batter bank and the main power) in bubble wrap, boot her up indoors, and then take her outside to fly.  I’ll report back here anon.

P.P.S. It worked!!!!! I wrapped both LiPos in some neoprene foam (normally used for scuba suits), set everything up and running the code and therefore the GLL and PWM to keep the LiPos warm indoors. After a couple of minutes, I lugged everything outside, and she did two flights without a glitch. Roll on spring / summer!

Boding not well enough…


With the new PCB, she works perfectly with no I²C errors.  So I took her outside, and she hit I²C errors immediately and consistently.  Back indoors immediately, and once more, no I²C errors.  There are only two differences:

  • 20°C indoors compared to 5°C outdoors
  • LiPo not plugged in indoors, but was outdoors.

I’m assuming the latter is the problem, probably caused by ESC drawing too much power.  If so, my even newer PCB layout should resolve this.  I’d better get on and order it pronto.


Hermione’s and Zoe’s powerware

All of Hermione and Zoes’ powerware – battery, ESCs, motors and props come from a single supplier: Paul Maddock who runs electricwingman.com based in Chester, UK where I used to live until 2010.  Over the years, he’s provided a great service, including a couple of specials for me, and so is definitely worth a mention.

Here’s the list of Hermione’s parts I have from him:

This is probably the best set of powerware possible, to match Hermione’s best frame possible.

I also got Zoe’s powerware and frame from there too, though annoyingly, her motors are no longer available:

Once more, THBAPSA.

Disposing of dead LiPos

My collection of tired, retired LiPos has grown to an annoying size so I’ve been digging around how best to dispose of them.  The best information I’ve found is here but it’s a very mixed message; primarily the problem is that there are no rules specific to LiPos, and that rules applying to normal batteries do not apply to LiPos.

Normal batteries MUST NOT be placed in the household waste due to heavy metals (Cadmium (48), Lead (82)) and nasty chemicals they contain which pollutes the environment.

LiPos contain primarily aluminium (13), copper (29) and a small amount of lithium (3), all of which are much higher in the periodic table and as such are more common and chemically safer, and none of which are pollutants.  So the critical factor is actually that a charged LiPo is effectively a bomb if shorted, so absolute discharge is required.  There’s lots of talk about discharging them through the charger and then dropping them into a concentrated salt / saline bath for a few days.  This seems crazy to me, and some suggest it causes corrosive gas (chlorine) to be emitted.  Here’s what I use instead:

LiPo discharger

LiPo discharger

  1. First I discharge the LiPo using the charger – mine discharges at 0.5A; however this only seems to take it down to the minimum cell amount (10V for 3S, 13V for 4S etc).
  2. Then I use my pictured discharger – just  a 33R 75W resistor with both Deans and XT60 plugs.  The resistor discharges a 4S at about 0.5A; it warms to a cosy hand-warmer temperature.  Within an hour, the LiPo drops to a negligible value – a volt or two
  3. At that point, I take them to the local battery recycling centre knowing they are safe to be abused.



LiPo temperature ratings

I did a flight outdoors this morning; as expected the flight was rubbish but I got the diagnostics I wanted: the IMU dropped by 0.1 degrees during the short flight – a negligible amount which rules out IMU temperature drift as the cause for Phoebe’s motion drift.

After a bit more LiPo digging I found out:

  • they work best in a range of 20 – 60°C
  • a modern LiPo has such a low internal resistance that it doesn’t heat up even under heavy load
  • as a result, the battery needs to be charged at >20°C, and warmed up to the working temperature band prior to cold flights.
  • microwaved dry rice seems to be a common way to give the batteries a pre-flight warm up.

So I need to put together a system to warm up the battery prior to flight, and insulation to maintain the heat during the flight.

The cunning plan is hatching.  More anon.

LiPo batteries’ performance in low temperatures

I took both Phoebe and Chloe outside to fly yesterday, and things were worse than ever; both struggled to get off the ground.  To be honest it was so bizarre it was almost comical. It couldn’t possibly be sensor drift so perhaps it’s the battery?

A very little bit of research (i.e. googling) soon showed LiPo batteries are intended to work above 20°C and their internal resistance rises significantly as the temperature drops below that point.  That would explain why the 3S (11.1v) LiPos run so well during the summer, but seem powerless now in the colder side of Autumn.

So I wrapped Phoebe’s battery up in bubble wrap and took her outside again this morning; normal behaviour has resumed; it seems that even LiPo batteries needs a snuggly down duvet in winter to keep them warm.

I’ve got a self-adhesive neoprene rubber sheet on order from ebay to wrap around my batteries now; these’ll be my winter batteries, and I’ll leave a couple unwrapped for summer use.  I’ve also bought an IR temperature gun so I can be more scientific and less speculative about the temperature the battery is running at.


Scotty, we need more power!

I took Phoebe and Chloe out this morning with fully charged batteries, and both behaved beautifully for the first couple of flights, and then quality deteriorated rapidly – this isn’t news to me, I was specifically testing this as part of confirming safe flight behaviour for the Cotswold Jam.

Both were running with the same Gens Ace Tattu 3S 45C 2300mAh LiPo’s and although they have slightly different motors (T-motor’s MN3110 for Phoebe and MN3508 for Chloe), both motors are rated at 700kV – a nearly meaningless value which is the RPM per volt; previously Phoebe had been running with 900kV motors i.e. they spin faster with a given battery pack*.

So I think I need to upgrade both Phoebe’s and Chloe’s batteries to 4S (4 LiPo cells in series putting out a nominal 14.4V rather than the 11.1V of the 3S batteries in use).  Though for the Jam, I’ll probably just take the 2 3S batteries I have both fully charged.  Finances at the moment won’t stretch to £50 to replace them with higher voltage models.

P.S.  I’ve just done some more testing, still with 3S LiPo batteries, but with a 5500mAh capacity on the basis that the higher the charge, the slower the reduction in output voltage, and hence more flights that are ‘safe’.  Results back up my theory – I got a few more flights than with the 3200mAh batteries, with each flight showing the same symptoms of  degraded performance compared to the previous.

*This sounds like complete twaddle to me; the spin speed is totally controlled by the switching of power between the 3 poles of the brushless motor and has nothing to do with the battery voltage.  Surely this kV value is a rating of how much power is produced for a given voltage – said power either dissipated as heat or in rotating the props?

The wibbly-wobblies and drift

So the wibbly-wobbly flights from yesterday were due to ever decreasing battery power.  The more flights I did, the more the wobbles and drift were evident.  It’s not surprising really.  Assuming the motors are a fixed impedance (they aren’t but it’s good enough for the point I’m making) then, the power provided to the motors depends on the voltage supplied by the batteries; P = V²/R.

A fully charged 3S LiPo measures about 12.43V

The same battery at 27% charge (yesterday’s wobble level) measures about 11.43V

That means running @85% of full power.

Loss of power is handled by the PIDs to some extent – as the battery voltage drops, the effect of reduced power is compensated for by the (I)ntegral parts of the rotation and Z-axis PIDs.  But (I) is slower reacting and slower to stop reacting, giving rise to the wibbly-wobbles and drift.

This could be handled in the ESCs with the microcontroller tracking the input voltage with an ADC, and upping the pulse widths it sends to each phase of the motors as the battery power level drops.

Or it could also be done with the Raspberry Pi, and a ADC board, with the P-gain increasing as the battery power level drops.

Or I could stop running the batteries down to 27% charge levels.  I think that’s the way for now.  I bought a LiPo battery checker a while ago and it’s worth its weight in gold.

Sensitive sensors

I’ve mentioned in the past about getting occasional spikes in their readings which, to put it bluntly, screw this up.  The spikes only seems to happen when Phoebe is in flight.  The problem with them is they are often in the z-axis accelerometer readings – and because these readings are integrated to calculate vertical velocity, it can really mess up take-off.

This morning, during a couple of quick test flights, once more Phoebe couldn’t get her bum off the ground and she’d hit my ‘spike’ protection code 194 times in just a few seconds.  The LiPo’s was running at the lower end of it’s charge range.  And that got me thinking.

Once back indoors, and listening to the thunder storm, while recharging the LiPo, I started musing whether the sensor spikes were due to ‘brown outs’ of it’s circuitry due to voltage drops when the LiPo is providing high current to the motors to match large changes in the ESC PWM input signal?

Scrabbling around in my components box for a capacitor which could smooth out any power drops between the LiPo and the regulator that provides the 5v for Phoebe.  But before I had the change to try them, I realized there was a far better solution:

  • When I do my passive testing indoors, I don’t connect up the LiPo, but instead power Phoebe directly with one of these.  It’s got more than enough oomph to keep her running for 3 hours.
  • Phoebe’s ESCs are opto-isolated.  The PWM signal from the RPi only triggers an LED in the ESC; the high powered circuitry receives the PWM via an optical detector.  And that means I could drive Phoebe and her sensor circuitry directly from her own battery and isolated from any LiPo power fluctuations.

So now she’s all strapped up with this new power solution and ready to go as soon at the gale that replaced the thunderstorm eases!


Better batteries.

4 props died during yesterday’s testing; not because of code bugs but because of battery problems.  The DC-DC converter I use to power the RPi can take an input voltage in the range of 10v – 13v, and convert it to 5v.  This is about the same range as a LiPo battery from empty to fully charged. I think my battery is growing old (or I’ve abused it, or both), and the main symptom seems to be very short charging cycles and very fast discharge cycles (i.e. reduced capacity).  I also suspect that its internal resistance has gone up.  All this means that if the ESCs suddenly delivers a power surge to the motors, especially when the battery is already partially discharged, its voltage drops to under 10v; the DC-DC converter stops putting out 5V, and the RaspberryPi does a hard-shutdown in flight.  Of course once the ESCs are not getting PWM from the RaspberryPi, then they stop powering the motors, the battery voltage rises and the RPi boots again, but sadly no leaving any stats to analyse as these are only written to filetdown (including a flight aborted by me).. So I’ve just ordered a couple of Turnigy Nano-Tech LiPo batteries – 3S, 4000mAh 40 – 80c batteries.  WTF does that all mean?

  • 3S = 3 LiPo cells (nominally 3.7v per cell) connected serially → a nominal 11.1v battery
  • 4000mAh = the battery capacity → 4A supplied for an hour @ 11.1v = 44Wh or 158kJ of power which is a lot, though given the motors may draw 10A each in normal flight, 40A total leads to a 6 minute flight maximum
  • 40 – 80c is the constant and peak discharge rate – 40C = 40 x 4000mAh = 160A constant discharge rate or 320A peak flow. I don’t need anything like this, but what it also implies is that the batteries internal resistance is very low, meaning the RaspberryPi reboot risk is hugely reduced when under load due to much lower voltage drop within the battery itself.
  • Once missing parameter is the charge rate; the default safe setting is acknowledged to be 1C – i.e. charge at no more than 4A in the case of my soon to arrive batteries.  Some can apparently take more, but better safe than have an explosion and fire.

Net: 4 props destroyed (luckily still 12 spares in stock), 2 new batteries on the way, and post all the fixing, the first zero drift full flight Phoebe has ever done.  Sadly no video or pictures 🙁 Another day, maybe.