Hello - I have the attopilot current/voltage sensor connected to AN0 and AN1, as per the arducopter2 wiki. I have also enabled battery mode "4" in the CLI mode.
However, when read the voltage, it is showing around 3 volts. I am aware that the scaling needs to be changed in the firmware, but am not sure where, etc.
Can someone help? What do I need to do to correct the scaling so I can get an accurate voltage measurement?
Thanks a lot!
Replies
The wiki recommends not to use the Voltage sensor output on the ATTOPILOT, as the APM Oilpan has a better ADC.
So I have connected AN0 straight to the Lipo 3S tap (fused, just to be safe :) using the 3.9k resistor on the board.
AN1 is connected to the current sense output of the ATTOPILOT without resistor.
Below the scaling factor that work for me with an about 10% error on the Current measurements.
If you figure out better ones, please share!
//////////////////////////////////////////////////////
#define BATTERY_EVENT ENABLED
#define LOW_VOLTAGE 10.6
#define VOLT_DIV_RATIO 3.56
#define INPUT_VOLTAGE 4.86
#define CURR_AMPS_PER_VOLT 15
#define CURR_AMPS_OFFSET 0.0
#define HIGH_DISCHARGE 2200
I am assuming you are using it for total curent and voltage? If so, AN0 gets a 3.9k resistor. Then connect gnd to gnd, A3 on APM to current on attopilot sensor, and A4 on APM to voltage on attopilot.
Neil