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

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

Views: 6450

Comment by Yuan Gao on November 7, 2012 at 12:49pm

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)

Comment by Carl Campbell on November 7, 2012 at 1:26pm

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?

Comment by Alexey Kozin on November 7, 2012 at 8:16pm

im tested with apm2  connect all 3 pinsto port a1

Gnd-gnd

+5 to +5

vout to signal

Comment by Andy on November 8, 2012 at 7:04am

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

Comment by Alexey Kozin on November 8, 2012 at 12:20pm

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

Comment by Rick Eis on November 13, 2012 at 10:53pm

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

Comment by Alexey Kozin on November 13, 2012 at 11:43pm

 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" 


Developer
Comment by Andrew Tridgell on November 20, 2012 at 7:34pm

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

Comment by Alexey Kozin on November 21, 2012 at 12:28am

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

Comment by Eric Thomas on February 18, 2013 at 11:00pm

There doesn't seem to be any sign of a new "AMP_OFFSET" parameter in the ArduCopter v2.9.1 release (contrary to Andrew's 11/20/2012 comment). Would be great if it's added soon so we don't have to keep "hacking" it in.
--ET

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

© 2017   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service