3.4. Smart Energy Consumption Monitor
| Description | In this project, learners will create a Smart Energy Consumption Monitor that simulates monitoring electrical appliance usage. A potentiometer represents varying power consumption levels, while LEDs indicate low, medium, and high energy usage. An LCD displays the current energy level. This project introduces monitoring systems used in smart homes and energy management applications. |
|---|---|
| Use case | This project is connected to real-world uses such as: This project demonstrates how monitoring systems categorize and visualize resource consumption. Similar systems are used in smart meters and home energy dashboards. |
Components (Things You will need)
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|---|---|---|---|---|---|---|---|
Building the circuit
Things Needed:
- Arduino Uno
- Potentiometer
- I2C LCD Display
- Red LED
- Yellow LED
- Green LED
- 220Ω Resistors
- Breadboard
- Jumper Wires
- Arduino USB Cable
Mounting the component on the breadboard and wiring the circuit
Step 1: Identify the Arduino Uno, potentiometer, I2C LCD display, red LED, yellow LED, green LED, three 220 Ω resistors, breadboard, and jumper wires.
Step 2: Place the potentiometer on the breadboard, ensuring its three pins are connected to separate rows.
Step 3: Place the green, yellow, and red LEDs on the breadboard in separate rows, noting that the longer leg is the anode (+) and the shorter leg is the cathode (−).
Step 4: Connect the Arduino Uno’s 5V pin to the breadboard’s positive (+) power rail.
Step 5: Connect the Arduino Uno’s GND pin to the breadboard’s negative (−) ground rail.
Step 6: Connect the potentiometer’s left pin to the breadboard’s GND rail.
Step 7: Connect the potentiometer’s middle pin (wiper) to Arduino analog pin A0.
Step 8: Connect the potentiometer’s right pin to the breadboard’s 5V power rail.
Step 9: Connect the I2C LCD’s GND pin to the breadboard’s GND rail.
Step 10: Connect the I2C LCD’s VCC pin to the breadboard’s 5V power rail.
Step 11: Connect the I2C LCD’s SDA pin to Arduino analog pin A4.
Step 12: Connect the I2C LCD’s SCL pin to Arduino analog pin A5.
Step 13: Connect Arduino digital pin 6 to the green LED’s anode (long leg).
Step 14: Connect a 220 Ω resistor from the green LED’s cathode (short leg) to the breadboard’s GND rail.
Step 15: Connect Arduino digital pin 7 to the yellow LED’s anode (long leg).
Step 16: Connect a 220 Ω resistor from the yellow LED’s cathode (short leg) to the breadboard’s GND rail.
Step 17: Connect Arduino digital pin 8 to the red LED’s anode (long leg).
Step 18: Connect a 220 Ω resistor from the red LED’s cathode (short leg) to the breadboard’s GND rail.
Step 19: Check all connections carefully to ensure that the power, ground, LCD, potentiometer, LEDs, and resistors are connected correctly before powering the Arduino.

Make sure to connect the Arduino USB cable to the Arduino board.
PROGRAMMING
Step 1: Open your Arduino IDE. See how to set up here: Getting Started.
Step 2: Write the complete program implementing the system logic with appropriate pin definitions, setup configuration, and the main control loop.
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// Create LCD object
LiquidCrystal_I2C lcd(0x27,16,2);
// Potentiometer pin
int energyPin = A0;
// LED pins
int greenLED = 6;
int yellowLED = 7;
int redLED = 8;
void setup() {
lcd.init();
lcd.backlight();
pinMode(greenLED, OUTPUT);
pinMode(yellowLED, OUTPUT);
pinMode(redLED, OUTPUT);
}
void loop() {
// Read energy level
int energyValue = analogRead(energyPin);
// Display value
lcd.setCursor(0,0);
lcd.print("Energy:");
lcd.print(energyValue);
lcd.print(" ");
// Low usage
if(energyValue < 350){
digitalWrite(greenLED,HIGH);
digitalWrite(yellowLED,LOW);
digitalWrite(redLED,LOW);
lcd.setCursor(0,1);
lcd.print("Low Usage ");
}
// Medium usage
else if(energyValue < 700){
digitalWrite(greenLED,LOW);
digitalWrite(yellowLED,HIGH);
digitalWrite(redLED,LOW);
lcd.setCursor(0,1);
lcd.print("Medium Usage ");
}
// High usage
else{
digitalWrite(greenLED,LOW);
digitalWrite(yellowLED,LOW);
digitalWrite(redLED,HIGH);
lcd.setCursor(0,1);
lcd.print("High Usage ");
}
delay(300);
}
Step 3: Save your code. See the Getting Started section
Step 4: Select the arduino board and port _See the Getting Started
Step 5: Upload your code.
CONCLUSION
When the program is running, the Smart Energy Consumption Monitor continuously monitors user input and sensor readings. The display updates with the current system status, while connected outputs such as the LED, buzzer, servo, motor, relay, or RGB LED respond according to the program logic. When a predefined threshold or event is detected, the system provides appropriate visual, audible, or movement-based feedback to indicate the condition.







