The Gravity: Analog AC Current Sensor (SEN0211), manufactured by DFRobot, is a versatile and easy-to-use sensor designed to measure alternating current (AC). It works by converting the current flowing through a conductor into a proportional voltage output, enabling real-time monitoring and analysis of AC electrical systems. This sensor is ideal for applications such as energy monitoring, home automation, industrial equipment diagnostics, and educational projects.
With its compact design and compatibility with microcontrollers like Arduino, the Gravity: Analog AC Current Sensor is a reliable choice for both beginners and experienced users looking to measure AC current in their projects.
Below are the key technical details and pin configuration for the Gravity: Analog AC Current Sensor:
Parameter | Specification |
---|---|
Manufacturer | DFRobot |
Part Number | SEN0211 |
Input Current Range | 0 to 5A AC |
Output Voltage Range | 0.2V to 2.8V |
Supply Voltage | 5V DC |
Accuracy | ±5% |
Interface Type | Analog |
Operating Temperature | -25°C to 70°C |
Dimensions | 38mm x 20mm x 15mm |
Weight | 10g |
The sensor has a 3-pin interface for easy connection to microcontrollers. The pinout is as follows:
Pin Name | Description |
---|---|
VCC | Power supply input (5V DC) |
GND | Ground |
SIG | Analog signal output (voltage proportional to AC current) |
Connect the Sensor:
Pass the AC Conductor Through the Sensor:
Read the Output:
Below is an example Arduino sketch to read the sensor's output and calculate the AC current:
// Gravity: Analog AC Current Sensor (SEN0211) Example Code
// This code reads the sensor's analog output and calculates the AC current.
const int sensorPin = A0; // Analog pin connected to SIG pin of the sensor
const float sensitivity = 0.185; // Sensor sensitivity in V/A (calibration factor)
const float offsetVoltage = 2.5; // Voltage at 0A (midpoint of the sensor output)
void setup() {
Serial.begin(9600); // Initialize serial communication
pinMode(sensorPin, INPUT); // Set the sensor pin as input
}
void loop() {
int sensorValue = analogRead(sensorPin); // Read the analog value
float voltage = sensorValue * (5.0 / 1023.0); // Convert to voltage
float current = (voltage - offsetVoltage) / sensitivity; // Calculate current
// Print the results to the Serial Monitor
Serial.print("Voltage: ");
Serial.print(voltage, 3); // Print voltage with 3 decimal places
Serial.print(" V, Current: ");
Serial.print(current, 3); // Print current with 3 decimal places
Serial.println(" A");
delay(500); // Wait for 500ms before the next reading
}
sensitivity
and offsetVoltage
values may vary slightly between sensors. Adjust these values during calibration for better accuracy.No Output or Incorrect Readings:
Fluctuating or Noisy Readings:
Output Voltage Exceeds Expected Range:
Calibration Issues:
sensitivity
and offsetVoltage
values in the code accordingly.Q: Can this sensor measure DC current?
A: No, the Gravity: Analog AC Current Sensor is designed specifically for AC current measurement. It cannot measure DC current.
Q: Can I use this sensor with a Raspberry Pi?
A: Yes, but since the Raspberry Pi lacks an onboard ADC, you will need an external ADC module (e.g., MCP3008) to read the sensor's analog output.
Q: What is the maximum wire diameter that can pass through the sensor?
A: The sensor can accommodate wires with a diameter of up to 10mm.
Q: How do I improve the accuracy of the sensor?
A: Perform a proper calibration using a known current source, and ensure that the sensor is not exposed to external magnetic fields or electrical noise.
By following this documentation, you can effectively integrate the Gravity: Analog AC Current Sensor into your projects for accurate and reliable AC current measurement.