AC Current Sensor

AC Current Sensor © GPL3+

Anyone thinking of an Australian hard-rock band at AC/DC is absolutely right here.

  • 9,712 views
  • 3 comments
  • 3 respects

Components and supplies

A000066 iso both
Arduino UNO & Genuino UNO
×1
11026 02
Jumper wires (generic)
2 pieces: male2female
×1
AC Current Sensor
http://www.chinalctech.com/index.php?_m=mod_product&_a=view&p_id=722
×1

Apps and online services

About this project

About

I have to admit the use of an AC Current Sensor is not quite clear - maybe I should retire for the evening relaxation with beer and hard beats - but I share in this article still quickly with you my first steps with a sensor, which I cheap in the Far East related.

The description in full name: "5A range of single-phase ac current sensor module". This is revealed to me from the use: only one phase of another circuit can be monitored here.

At this point it should be mentioned that you - even in this example with a standard lamp - a life-threatening risk of voltage since! Dangerous voltage present!

Unfortunately, the 5 mm diameter hole is consistently too small to carry fully insulated cables. Also, the black bow with its magic is firmly soldered to the breakout board, so you can not put it over a cable guide.

Follow this information for the magic: ZMCT103C

Have also found a hinged version at a large online retailer, so that even larger diameters have to be measured in the diameter and, above all, they do not have to be severed beforehand: the model is SCT-013.

Therefore, I took the example of a lamp, which I had at hand and whose cable I could cut open.

Schematic:

5V DC Voltage between AC sensor and Arduino: G > GND and S (Signal) > A0, Lamp circuit is independent of it: 220V (Europe).

No matter which cable (brown or blue) and no matter which cable direction (from left or right) I chose: the measurement results on the serial monitor always led to identical measurements. On other AC models, sometimes an arrow for the directional guidance of the cable is indicated: this had no influence in my structure.

Once the power supply to the lamp is established, the Serial Monitor will continue to display the measurements.

If both cables were run simultaneously or DC voltage, then no measurement results were displayed.

In search of a suitable documentation, I have been forwarded at least 2 websites to the purchased item: lctech-inc.com and chinalctech.com In the professional area you will find alternatives from controleverything.com (which works also with the Particle Products).

Conclusion:

Unfortunately I can not judge the values. I recommend you for a first impression this cheap sensor, which can certainly be used as a trigger for another action. I am not sure if I would trust this sensor with higher voltages. Here is the additional alternative from Henry Benchs block: the aforementioned TA12-100.

This evening was quite loaded tension and that without music. Coming AC/DC.

Does anyone have an idea for a use in the private environment? For my lamp I know that even without AC sensor, when it is turned on.

Code

Thx to Henry BenchC/C++
http://henrysbench.capnfatz.com/henrys-bench/arduino-current-measurements/ta12-100-arduino-ac-current-sensor-tutorial/
/*
http://www.chinalctech.com/index.php?_m=mod_product&_a=view&p_id=722
http://henrysbench.capnfatz.com/henrys-bench/arduino-current-measurements/ta12-100-arduino-ac-current-sensor-tutorial/
*/

// Henry's Bench TA-1200 AC Current Sensor Tutorial


int sensorTA12 = A0; // Analog input pin that sensor is attached to

float nVPP;   // Voltage measured across resistor
float nCurrThruResistorPP; // Peak Current Measured Through Resistor
float nCurrThruResistorRMS; // RMS current through Resistor
float nCurrentThruWire;     // Actual RMS current in Wire

void setup() 
 {
   Serial.begin(9600); 
   pinMode(sensorTA12, INPUT);
 }
 
 
 void loop() 
 {
   
   
   nVPP = getVPP();
   
   /*
   Use Ohms law to calculate current across resistor
   and express in mA 
   */
   
   nCurrThruResistorPP = (nVPP/200.0) * 1000.0;
   
   /* 
   Use Formula for SINE wave to convert
   to RMS 
   */
   
   nCurrThruResistorRMS = nCurrThruResistorPP * 0.707;
   
   /* 
   Current Transformer Ratio is 1000:1...
   
   Therefore current through 200 ohm resistor
   is multiplied by 1000 to get input current
   */
   
   nCurrentThruWire = nCurrThruResistorRMS * 1000;

   
   Serial.print("Volts Peak : ");
   Serial.println(nVPP,3);
 
   
   Serial.print("Current Through Resistor (Peak) : ");
   Serial.print(nCurrThruResistorPP,3);
   Serial.println(" mA Peak to Peak");
   
   Serial.print("Current Through Resistor (RMS) : ");
   Serial.print(nCurrThruResistorRMS,3);
   Serial.println(" mA RMS");
   
   Serial.print("Current Through Wire : ");
   Serial.print(nCurrentThruWire,3);
   Serial.println(" mA RMS");
   
   Serial.println();
    
   
   

 }


 /************************************ 
In order to calculate RMS current, we need to know
the peak to peak voltage measured at the output across the
200 Ohm Resistor

The following function takes one second worth of samples
and returns the peak value that is measured
 *************************************/
 
 
float getVPP()
{
  float result;
  int readValue;             //value read from the sensor
  int maxValue = 0;          // store max value here
   uint32_t start_time = millis();
   while((millis()-start_time) < 1000) //sample for 1 Sec
   {
       readValue = analogRead(sensorTA12);
       // see if you have a new maxValue
       if (readValue > maxValue) 
       {
           /*record the maximum sensor value*/
           maxValue = readValue;
       }
   }
   
   // Convert the digital data to a voltage
   result = (maxValue * 5.0)/1024.0;
  
   return result;
 }

Comments

Similar projects you might like

How To Use DS18B20 Water Proof Temperature Sensor

Project showcase by Team IoTBoys

  • 78,131 views
  • 13 comments
  • 23 respects

Control LED By Clap Using Arduino and Sound Sensor

by IoTBoys

  • 77,370 views
  • 17 comments
  • 45 respects

Ambient Light Sensor Using Photo Resistor and LED Lights!

Project tutorial by DCamino

  • 7,886 views
  • 5 comments
  • 21 respects
Add projectSign up / Login