Hi Howard,
Hope everything is all right for you !
After the success of the ACS712 module on DC current i'v added an AC source on relay 5 and would like to add a second ACS712 display module to measure amps on AC current
In confi.h i updated this line
#define STAT_MAINS_CURRENT_ANALOG A8
but in misc.ino i added this piece of code in PART A but there's an error
//PART A - THIS PART CONCERNS THE AC CURRENT
#define ACS712_V_PER_A 0.100
double toACAmps(double d) {
double V = (d/1024.0)*5.0;
double A = (2.48 - V)/ACS712_V_PER_A;
return abs(A);
}
//PART_B - This part is working on DC current
// converts a raw analog reading into current for STAT_DC_CURRENT_ANALOG
// return (invalid) if not implemented or if there's an error
#define ACS712_V_PER_A 0.100
double toDCAmps(double d) {
double V = (d/1024.0)*5.0;
double A = (2.48 - V)/ACS712_V_PER_A;
return abs(A);
}
//
Thank you and nice skies
Koal01