Smart Home Energy Monitor

by Guillaume Bonamie in Circuits > Raspberry Pi

77 Views, 0 Favorites, 0 Comments

Smart Home Energy Monitor

IMG_7935.jpg

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

Connect the Pi to the Breadboard

Screenshot 2024-06-11 at 11.00.29.png
  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

Connect the Relay

Screenshot 2024-06-11 at 11.10.03.png
  1. vcc to the 5v
  2. GND to the GND
  3. and the in pin to GPIO 27

Connect the Current Sensor

Screenshot 2024-06-12 at 09.17.02.png
  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

Connect the Ldr

Screenshot 2024-06-12 at 09.28.15.png
  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

Connect the Temperature Sensor

Screenshot 2024-06-12 at 09.32.28.png
  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

Connect the Button

Screenshot 2024-06-12 at 09.37.40.png
  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

Connect the LCD

Screenshot 2024-06-12 at 09.59.38.png
  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

Carve Out Disc Player

d5574350-f6d0-4b52-ae09-b7d817c93717.JPG

Cut out the disc player

Cut Out Lcd

564307e5-c74a-4971-80d1-bdd2e8b22190.JPG

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

Spacers

IMG_7897.jpg

Place the spacers on the pre-existing fasteners

Wrap

IMG_7898 2.jpg
IMG_7899 2.jpg

Wrap the top and the bottom in carbon

Attach LCD

IMG_7916.JPG

put the lcd through the hole and glue it in place

Attach Ldr

IMG_7914.JPG

glue the LDR in place

Relay and Current Sensor

IMG_7931.JPG

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

Finish Casing

IMG_7935.jpg

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

Make the Database

EERD.png

Recreate the database using the picture above

Code

Download the code from this link