View Full Version : EagleTree - mAh usage?
Cralis
07-06-2008, 02:15 AM
Hi guys,
It seems the EageTree samples every 100 miliseconds... so, 10 samples per second.
How is it working out how much mAh you've used?
I mean, lets say for a full flight, you could be up for 6 minutes. That's 360,000 samples by the eagle tree for the flight.
It seems to log the amp draw on each sample. So, how's it working out the usage? It can't just sum up each sample, can it? Idon't think so... be 360,000 * 1700 (1700 seems around an average for me at around 1850rpm on my Z20 980).
I'm not electrically minded. What is that '1700'? 1.7 amps? 17 amps? What would it be?
Then, is there a way to work out the usage by summing up all those '1700's?
(You will see the erason for my questions soon.. :))
worldofmaya
07-06-2008, 05:43 AM
The Eagletree knows your packs current and amps and the time... nothing else is needed
-> http://en.wikipedia.org/wiki/Ampere-hour
-> http://en.wikipedia.org/wiki/Watt
Would be nice to hear in which direction your question goes...
-klaus
Cralis
07-06-2008, 05:53 AM
Thanls Klause...
So, I have the data, and have the amps, sampled every 100 milliseconds. So, would I add up 10, to get the number of amps/second, then do something to that value to get the amp per hour?
Cralis
07-06-2008, 06:38 AM
Amp Hour or Ampere-Hour
A unit of measurement of a battery's electrical storage capacity. Current multiplied by time in hours equals ampere-hours. One amp hour is equal to a current of one ampere flowing for one hour. Also, 1 amp hour is equal to 1,000 mAh
So, if I have the amp value read at every 100 miliseconds - can I accuratly calculate the Ah used over a period of time?
Pinecone
07-06-2008, 09:58 AM
You integrate over time.
Or take each sample interval, multiply by the amp draw for that sample, and sum the results.
Cralis
07-06-2008, 10:07 AM
Here's sample data...
Is there a way to work out the mah per sample, from this data then?
The eagletree uses an Allegro Hall sensor
mah = mah + current_amperage/ samples_per_second
Cralis
07-06-2008, 10:30 AM
So, for the first line of my data, the mah would be:
mah = mah + ((2493/1000) /10) ?
(I'm new to electronics! :) )
I assume you divide Amps by 1000 to get Milliamps? Hence the 2493/1000 ?
There is no way in hell your pulling 2493A so a further scaling is necessary. Most likely your using 24.93A. If i recall correctly the Allegro sensor is accurate to about 20mA which is pretty impressive. I've got 4 free samples from them but they have gone unused as the project got side tracked.
Cralis
07-07-2008, 12:48 AM
I'm battling to get the formula...
For each sample, I am saying mah = mah + (amps / 100) / 10
(amps example: 2140... so I divide it to get 21.40) and the divide that by 10 as it's sampling at 10 times per second...
So I am trying to graph the mah value. Problem is, the graph line looks right... but the value is wrong... at the end of the flight, the total mah is 2814.. but should be around 1600...
mjdee14
07-07-2008, 01:47 PM
I'm battling to get the formula...
For each sample, I am saying mah = mah + (amps / 100) / 10
(amps example: 2140... so I divide it to get 21.40) and the divide that by 10 as it's sampling at 10 times per second...
So I am trying to graph the mah value. Problem is, the graph line looks right... but the value is wrong... at the end of the flight, the total mah is 2814.. but should be around 1600...
Isn't there a calibration for amps....or volts...? I'm not at my home cmptr but i remember seeing a calibration sequence.
I have always thought the ET was not totally accurate.....it never seems to match perfectly what I took out vs what went back in. But it's close enough.
Well he hasn't told us where he got that data from, it doesn't necessarily even have to be amps, it could be the ADC output unformatted.
worldofmaya
07-07-2008, 03:05 PM
My logs match nearly what I put back. Why? Because I use LiFe without a balancer. So the only thing that losses something is the charger. If you're using a balancer in-between you'll never get an nearly-exact value. You'll have to add what the balancer consumes too. I think that this thread is pretty much useless as long as Cralis doesn't tell where he get's his data and where he wanna come with his question. I think that the replies already give enough information to calculate everything he asked for...
-klaus
BTW heres what the hall sensors look like.
http://i79.photobucket.com/albums/j159/hfguy/DSC00741.jpg?t=1215457815
Cralis
07-07-2008, 05:22 PM
The data is coming direct from the eagle tree log file... I'm extracting that and saving it to a database. So, look at one of your ET log files, and you'll see exactly where I am getting the data from. Open it with a space separated file in Excel...
Okey, but we have no idea what scaling factor is needed. Why bother spitting out the data as a measured current when you can just record the ADC results and let the graphing tool do the conversion.
kahn10
07-07-2008, 05:58 PM
i.e. what are you trying to achieve maybe? :)
A mobile version of the Eagletree grapher i pray :)
kahn10
07-07-2008, 06:08 PM
lost in data.........:)
Cralis
07-08-2008, 03:32 AM
Okey, but we have no idea what scaling factor is needed. Why bother spitting out the data as a measured current when you can just record the ADC results and let the graphing tool do the conversion.
Not sure what you mean by ADC.
I'm trying to make my own graph of the data. Once I know how to correctly work out the mah, my graph is complete. I am correctly graphing everything else fine. At the moment, all I am doing is running through each sample, and summing the Amps as it's read from the EagleTree...
Eg:
So, at 100ms, it read 2190
at 200ms, it read 2214
at 300ms, it read 2218
at 400ms, it read 2121
at 500ms, it read 2190
at 600ms, it read 2015
at 700ms, it read 2221
at 800ms, it read 2225
etc etc
(The ET samples at every 100 milliseconds)
So, My first point on the graph, x=100, y=2190
point two is x=200, y = 4404 (Sum of the previous Amp values + the current value)
I also divide the amps value, by the way, as I think 2190 (or what evr) should be 21.90A.
The graph ends up looking like the Eagle Trees graph, from it's own software. The problem is, the values are wrong... I can't just sum them up. All I'm trying to do is get a forumula on how to work out the mah at each sample.
Pinecone
07-08-2008, 08:50 AM
The reason the ET doesn't match what is put back in, is charging is not 100% efficient. So if your charger says it put back in 2000 mAH, that is how much it ran through the pack, but the actually amount of charge is a bit less.
BALANCING *HINT HINT HINT* When you balance charge a lipo a good portion of the mah reading on the charge was wasted to balance the cells.
ADC = Analog to digital converter. The hall sensor produces a voltage that is proportional to the current, the ADC will read this voltage and convert it into a digital number.
Pinecone
07-08-2008, 02:37 PM
Depends on how the balancer works.
But MOST balancers drain the higher voltage cells, so the total delivered by the charger is less than the pack actually takes.
Plus the efficiency. :)