Introduction: Smart Home Energy Monitor

The project is designed to provide insight to anyone interested in monitoring their energy consumption from electrical appliances. Using the responsive web application, users can view the energy usage of various devices and even remotely turn them on and off. Whether you're a homeowner looking to reduce your energy bill, an environmentally conscious consumer aiming to lessen your ecological footprint, or simply someone curious about how much energy your electric appliances consume, this web application offers a user-friendly and accessible way to gain insight into and control over your energy consumption. With detailed information on the usage of individual devices and the ability to control them remotely, this tool enables users to make conscious choices about their energy usage and contributes to promoting a more sustainable lifestyle.

Supplies

Circuit

  • Raspberry Pi 4 model B
  • Raspberry PI T-cobbler
  • 5V plug
  • relay module 20 amps (SRD-05VDC-SL-C)
  • temperature sensor (DS18B20)
  • light sensor (LDR)
  • current sensor (ACS712)
  • MCP3008
  • Button
  • LCD display
  • socket extension piece in and out
  • jumper wires
  • resistors 4K7 ohm
  • resistors 470 ohm
  • resistors 10K ohm
  • breadboard

Case

  • Playstation 2 slim
  • Dremel
  • carbon wrap
  • mesh
  • spacers
  • screws

Step 1: Connect the Pi to the Breadboard

  1. Connect the T-cobbler with the raspberry pi
  2. Put the cobbler on the breadboard
  3. Connect the 5v, 3v3, and GND to the breadboard


Legend for this project:

  • red = 5v
  • orange = 3v3
  • black = GND
  • blue and cyan = data

Step 2: Connect the Relay

  1. vcc to the 5v
  2. GND to the GND
  3. and the in pin to GPIO 27

Step 3: Connect the Current Sensor

  1. put the MCP3008 on the breadboard
  2. connect the top left to the 3v3
  3. connect the second from left to 3v3
  4. connect the third from the left to the gnd
  5. connect the fourth from the left to SCLK on the pi
  6. connect the fifth from the left to the MISO
  7. connect the sixth from the left to the MOSI
  8. connect the seventh from the left to CE0
  9. connect the eighth from the left to the gnd
  10. vcc from the sensor to 5v
  11. out from the sensor to the second input on the MCP3008
  12. gnd from the sensor to the gnd

Step 4: Connect the Ldr

  1. connect 1 pin to the gnd
  2. connect the second pin to the first input on the MCP3008
  3. and put a 10k ohm resistor to the 3v3

Step 5: Connect the Temperature Sensor

  1. connect the gnd pin to the gnd
  2. connect the put pin to gpio4
  3. connect the vcc pin to the 5v
  4. put a resistor from 4k7 ohm from the out pin to the 5v

Step 6: Connect the Button

  1. connect the one side of the button to the gnd
  2. connect the other side to a 470 ohm resistor
  3. connect the resistor to gpio17

Step 7: Connect the LCD

  1. vss to gnd
  2. vdd to 5v
  3. vo to 100 ohm resistor
  4. the resistor to the gnd
  5. rs to gpio 21
  6. r/w to gnd
  7. E to gpio 20
  8. DB0 to gpio 16
  9. DB1 to gpio 12
  10. DB2 to gpio 25
  11. DB3 to gpio 18
  12. DB4 to gpio 23
  13. DB5 to gpio 24
  14. DB6 to gpio 19
  15. DB7 to gpio 26
  16. A to 5V
  17. K to gnd

Step 8: Carve Out Disc Player

Cut out the disc player

Step 9: Cut Out Lcd

Cut out a hole for the lcd on the top of the ps2

Step 10: Spacers

Place the spacers on the pre-existing fasteners

Step 11: Wrap

Wrap the top and the bottom in carbon

Step 12: Attach LCD

put the lcd through the hole and glue it in place

Step 13: Attach Ldr

glue the LDR in place

Step 14: Relay and Current Sensor

Place the socket extensions in the existing holes of the ps2 and connect them to the current sensor and relay

Step 15: Finish Casing

place the top on the bottom of the ps2 and screw them down

Step 16: Make the Database

Recreate the database using the picture above

Step 17: Code

Download the code from this link