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!

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • set the voltage divide ratio by hit and trial in APM_config.h file. try a value between 5 and 15. use a voltmeter to calibrate at any two positions. this is the best way to get accurate voltage.
  • 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

    

    

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…