The Current Sensor 5A is an electronic device designed to measure the flow of electric current in a conductor. This sensor can measure currents up to 5 amperes, making it suitable for a wide range of applications, including power supply monitoring, battery management, and load detection in consumer electronics, automotive systems, and industrial equipment.
Pin Number | Name | Description |
---|---|---|
1 | Vcc | Power supply input, typically 5V to 12V |
2 | Out | Analog output voltage proportional to the current |
3 | GND | Ground reference for the power supply |
// Define the analog input pin connected to the sensor output
const int currentSensorPin = A0;
void setup() {
// Initialize serial communication at 9600 baud rate
Serial.begin(9600);
}
void loop() {
// Read the sensor output voltage
int sensorValue = analogRead(currentSensorPin);
// Convert the sensor value to current (Amps)
float current = (sensorValue * (5.0 / 1023.0)) / 0.185;
// Print the current value to the Serial Monitor
Serial.print("Current: ");
Serial.print(current);
Serial.println(" A");
// Wait for a short period before reading again
delay(500);
}
Q: Can the sensor measure AC current? A: This sensor is typically designed for DC current measurement. For AC current, a different sensor or additional circuitry may be required.
Q: What is the maximum voltage that can be applied to Vcc? A: The maximum voltage for Vcc should not exceed the specified range in the technical specifications, typically 12V.
Q: How can I increase the measurement range beyond 5A? A: To measure currents higher than 5A, you would need a sensor with a higher current rating or use a shunt resistor with a known value and measure the voltage drop across it.