Battery life

Discussions and questions about the Crazyflie Nano Quadcopter
orcinus
Member
Posts: 36
Joined: Thu Jan 23, 2014 11:03 pm

Battery life

Post by orcinus »

I know the "official" battery life on a charge is stated as "up to 7 minutes".
But what's the expected real-life flight time one might expect from a crazyflie?

I haven't measured yet, but i get the feeling i'm getting way way less than that, perhaps 3-4 minutes.
Can't be sure until i do a continuous timed hover, but would be grateful for some input on what the times people get are.
orcinus
Member
Posts: 36
Joined: Thu Jan 23, 2014 11:03 pm

Re: Battery life

Post by orcinus »

A few more questions.

How can i get the battery voltage?
The progress bar widget used for the battery gauge does not support displaying a text overlay, so i can't see the voltage, only the gauge.

Also, is it normal for the battery gauge to never be at 100%?
I'm guessing it's a calibration thing, but i'd expect the batt management IC to charge all batteries to the same voltage, so i'd expect the calibration to be correct.


Edit:
Never mind the first question, i've edited the UI slightly to add a voltage readout.
Does this look like a normal max. voltage?

Image
csholmq
Beginner
Posts: 12
Joined: Fri Dec 27, 2013 1:20 pm

Re: Battery life

Post by csholmq »

A LiPo, 1 cell, battery has a nominal voltage of 3.7V. Maximum voltage is theoretically 4.23V and "safe" minimum voltage is 3.0V. To calculate charge state:

Code: Select all

C = (x - 3.0) / (4.23 - 3.0)
So at 3.7V, the battery is charged to 57%. Now, what that means is only that 57% of the charge is left in there. Not that there's 57% of fly time left. I would guess that the heli can lift off as long as the charge is > 40-60% or something. Do some tests with your gauge and let us know!
orcinus
Member
Posts: 36
Joined: Thu Jan 23, 2014 11:03 pm

Re: Battery life

Post by orcinus »

Ah, no, i haven't actually changed the gauge metric.
It's still set to the default 3V - 4.2V in that screenshot.

My question was actually - what are the maximum voltages people typically get on their Crazyflies.

I realize the Li-Ion charging process does not guarantee the same maximum voltage (since the charging process is CV for the final phase of charging, with the charging logic typically set to stop charging when current drops below 3%), but wanted some kind of a sample of expected values, so i can:

1) figure out if mine's behaving as expected and
2) i can adjust the gauge to display a more sensible range.
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Battery life

Post by tobias »

The power management circuit makes sure to charge the battery to 4.20V within 1% margin so don't worry it won't be fully charged.
The battery voltage readout is done with a resistor divider and the MCU analog to digital converter. These have a couple of percent errors. In your case if the battery is 4.20V and you read out 4.13V that is ~1.7% error which isn't that bad.
orcinus
Member
Posts: 36
Joined: Thu Jan 23, 2014 11:03 pm

Re: Battery life

Post by orcinus »

Thanks, nice to know it's within specs.
Didn't even think about the voltage divider resistor tolerance (i assumed the voltage readout was coming off the charge management IC via I2C).

Anyway, just did a sustained hover on a freshly charged battery and the stopwatch says: 7m 10s.

The first 5m were in altitude hold mode, the last 2m were with manual throttle, as altitude hold regulator went nuts around the 5:00 mark. Altitude started oscillating insanely wildly. Unfortunately, i was doing my best to keep the crazyflie in the air so i couldn't look at the readout to check if the actual measured altitude was going nuts or just the throttle (i.e. PID regulator starting to ring).

Either the altitude hold PID can't deal with loss of power due to voltage drop for some reason or the baro sensor goes crazy when the voltage drops. Considering i didn't have any more problems manually keeping the altitude than normally, i'd say the barometer went nuts.
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Battery life

Post by tobias »

Interesting finding. I would however not bet on the pressure sensor being the problem. I think it has to do with the stabilization code which can't handle a low batter voltage. It could also be that the board is getting a bit warm or something which would effect the barometer reading.
orcinus
Member
Posts: 36
Joined: Thu Jan 23, 2014 11:03 pm

Re: Battery life

Post by orcinus »

I vaguely remember having issues with some I2C peripherals in low batt conditions, that's why the idea crossed my mind.
But i might be completely off.

It might've been the PID not being able to deal with the changing range of voltage vs. throttle (since there's no direct feedback loop between the PWM and the prop RPMs, but only indirectly through the barometer, god only knows what kind of oscillations that control loop might produce when outside the normal parameter range).
orcinus
Member
Posts: 36
Joined: Thu Jan 23, 2014 11:03 pm

Re: Battery life

Post by orcinus »

Heh, serves me right for not reading the wiki carefully enough :oops:

It's all there, black on white:
The I term is just the integrated error - and is very very very important as it makes up for the voltage drop. The P and D term are reset every time hover mode is entered, and the I term is only reset when you start charging the flie. The default I value right now is set up to be a pretty good value for a stock flie at 80% battery. The default values takes around 1-2 to converge on a flie with a depleted battery during which time the flie might oscillate within a meter range or so.
Edit: BTW, 1-2 what?
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Battery life

Post by tobias »

That's a good question as omwdunkley did most of this (credit to him) but I would guess it should say 1-2 minutes.
Post Reply