30A
30A
66 mV/A
0-5V
5V
-20C to 80C
100 s
1.5% at 25C
Applications
| The 30A ACS712 Current Sensor module is suitable for a wide range of applications, including |
Robotics and motor control
Industrial automation and process control
IoT projects and device monitoring
Energy monitoring and power management
Electric vehicle charging and management
Pinout
| The module has a standard 5-pin configuration |
5V power supply
Ground
Analog output voltage
| IP+ | Positive current input |
| IP- | Negative current input |
By providing accurate and reliable current measurements, the 30A ACS712 Current Sensor module is an essential component for a wide range of applications where current monitoring and control are critical.
30A ACS712 Current Sensor DocumentationOverviewThe 30A ACS712 current sensor is a high-accuracy, hall-effect-based current sensor capable of measuring up to 30A of DC or AC current. It is a popular choice for IoT and robotics projects that require precise current measurement. This documentation provides an overview of the component, its specifications, and code examples to get you started with using it in your projects.SpecificationsMeasurement range: 30A
Sensitivity: 66 mV/A
Output voltage: 0-5V (proportional to current)
Accuracy: 1.5%
Response time: 5 s
Operating voltage: 5V
Operating temperature: -20C to 85CCode Examples### Example 1: Basic Current Measurement with ArduinoThis example demonstrates how to use the 30A ACS712 current sensor with an Arduino board to measure the current flowing through a load.```c
const int sensorPin = A0; // Connect the sensor output to analog pin A0
const float sensitivity = 0.066; // mV/A sensitivity
const float voltageRef = 5.0; // Reference voltage (VCC)void setup() {
Serial.begin(9600);
}void loop() {
int sensorValue = analogRead(sensorPin);
float voltage = sensorValue (voltageRef / 1023.0);
float current = (voltage - 2.5) / sensitivity; // Calculate current in ampsSerial.print("Current: ");
Serial.print(current, 2);
Serial.println(" A");delay(500);
}
```### Example 2: Current Monitoring with ESP32 (Wi-Fi) and ThingSpeakThis example shows how to use the 30A ACS712 current sensor with an ESP32 board to monitor and upload current data to ThingSpeak, a popular IoT cloud platform.```c
#include <WiFi.h>
#include <ThingSpeak.h>const char ssid = "your_ssid";
const char password = "your_password";
const char thingSpeakApiKey = "your_api_key";
const char thingSpeakChannelId = "your_channel_id";WiFiClient client;
ThingSpeak ts(client);const int sensorPin = 32; // Connect the sensor output to pin 32void setup() {
Serial.begin(9600);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi...");
}
Serial.println("Connected to WiFi");
ThingSpeak.begin(client);
}void loop() {
int sensorValue = analogRead(sensorPin);
float voltage = sensorValue (3.3 / 4095.0);
float current = (voltage - 2.5) / 0.066; // Calculate current in ampsint status = ThingSpeak.setField(1, String(current, 2));
status = ThingSpeak.writeFields(thingSpeakChannelId, thingSpeakApiKey);
if (status == 200) {
Serial.println("Data uploaded successfully!");
} else {
Serial.println("Error uploading data: " + String(status));
}
delay(15000); // Upload data every 15 seconds
}
```Note: In both examples, ensure to connect the sensor output to an analog input pin on your board, and adjust the voltage reference and sensitivity variables according to your specific setup.