Non-Invasive Sensor: YHDC SCT013-000 CT used with Arduino. (SCT-013)
The SCT013 series are sensors of non-invasive, current transformers that measure the intensity of a current that crosses a conductor without needing to cut or modify the conductor itself. We can use these sensors with a processor, like Arduino, to measure the intensity or power consumed by a load.
The SCT013 sensors are current transformers, instrumentation devices that provide a measurement proportional to the intensity that a circuit crosses. The measurement is made by electromagnetic induction.
SCT013 sensors have a split core (like a clamp) that allows the user to turn it on to wrap electrical equipment without having to cut it off.
In the SCT013 series there are models that provide the measurement as a current or a voltage output. It is more preferable to use voltage output because the connection is simpler.
Current output Voltage output
The sensor accuracy can be off by only 1-2%. To ensure highest accuracy, it is critical to confirm that the core has been properly closed. Even a small air gap can cause a 10% deviation.
As a disadvantage, being an inductive load, the SCT013 introduces a variation of the phase angle, whose value is a function of the load that passes through it, being that it is able to reach up to 3º.
Current transformers are common components in the industrial world as well as in electrical distribution, as they allow the points of consumption to be monitored, whereas another form of measurement does not exist. They are also considered multiple measurement instruments, even in portable equipment such as perimeter clamps or network analyzers.
For example, in our electronics and home automation projects, we can use the SCT013 current sensors to measure the electrical consumption of a device, check the status of an electrical installation, and to record the consumption of electricity in home energy monitors. an installation or even access through the internet in real time.
The SCT013 series has a variety of models that can change the measurement range and output shape. Physically, they are the same, although it is possible to identify them by the text written on the product shell.
The price of all models is similar, and we are looking for international sellers such as eBay, Amazon or AliExpress.
The most common model is SCT013-000, of which the maximum current is 100A, the current output is 50mA (100A:50mA), the maximum current of SCT-013-030 is 30A (30A/1V), and the voltage output is 1V.
Finally, while it is important to have a wide range of measurements, it is important to bear in mind that a higher intensity model will result in less precision. An intensity of 30A to 230V corresponds to a load of 6,900W, which is enough for most home users.
How does the SCT013 work?
The SCT013 sensors are small current transformers, or CTs. Current transformers are instruments widely used for measuring elements.
A current transformer is similar to a voltage transformer and is based on the same operating principles (in fact, they were previously identical). However, they have different objectives and, as a result, are designed and constructed differently.
A current transformer seeks to generate an intensity in the secondary that is proportional to the intensity that passes through the primary. For this, it is desired that the primary is formed by a reduced number of turns.
We can use the current transformer to build non-intrusive current sensors. In the current sensor, the ferromagnetic core can be separated so that the conductor can be opened and rolled up.
So, we have a transformer, it is:
- The cable through which the current to be measured is the primary winding
- The "clamp" is the magnetic core.
- The secondary winding is integrated as part of the probe.
When the alternating current circulates through the conductor, a magnetic flux is generated in the ferromagnetic core, which in turn generates an electrical current in the secondary winding.
The intensity transformation ratio depends on the relationship between the number of turns:
The primary is usually formed by a single loop made by the conductor to be measured. Although, it is possible to wind the driver making this happen more than once inside the "clamp". The number of turns of the secondary, integrated in the probe, varies from 1000-2000, according to the models of the SCT013.
Unlike voltage transformers, in a current transformer, the secondary circuit should never be opened, because induced currents could damage the component. For this reason, the sensors of SCT13 have protections: resistance burden in the sensors of output by voltage, or diodes of protection in the sensors of exit by the current.
To understand the connection of the sensor SCT013, we have to understand and solve three problems:
Sensor output in intensity
Adjustment of the voltage range
Positive and negative stress
SENSOR OUTPUT IN INTENSITY
The SCT013 are current transformers, that is, the measurement is obtained as an intensity signal proportional to the current flowing through the cable,. Processors, however, are only capable of measuring voltages.
This problem is easy to solve. To convert the output in intensity into a voltage output, we only have to include a resistance (load resistance).
With the exception of model SCT013-100, all other SCT013 models have an internal load resistance so that the output is a voltage signal of 1V. This is why it will not be a concern to worry about.
Only in the case of SCT013-100, there is no resistance internal burden, so the output is a signal of ± 50mA. A resistance of 33Ω in parallel with the sensor will suffice.
Positive and Negative Tensions
Another problem we have to solve is that we are measuring alternating current, and the intensity induced in the secondary is alternating. After passing through the resistance burden, whether internal or external, the voltage output is also alternating.
However, as we know, the analog inputs of the majority of processed currents, including Arduino, can only measure positive voltages.
To measure the voltage at the transformer output, we have several options, ordered here from least to most recommended:
- Rectify the signal through a diode bridge, and measure the wave as positive values. Not advisable given that we lose information as to whether we are in the negative or positive half-period, and because we will have the voltage drop of the diode, and, even worse, the diode does not drive below a voltage meaning the signal will be distorted at the junctions by zero.
- Add an offset in DC by using two resistors and a capacitor that provide a midpoint between GND and Vcc. Much better if we also add an operational amplifier as a voltage follower.
- Add an ADC with differential input, which allows measurements of positive and negative voltages, such as the ADS1115. This is the option that we are going to use.
Voltage Range Adaptation
The last problem is the need to adapt the range of voltages at the sensor output. Arduino can only perform measurements between 0 and Vcc. In addition, the smaller the range, the greater loss of accuracy, so we should adapt to this range.
On the other hand, we must remember that when it comes to AC voltage, RMS values are usually used. Briefly review the peak voltage and peak-to-peak equations:
Therefore, for a sensor with an output of ±1V RMS, the peak voltage is ±1.414V and the
In the case of the SCT013-100, the output will be ±50mA. With an external load resistance of 33Ω, the output voltage is ±1.65V RMS, so the peak voltage is ±2.33V and the peak-to-peak voltage is 4.66V.
We already have all the components to measure the network intensity with an SCT-013 sensor. We will use a sensor with voltage output ± 1V RMS and internal burden resistance, together, with an ADC like the ADS1115 in differential mode.
Adjusting the gain of the ADS1115 to 2.048V will place it within the range of ± 1.414V. In the case of a 30A sensor we will have an accuracy of 1.87mA, and 6.25 mA for a 100A sensor.
If you use an SCT013-100 with an output of ± 50mA, we will have to add an external load resistor of 33Ω and raise the gain of the ADS1115 to 4.096V to comply with the range of ± 2.33
The connection, seen from Arduino, would only be the power supply of the ADS1115 module as we saw in the entry on the ADS1115.
For the measurement, it is important that we use only one wire in the “clamp" If we use multiple conductors (two conductors for a single-phase installation and three for a three-phase installation), the role of the conductor will be abolished. This produces a zero inductance, and therefore produces an empty measurement.
The SCT013 sensor has a Jack 3.5 connector, which is very common in the audio field but is not sufficient to use in our electronic projects. To be able to connect it, we must cut off the cable or get a female connector off our welding cable. Fortunately, these terminals are easy to get, but do not rule out cutting off the cables.
If you don't want to use an external ADC, you can also use a more traditional solution that adds a circuit that allows us to add a center offset.
From now on, we will assume that you use an Arduino with Vcc 5V. If you use another processor or an Arduino model with another Vcc (for example, 3.3V), you should correct the part accordingly.
When we added a 2.5V DC offset point, the final range was 1.08V to 3.92V, with Arduino powered at 5V over the analog input range.
When using the SCT013-100 with ±50mA output, we must add a 33 ohm external load resistor. The final range will be from 0.17V to 0.483V, which is also 5V within the Arduino's analog input range.
Assembly with ADS1115
If you use a component with SCT013 with ±1V RMS output and ADS1115, the required code is similar to the code we see in the input to the ADS1115. You need to consult the Adafruit library for ADS1115.
In order to sample the ADS1115 at a higher speed, we need to modify the file, ‘Adafruit_ADS1015.h’.
With this modification, we will be able to reduce the sampling time from about 8-9 milliseconds (about 100 hertz) to about 1.8 milliseconds (about 500 hertz). As we leave the Nyquist frequency, we improve the measurement behavior.
Another version uses the measured maximum and minimum values and then calculates the measured value based on the peak value. The result should be similar to that seen in the square sum example. To do this, you can replace this feature with the following features:
We can see the results in the serial port monitor, and either draw them with a serial plotter, collect it in a larger project to display on a web page, or register it in SD.
ASSEMBLY WITH RESISTANCE AND MEDIUM POINT
In this case, the example is very simple and we only need to measure through analog input: