Ive had quite a bit of help on here trying to get things sorted out with my project. First, I would like to thank those that have helped.
I wanted to make this post for 2 reasons: 1 to help anyone who is doing the same thing I am, and 2 to help me get this working correctly.
I am trying to create an Ammeter with 2 sensors, one on each hot leg (120v/60Hz) (240v US) and want to calculate current amperage
first, the schematic for the ads:
the ADS to the ESP8266 works fine. I can load up code to search the i2c interface and it responds with the correct address
I have 2x SCT-013-000V 100A/1V CTs hooked up to J3 and J2.
if i use a voltmeter, i get 0.3mV across J3-1 and J3-2. there is a very small load on the mains that I am sensing (12v adapter running the circuitboard the ESP is on.
here is my code:
#include <Adafruit_ADS1015.h> //https://github.com/soligen2010/Adafruit_ADS1X15 Fork of Adafruit library
unsigned int DEBUG = 1;
Adafruit_ADS1015 ads;
void setup() {
Serial.begin(115200);
Serial1.begin(115200);
// put your setup code here, to run once:
ads.setGain(GAIN_TWO);
ads.begin(5, 4);
ads.setSPS(ADS1015_DR_1600SPS);
}
void loop() {
// put your main code here, to run repeatedly:
float results0_1, results2_3;
if (DEBUG) {
results0_1 = ads.readADC_Differential_0_1_V();
Serial1.print("Differential 0-1: ");
Serial1.println(results0_1, 7);
results2_3 = ads.readADC_Differential_2_3_V();
Serial1.print("Differential 2-3: ");
Serial1.println(results2_3, 7);
}
delay(500);
}
and here is what it outputs:
Differential 2-3: -0.0010000
Differential 0-1: -0.0010000
Differential 2-3: -0.0010000
Differential 0-1: -0.0010000
ive tried reversing the way the sensors are plugged in, but that doesn’t change anything. I also plugged in a 300W light, and the output is still the same. I have verified the senors are correctly oriented. does anyone have any ideas?