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



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
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?
-
1
-
2
of 2 Next