Allegro acs756 current sensor for arducopter

allegro current sensor

allegro.jpg?height=297&width=400


allegro2.jpg?height=254&width=400


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
//#endif

allegro4.jpg?height=400&width=340

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

Comments

  • my X8 can pull up to 531 amps so can I even use a current sensor?

  • Thanks!!!!

  • somebody ask Randy include this in the official firmware

  • I offered Randy enable this setting in the official firmware
    he either missed my post, or ignored.
    try someone  to write about it again to Randy

    ps

    and arduplane this parameter has made​​.

  • 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 ?

    Rick

  • 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?

This reply was deleted.