I have tried precisely following the wikipedia instructions;
http://www.multiwii.com/wiki/index.php?title=Powermeter* get the sensor and the datasheet of your sensor.
50V/90A = 63.69mV / Volt 36.60mV / Amp
http://dlnmh9ip6v2uc.cloudfront.net/dat ... Output.pdf* get the battery voltage reading to MWii right first. Yes, even though strictly speaking it is not needed when using a current sensor, do it. Get the battery voltage reading to MWii right first
I have skipped this step because it seems more complex than what i am trying to do and i don't see any relationship between the two tasks.
* attach the sensor output to analog pin 2 (promini). Be prepared to install low path filter set to about 25 Hz to sensor input. That is a low pass RC filter. It is needed if the value seen by MWii is too jumpy.
attached but no low pass filter - the readings aren't jumpy
check your average cycle time or for better accuracy use the new feature to fixate the cycle time to a given value.
used 4000uS average
#define POWERMETER_HARD
Done
#define PINT2mA 13 // used for telemtry display: one integer step on arduino analog translates to mA (example 4.9 / 37 * 100
so 4.9 / 36.6 * 100 = 13.388
#define PLEVELDIV 1133 // compute : 1133 = 37 / 4.9 * 10e6 / 24000 * 3600 / 1000
1120.408
define PSENSORNULL 510 // to start with - what the arduino analog input sees for zero current; depends on sensor. Find the output voltage for zero current in the datasheet, then convert it to arduino value [0Volt ; 5Volt] -> [0 ; 1023]
the counter goes up very slowly until i start the motors - i am assuming the consumption measured at idle is about right for now.
I have set these variables in the code and flown for 1 min above my bed using a full 3 cell 1800mAh battery so that afterwards i can recharge the battery and see how many mAh go back in.
The mAh used is given as '1559' on my bluetooth smartphone.
The battery was charged back to full with 210 mAh
There seems to be no relationship at all between these two values.
Can anyone explain to me what i'm doing wrong here?
I have tried again with a better cycle time value - 3000 instead of 4000
I still get '1219' on my phone and 215mAh put back in - so the values still make no sense?