



The ACS712 30A is a Hall-effect current sensor module designed to measure the current flowing through a conductor without having to directly make contact with the conductor. It is based on the ACS712 chip, which uses the Hall effect to sense the magnetic field generated by the current. The ACS712 module is often used in applications where accurate and non-invasive current measurement is required, such as in power monitoring, motor control, battery management systems, and overcurrent protection circuits.
The ACS712 module typically has the following pins:
int analogPin = A0; // Analog pin connected to ACS712 OUT pin
int sensorValue = 0; // Variable to store the raw sensor value
float voltage = 0.0; // Voltage output from ACS712
float current = 0.0; // Calculated current in amps
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud rate
}
void loop() {
sensorValue = analogRead(analogPin); // Read the value from the sensor
voltage = (sensorValue / 1023.0) * 5.0; // Convert the analog value to voltage
current = (voltage - 2.5) / 0.185; // Convert the voltage to current (0.185V per A for 30A version)
Serial.print("Current: ");
Serial.print(current); // Print the current in amps
Serial.println(" A");
delay(500); // Wait for 500ms before the next reading
}
analogRead() function.If the current flowing through the sensor is 1A, the output voltage will be around 2.685V (in the case of a 5V supply), and the Arduino will calculate the current based on that.
Origin:- China
Brand:- Generic