Current

Viewed products

30A  Current Sensor View larger

30A Current Sensor ACS712

BE15000149

New product

The cool thing about an ACS712 is that current is measured is measured in two directions.  What this means is that if we sample fast enough and long enough,  we sure to find the peak in one direction and the peak in another direction.

More details

This product is no longer in stock

8,61 € tax incl.

Add to wishlist

More info

The current sensor chips: ACS712ELC-30A; 

pin 5V power supply, on-board power indicator; 

the module can measure positive and negative 30 amps, analog output 66mV / A; 

when no current is detected by the output voltage is VCC / 2; 

PCB board size: 31 (mm) x13 (mm);

Note: ACS712 Hall detection is based on the principle, try to avoid using the magnetic field caused by the impact of this!

 

ACS712 Arduino AC Current

 

Code:

/*
Measuring AC Current Using ACS712
*/
const int sensorIn = A0;
int mVperAmp = 185; // use 100 for 20A Module and 66 for 30A Module


double Voltage = 0;
double VRMS = 0;
double AmpsRMS = 0;



void setup(){
Serial.begin(9600);
}

void loop(){


Voltage = getVPP();
VRMS = (Voltage/2.0) *0.707;
AmpsRMS = (VRMS * 1000)/mVperAmp;
Serial.print(AmpsRMS);
Serial.println(" Amps RMS");

}

float getVPP()
{
float result;

int readValue; //value read from the sensor
int maxValue = 0; // store max value here
int minValue = 1024; // store min value here

uint32_t start_time = millis();
while((millis()-start_time) < 1000) //sample for 1 Sec
{
readValue = analogRead(sensorIn);
// see if you have a new maxValue
if (readValue > maxValue)
{
/*record the maximum sensor value*/
maxValue = readValue;
}
if (readValue < minValue)
{
/*record the maximum sensor value*/
minValue = readValue;
}
}

// Subtract min from max
result = ((maxValue - minValue) * 5.0)/1024.0;

return result;
}

Accessories

Customers who bought this product also bought: