[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Paparazzi-devel] Incorrect Battery Level
From: |
Reto Büttner |
Subject: |
Re: [Paparazzi-devel] Incorrect Battery Level |
Date: |
Sun, 26 Sep 2010 11:08:45 +0200 |
Hi Felix,
thanks for you answer. In the mean time I found the problem. It was
not in the software, but in the hardware. I was supplying paparazzi
via the BEC of the ESC instead of directely from the battery. My bad.
I corrected that and now the standard calibration works just fine.
Cheers, Reto
2010/9/25 Felix Ruess <address@hidden>:
> Hi Reto,
>
> by default the scaling factor for the tiny2.11 is defined in
> conf/autopilot/tiny_2_1_1.h:
> #define DefaultVoltageOfAdc(adc) (0.0247311828*adc)
>
> This factor can be computed like this:
> reference_voltage / adc_max_value * (R1 + R2)/R2
> R1 and R2 make up the voltage divider to measure Vbat.
> So for the Tiny2.11 we have
> 3.3/1023 * 11.5/1.5 = 0.0247311828
>
> So maybe you have different values for R1 (10k) and R2 (1.5k)?
> Due to the tolerance of the resistors the factor will be slightly
> different....
> If you want to be precise you might want to set this factor a for your
> specific board in your airframe file as you did.
>
> Cheers, Felix
>
> On Sat, Sep 25, 2010 at 4:08 PM, Reto Büttner <address@hidden> wrote:
>> Hi all,
>>
>> I am configuring a new fixed wing airframe and don't get the battery
>> level reading correct. The GCS outputs 5.4 volts although the correct
>> voltage is 7.4V on my LiPo 2S. I am running a Tiny 2.11 and think I
>> have configured that correctly in the airframe file:
>>
>> target name="ap" board="tiny_2.11"
>>
>> I have read the posts in the mailing list archive. If I use the
>> standard configuration the battery level is at 5.4V. I tried
>> configuring it myself in the airframe file using lines like:
>>
>> <define name="VoltageOfAdc(adc)" value ="(0.03703*adc)"/>
>>
>> This changes the battery level reading, but I can't it right. Can someone
>> help?
>>
>> Thanks in advance!
>>
>> Reto
>>
>> _______________________________________________
>> Paparazzi-devel mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/paparazzi-devel
>>
>
> _______________________________________________
> Paparazzi-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/paparazzi-devel
>