[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] Airframe BAT section

From: Michel GORRAZ
Subject: Re: [Paparazzi-devel] Airframe BAT section
Date: Wed, 25 Jun 2008 07:40:03 +0200

Hi guys,

In " #define VoltageOfAdc(adc) ( coeff *adc) " let :
The general formula to compute the coefficient is :

coeff = ( Vref  / ( 2^10 - 1 ) ) x (1 + R1/R2)

coeff = ( 3.3 / ( 1024 - 1 ) ) x (1 + R1/R2)

coeff = 0,0032258 x (1 + R1/R2)

For example :

Tiny 1.1 : R7 = 15k, R15 = 3.3k => coeff = 0,0178885630
Tiny 2.1 : R1 = 15k, R2 = 3.3k => coeff = 0,0178885630
Tiny 2.11 : R1 = 10k, R2 = 1.5k => coeff = 0,0247311828

But, it's an approximate value because of the dispersions of the components :
So, calculate your own board "coeff" according these two resistors values and if necessary adjust it with the GCS voltage indication and several battery voltage values (use a power supply)


PS : note that R1 & R2 values where modified between Tiny 2.1 and 2.11 to minimize the amount of resistors values, so the cost...

2008/6/25 David Conger <address@hidden>:

I just went there...too much info unless you just want to read a lot about my build.

I will save you some reading :)

"Well, Update, if you did like me and used the "default" resistors for building the Tiny2.11 there is one file to modify to have the autopilot correctly report the voltage of the battery.

File is:
on my system that is: /home/david/paparazzi3/conf/autopilot/tiny_2_1.h

Go to the bottom of the file and make this change:
#ifndef VoltageOfAdc
/* #define VoltageOfAdc(adc) (0.01787109375*adc) */
#define VoltageOfAdc(adc) (0.0247311828*adc)

See, I commented the orig. line and simply duplicated it with the new multiplier. I used the same one that Michael G. posted (and I reposted in this log).

Now in GSC my battery voltage reads 10.7 ... my EXTECH 382200 Current Limiting Power Supply says: 10.8 @ 0.12A ...close enough. "

The above is about two more pages into the build.

Hope it helps.


On Jun 24, 2008, at 3:09 PM, TurboTas wrote:

Hi Guys,

does anyone have a working sample for a 2cell Lipo.  I started with the default section as per th e wiki example and worked from there, but no matter what I tried, I could not get the measured values to match the actual battery voltage.

I'm always under by around 3 volts.

Any hints would be gratefully received.


Sent from Yahoo! Mail.
A Smarter Email

Paparazzi-devel mailing list

Paparazzi-devel mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]