General

Output of the SEN0211 20A Current Sensor

userHead DouglasFalkenburg 2025-10-29 04:27:31 87 Views2 Replies

Recently I purchased x6 SEN0211's. I have read the spec's and looked at several versions of the arduino code by Berinie Chen to measure ac current and I am mystified. The hardware spec states that the output is  “Analog Output Voltage: 0.2V - 2.8V (DC)”.  Does this mean that the output will be 0.2VDC when the CT measures 0.0 Amps and 2.8VDC when measuring 20A? 

 

Chen computers the average of 5 readings, divides by 2, adjusts peak-to-peak to RMS and multiplies by the 20A detection range.  This would suggest that a one volt RMS range corresponds to 20A of current.  Is this what is going on: the output is an AC value offset from 0 by 1.5Vpp

 

Other versions of Chen's arduino code on your wiki lead me to believe that the output is a sine way centered around an offset voltage. The version of the code in the wiki samples the output for 200ms, looks at the maximum AND the minimum raw values, computes the difference, divides by 2 and adjust to RMS (multiply by .707).  They then multiply by a parameter called mVPerAmp which has been set to 100.  But if that parameter is 100, that would imply that the 2V is the range, not 1V.

 

Please clarify kindly the output spec and what is delivered to the arduino.  Thank you. I have learned over many years of programming not to blindly copy someone's code without first understanding it. 

2025-10-30 20:30:21

PS 3.3V supply voltage

userHeadPic Jdavis22
2025-10-30 20:20:59

Hi,

 

Great questions. Just a noob here. Hope this helps.

 

Setup:

 

Split Core Transformer 20A/1V version → DFRobot AC Current Sensor V1.0 → Adafruit ADS1115 (16bit adc) → Adafruit ESP32 S3 TFT Reverse Feather

 

I put a scope on the input and output of the DFRobot AC Current Sensor V1.0. AC goes in, Somewhat dirty DC goes out. 

 

No idea where that .2 min DC volts came from. I do not see that on my board.

 

The code on the wiki didn't work for my case. I left the 5 sampling count based on the DC signal quality.

 

I took four test loads recording the voltage out of the adc and the amp value from a non calibrated fluke clamp meter. A y=mx+b formula was then created. It was not a perfect fit but close enough for me.

 

With no load I see a .005V noise signal. I use > 0.01V to filter out the noise.

 

Here is the code I use: (ads is the ADS1115 library)

 

int16_t adc0;

float volts0;

float peakVoltage = 0;

float ACCurrentValue = 0; // in Amps

 

// average 5 readings

for (int i = 0; i < 5; i++) {

  adc0 = ads.readADC_SingleEnded(0);

  volts0 = ads.computeVolts(adc0);

  peakVoltage += volts0;

  delay(1);

}

peakVoltage = peakVoltage / 5;

 

ACCurrentValue = (peakVoltage > 0.01) ? 6.7026* peakVoltage + 0.0824 : 0.0 ;// calibrated against fluke clamp on meter

 

 

 

 

 

userHeadPic Jdavis22