Vous êtes sur la page 1sur 4

AMMETER MADE WITH SCT-O13-030

Hello friends, in this tutorial we will see how to make an ammeter with Arduino and display the
current and power measurement on the LCD display.
This article is realized thanks to the collaboration of a fan of the site that donated the purchase of
the sensor on the page Support the Blog .
If you also want to collaborate on the realization of other projects of your interest you can visit
the page Support the Blog
The SCT-013-030 sensor ( datasheet ) supports currents up to 30A and outputs a 0 to 1V signal.
The program is implemented using the EmonLib library .

We begin to list the components necessary for carrying out the project:

COMPONENTS:

Arduino ONE
16x2 I2C LCD
Sensor SCT-013-030
1 100μF 16V capacitor
2 10Kohm resistors
Breadboard
Connecting cables M / M
CONNECTION DIAGRAM:
The SCT-013-030 sensor is considered "non-invasive" because to measure current, just open the
sensor and insert the wire involved in the measurement. I remind you that you only need to
insert one wire (Phase or Neutral) if we insert the two wires or the entire cable the value will be
reset.
We proceed to construct the circuit as in the diagram below, remembering not to invert the
polarity of the electrolytic capacitor of 100 μF.
SKETCH:
Before proceeding with the loading of the sketch insert
the EmonLib library and newLiquidCrystal in the ID t ramite the appropriate command by
clicking on Sketch >> #include library >> add library from .ZIP file .
Sketch Arduino Ammeter with SCT-013-030 for 16x2 I2c display
lcd . clear ( ) ;
Serial . begin ( 9600 ) ; // I open serial communication
// Pin, calibration - Current Const = Ratio / Res. Burder. 1800/62 = 29.
emon1 . current ( pin_sct , 29 ) ;
// Initial information display
lcd . setCursor ( 0 , 0 ) ;
lcd . print ( "Corr. (A):" ) ;
lcd . setCursor ( 0 , 1 ) ;
lcd . print ( "Pot. (W):" ) ;
}

void loop ( )
{
// Calculation of the current
double Irms = emon1 . calcIrms ( 1480 ) ;
// Show the current value
Serial . print ( "Current:" ) ;
Serial . print ( Irms ) ; // Irms
lcd . setCursor ( 10 , 0 ) ;
lcd . print ( Irms ) ;

// Calculate and show the values of Power


Serial . print ( "Power:" ) ;
Serial . println ( Irms * rede ) ; // I write on the serial monitor Current *
Voltage = Power
lcd . setCursor ( 10 , 1 ) ;
lcd . print ( "" ) ;
lcd . setCursor ( 10 , 1 ) ;
lcd . print ( Irms * rede , 1 ) ; // I write on the current display * Voltage
= Power

delay ( 1000 ) ;
}

CONCLUSIONS:
The sensor and the reading are accurate, with a percentage of deviation of 2-5W. On the net you
will find many examples that use the SCT-013 sensors with Arduino that also take into account
the sine wave signal length and many other variables. This is just a concise form of how to make
an ammeter with Arduino and the sensor in question.
As always, I leave the files useful for the realization of the project.
Greetings and the next tutorial.

Download file

Download file

Download file

Vous aimerez peut-être aussi