Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade

How to Monitor Electrical Consumption Using Arduino

Monitoring electrical consumption is crucial for understanding energy usage and identifying opportunities for energy savings. Arduino, with its versatility and ease of use, provides an excellent platform for building a simple and effective electrical consumption monitor. This article will guide you through the process of creating a basic energy monitoring system using an Arduino board and a current sensor.

Examples:

To monitor electrical consumption with Arduino, you will need the following components:

  • An Arduino board (e.g., Arduino Uno)
  • A current sensor (e.g., ACS712)
  • A voltage sensor (optional, for more accurate power calculations)
  • A breadboard and jumper wires
  • A computer with the Arduino IDE installed

Step 1: Set Up the Hardware

  1. Connect the ACS712 current sensor to the Arduino:

    • Connect the VCC pin of the ACS712 to the 5V pin on the Arduino.
    • Connect the GND pin of the ACS712 to the GND pin on the Arduino.
    • Connect the OUT pin of the ACS712 to an analog input pin on the Arduino (e.g., A0).
  2. If using a voltage sensor, connect it similarly to another analog input pin on the Arduino.

Step 2: Write the Arduino Code

Below is a simple Arduino sketch to read the current values from the ACS712 sensor:

const int sensorPin = A0; // Analog pin connected to OUT pin of ACS712
const float sensitivity = 0.185; // Sensitivity for ACS712 5A module (in V/A)
const float Vref = 2.5; // Reference voltage for ACS712

void setup() {
  Serial.begin(9600); // Start serial communication
}

void loop() {
  int sensorValue = analogRead(sensorPin); // Read the analog value
  float voltage = (sensorValue / 1024.0) * 5.0; // Convert to voltage
  float current = (voltage - Vref) / sensitivity; // Calculate current in Amperes

  Serial.print("Current: ");
  Serial.print(current);
  Serial.println(" A");

  delay(1000); // Wait for a second before next reading
}

Step 3: Upload and Test the Code

  1. Connect your Arduino to the computer using a USB cable.
  2. Open the Arduino IDE and paste the above code into a new sketch.
  3. Select the correct board and port from the Tools menu.
  4. Click the "Upload" button to upload the code to the Arduino.
  5. Open the Serial Monitor from the Tools menu to view the current readings.

Step 4: Analyze the Data

The Serial Monitor will display the current values in amperes. To calculate power consumption, you can multiply the current by the voltage (Power = Voltage x Current). If you have connected a voltage sensor, you can read the voltage values similarly and use them for more accurate calculations.

Conclusion

By following these steps, you can create a basic electrical consumption monitor using Arduino. This project can be expanded by adding features like data logging, wireless communication, or integration with home automation systems for more advanced applications.

To share Download PDF

Gostou do artigo? Deixe sua avaliação!
Sua opinião é muito importante para nós. Clique em um dos botões abaixo para nos dizer o que achou deste conteúdo.