Current Sensor - AC measure

Hi all,

I would like to use the Non Invasive Current Sensor (SCRNT-GM-324) to measure AC (~10A). ( Here the normal voltage is 230V).

I use this command

currentSensor.GetCurrentReading(); 

to measure AC but it returns me all the time ~0.018A CT Sensor plugged or not.

I have attached a picture showing how I plugged the CT Sensor. My computer is connected through this cable.

Thanks for your help !
André

That’s a Seeed Studio module. It’s complete crap. They don’t bias the sensor’s output properly, so it can actually go below 0V (which is really bad for the ADC on the microcontroller).

If you look at the source code, all that GetCurrentReading() does is sample the current instantaneously (which, for AC, is useless). They have a method in there named “GetCurrentPeak()” – that’s probably the function you’ll want to use instead. It samples the voltage 200 times and spits out the maximum value.

Also, a stupid question: I don’t know the wiring color codes your cable is using, but are you sure you’re not clamped around the ground cable? if so, you’ll see little (if any) current.

Thanks for your answers, I have just tested it using the GetCurrentPeak() function :

Val: 0.38681318681318683
Val: 0.38681318681318683
Val: 0.50769230769230766
Val: 0.36263736263736257
Val: 0.33846153846153842
Val: 0.43516483516483512
Val: 0.38681318681318683
Val: 0.38681318681318683
Val: 0.53186813186813175
Val: 0.58021978021978027

The value must be 0.16A.

I tried to use only the CT sensor (SCT-013-030) without the gadgeteer module like this schema : Energy Monitoring using Pachube, Arduino 1.0 and SCT-013-030 | roysoala on the web

but same problem, it returns all the time 0.004A (plugged or not).

@ Jay : Like andre.m said, the yellow/green cable is the ground.

@ Camp06 -

Why do you think the value must be 0.16A ? Is the plug to your PC or another Equipment ?

@ LouisCpro : Because I have measured my laptop consumtion with a wattmeter like the one showed in the attached image.

I think that I found my issue, it must come from the analog port of my cerbuino bee. I will try again this afternoon and I will keep you informed.

André

I would engage you to use an ampermeter instead of a wattmeter as It can be confused between the active and reactive consumption which can be slightly different due to the dephasing of the signal, and the square(2) ratio that deals with MAX/RMS…and so on…

I have just measured the AC with a multimeter : 0.163A - 0.171A

But now I’m sure it’s the analog1 port of the cerbuino bee that doesn’t work. I tried with the analog5 pin and the CT sensor only ( without the gadgeteer module) and it returns me a value between 0.16A to 0.21A.

Now , I think my problem is my math, I attached you my code (is just a translation from the arduino code to c#) :

      private double CalcIrms(int samplesnb)
        {
            int SUPPLYVOLTAGE = 5;
            for (int i = 0; i < samplesnb; i++)
            {
                lastSampleI = sampleI;
                sampleI = current.ReadRaw();
                lastFilteredI = filteredI;
                filteredI = 0.996 * (lastFilteredI + sampleI - lastSampleI);


                // Root-mean-square method current
                // 1) square current values
                sqI = filteredI * filteredI;
                // 2) sum 
                sumI += sqI;
            }

            double I_RATIO = ICAL * ((SUPPLYVOLTAGE / 1000.0) / 1023.0);
            Irms = I_RATIO * System.Math.Sqrt(sumI / samplesnb);

            //Reset accumulators
            sumI = 0;

            return Irms;

        }

and I called it from this code :

Debug.Print("AC: " + CalcIrms(1480));

There is around 5.5% of error between the multimeter value and the CalcIrms.
Is there a better way to do this ?

André

André,

I would use at least a bit of insulation tape on the plugs that go to your multimeter.
230V can be deadly…Safety first buddy.

Eric