The Current Sensor 5A is a device designed to measure the flow of electric current in a circuit, with a maximum capacity of 5 amperes. It provides real-time feedback, making it an essential component for monitoring and controlling electrical systems. This sensor is widely used in applications such as power management, motor control, battery monitoring, and energy metering. Its compact design and ease of integration make it suitable for both hobbyist projects and industrial applications.
Pin | Name | Description |
---|---|---|
1 | VCC | Power supply input (3.3V to 5V). Connect to the positive terminal of the power source. |
2 | GND | Ground connection. Connect to the ground of the circuit. |
3 | OUT | Analog output signal. Provides a voltage proportional to the measured current. |
Below is an example of how to use the Current Sensor 5A with an Arduino UNO to measure current and display the readings in the Serial Monitor.
// Example code for using the Current Sensor 5A with Arduino UNO
// This code reads the analog output of the sensor and calculates the current
const int sensorPin = A0; // Connect the OUT pin of the sensor to Arduino A0
const float sensitivity = 0.185; // Sensitivity in V/A (varies by sensor model)
const float offsetVoltage = 2.5; // Offset voltage at 0A (for a 5V-powered sensor)
void setup() {
Serial.begin(9600); // Initialize Serial Monitor at 9600 baud rate
pinMode(sensorPin, INPUT); // Set the sensor pin as input
}
void loop() {
int sensorValue = analogRead(sensorPin); // Read the analog value from the sensor
float voltage = sensorValue * (5.0 / 1023.0); // Convert ADC value to voltage
float current = (voltage - offsetVoltage) / sensitivity; // Calculate current in Amperes
Serial.print("Current: ");
Serial.print(current, 2); // Print current with 2 decimal places
Serial.println(" A"); // Append unit (Amperes)
delay(500); // Wait for 500ms before the next reading
}
sensitivity
and offsetVoltage
values based on the specific sensor model you are using.No Output or Incorrect Readings:
Fluctuating or Noisy Readings:
Output Voltage Does Not Match Expected Values:
Q: Can this sensor measure both AC and DC currents?
A: Yes, the Current Sensor 5A can measure both AC and DC currents, but ensure the output signal is interpreted correctly for AC measurements.
Q: How do I calibrate the sensor?
A: Pass a known current through the sensor, measure the output voltage, and adjust the sensitivity and offset values in your calculations to match the actual current.
Q: What happens if the current exceeds 5A?
A: Exceeding the 5A limit may damage the sensor or result in inaccurate readings. Use a higher-rated sensor for larger currents.
Q: Can I use this sensor with a 3.3V microcontroller?
A: Yes, the sensor operates at 3.3V, but ensure the output voltage range is compatible with the ADC of your microcontroller.