View Single Post
Old 01-29-2017, 10:21 PM   #24 (permalink)
banditpowdercoat
Registered Users
 
Posts: 5,864
 
My HF Map location
Join Date: Sep 2010
Default

OK, something not adding up here.
Using a ACS712 20 amp so 100mv/A
After playing for a few hrs with numbers compared to my Fluke for true amps this is my code

// ***** 6.5 - Current sensor analog pin *****
#define PIN_CURRENTSENSOR 6
#define MVOLT_AT_ZERO_AMP 2379 // in millivolt //2.379v @ 0 amps
#define MVOLT_PER_AMP 100 // in milliVolt per Amp
#define RESISTOR_TO_GROUND_FOR_CURRENT 0 // put as comment or set to 0 if no divider is used
#define RESISTOR_TO_CURRENT_SENSOR 0 // put as comment or set to 0 if no divider is used

// ***** 6.6 - Current sensor calibration parameters *****
#define OFFSET_CURRENT_STEPS 510
#define MAMP_PER_STEP .4865

The offset and MAMP PER STEP are what 'm trying to get correct. Did the calculations as per the description.h file should be 512 and 38.68 but that gives me hundreds of amps
__________________
Dan Pesonen
FBL, Don't think about it, DO IT.
mCX2, nCPX, mCP X, Blade 400, MSH PRTOS, T-700N
"Tri-Flow"
I put that S*** on everything!"
banditpowdercoat is offline        Reply With Quote