Link to the main ARCHA Project post
I came up with a voltage divider circuit that will be used by the micro controller to monitor the battery level.
Connecting a 5volt analog input between 2 resistors of 4.3k and 1.5k will measure a voltage up to 19.3335volts (which should be more than enough to protect the micro controller from over voltage). I used an online voltage divider calculator found here to determine these values.
After reading on helicopter / models related forums like heliguy and rcgroups I found that somewhere around 10v-10.1v is a good voltage to recharge a li-po battery. This will then be our critical level, 10.5 will be considered as our warning level.
You will find the resistor values, schematic and result table here: (click to enlarge)

Code uploaded to the arduino used to retrieve the analog input value for the field test:
/*********
* Filename: arduino-analogin.pde
* Description: Reads a voltage on Analog Pin 0 and sends the 10 bit result value to the serial port
* Author: Marc Vieira Cardinal
* Creation Date: August 10, 2008
* Revision Date: August 10, 2008
*/
#define ledPin 13 // LED connected to digital pin 13
#define analogPin 0 // Will sense the voltage on the analog 0 pin
int analogValue = 0; // Will store the value of the analog input
void setup()
{
Serial.begin(9600); //Initialize the serial output
pinMode(ledPin, OUTPUT); //Enable the led pin for output
}
void loop()
{
digitalWrite(ledPin, HIGH); // sets the LED on
//read the voltage
analogValue = analogRead(analogPin);
//print the value out
Serial.println(analogValue, DEC);
digitalWrite(ledPin, LOW); // sets the LED off
//slight pause
delay(10);
}
Picture of the test bench: (click to enlarge)

I noticed from the test that the theorical analog input of the arduino (mathematically calculated) does not match the field test’s value. There seem to be a difference of around 30-40 units. During the firmware programming I will then need to drain the battery until I reach the target voltage of 10.5v, then 10.1 and 10.0v and measure the analog value that will trigger the warning level and critical level alerts.
The voltage divider circuit seems to be working as excepted, even with an input of 12volts only 3.5volts reach the micro controller which keeps him safe from surge.
Cheers,
Marc