Allegro acs756 current sensor for arducopter

allegro current sensor



The sensor is galvanically isolated from the circuit, but in contrast to the classical current sensor shows not only the battery discharge and charge it (eg energy recovery in airplanes)
but because of this, at zero current output, exactly half the supply voltage (for classical sensors autopilot 0) ie 2.5 volts.

to correct this misunderstanding to change firmware code

defines.h  change

#define CURRENT_AMPS(x) ((x*(g.input_voltage/1024.0))-g.curr_amps_offset)*g.curr_amp_per_volt


parameters.pde add

    // @Param: AMP_OFFSET
    // @DisplayName: current sensor zero calibration
    // @Description: in volts
    GSCALAR(curr_amps_offset,      "AMP_OFFSET", CURR_AMPS_OFFSET),

parameters.h  add

      k_param_curr_amps_offset = 193,

      AP_Float        curr_amps_offset;

//#ifndef CURR_AMPS_OFFSET   
 # define CURR_AMPS_OFFSET               0.0


archive with source and HEX file for quaid "x"  APM2 here

E-mail me when people leave their comments –

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

Join diydrones


  • many thanks Andrew,
    unit of measurement offset in volts, the range of values ​​from 0.00 to 5.00
    by the way this applies to standard sensors to calibrate the zero value

  • Developer

    Thanks Alexey! I've added your change in for the next release.

  •  dont calculate cf and rf  

    it may be

    rf =  1KOm - 3 KOm

    cf =  1 - 4.7  microfarads

    rfcf filter needed for accuracy measurement  of "average current" 

  • Alexey,

    Awesome job on the voltage regulator!

    So did you build as in the schematic posted above and if so, what did you use for Cf and Rf ?


  • new value amp_offset  used for tune input voltage on current sensor port "a1" with "zero current" allegro sensor with "zero current" have about  2,5 volts output

    amp_per_volt  used too, for calibrate sensivity

    for +-100A allegro chip it is 40.0

    for +-50A allegro chip it is 20.0

  • so the only vlaue that we have to determine is the "g.curr_amp_per_volt" am I right?

  • allegro3.jpg

    im tested with apm2  connect all 3 pinsto port a1


    +5 to +5

    vout to signal

  • Just to clarify the Ears are soldered to the + leg of the connectors with the - leg straight through.  And looking at the label side,  it is wired + - S for the connection to that APM?

  • Allegro current sensors are great! I started using them in my final year engineering undergraduate project, and haven't turned back since. They're affordable, and just as accurate as current transducers more than ten times their cost.  (An RC filter on the output is useful)

This reply was deleted.