Reading from a CT Sensor pin affected by Seven Segment Displays switching on and off

Thanks 6v6gt

Test setup.

  • Both CT Sensors are rate for 5A with a 5V output.
  • Yes, 240v 50Hz
  • As previously stated T12-100 attached to Analog pin and GND
  • Code attached

With regard to your other comments.

The T12-100 output oscillates between zero an about 200mV, so is there not already an offset?

You are correct, no synchronisation of sampling. Wouldn’t know how or even what advantage it provides.

None of the documentation regarding the ZMCT103C module mentions smoothing and the output doesn’t look smoothed to me. But I have to say that after a bit of searching I have found neither a circuit diagram or datasheet for the module, so can’t be sure exactly what happening on the board.

Michael

// CT Sensor Raw Data


int sensorTA12 = A5;
float ReadValue;



void setup() 
{
Serial.begin(9600);
pinMode(sensorTA12, INPUT_PULLUP);

}

void loop()
{

ReadValue = ((analogRead(sensorTA12)) * 5.0)/1024.0;
Serial.print("ReadValue ...  ");Serial.println(ReadValue);

}