Hi all,
I've got a 100A CT for AC current monitoring and I'm running a very simple AnalogRead script (below) to check functionality however I'm not getting any response. I've set it up as per the OpenEnergyMonitor schematic and have put the clamp over an extension cable while running a kettle, hifi, lamps and my monitor so there should be adequate current draw to register some sort of AC waveform.
I'm using this 3.5mm jack and figured this might be the cause of the problem. The connection through the breadboard is good and I've tried reading tip, ring and ground pins but still nothing. Any suggestions as to what might be the issue?
Code:
int i;
int z[250];
unsigned long t[250];
void setup() {
Serial.begin(9600);
}
void loop() {
for (i = 0; i < 250; i++) {
z[i] = analogRead(A0);
t[i] = micros();
delayMicroseconds(8);
}
for (i = 1; i < 250; i++) {
Serial.println(z[i]);
//Serial.print("\t");
//Serial.println(t[i]);
}
delay(1000);
}