Smart Home Energy Monitor
by Guillaume Bonamie in Circuits > Raspberry Pi
156 Views, 2 Favorites, 0 Comments
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
Connect the Pi to the Breadboard
- Connect the T-cobbler with the raspberry pi
- Put the cobbler on the breadboard
- 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
- vcc to the 5v
- GND to the GND
- and the in pin to GPIO 27
Connect the Current Sensor
- put the MCP3008 on the breadboard
- connect the top left to the 3v3
- connect the second from left to 3v3
- connect the third from the left to the gnd
- connect the fourth from the left to SCLK on the pi
- connect the fifth from the left to the MISO
- connect the sixth from the left to the MOSI
- connect the seventh from the left to CE0
- connect the eighth from the left to the gnd
- vcc from the sensor to 5v
- out from the sensor to the second input on the MCP3008
- gnd from the sensor to the gnd
Connect the Ldr
- connect 1 pin to the gnd
- connect the second pin to the first input on the MCP3008
- and put a 10k ohm resistor to the 3v3
Connect the Temperature Sensor
- connect the gnd pin to the gnd
- connect the put pin to gpio4
- connect the vcc pin to the 5v
- put a resistor from 4k7 ohm from the out pin to the 5v
Connect the Button
- connect the one side of the button to the gnd
- connect the other side to a 470 ohm resistor
- connect the resistor to gpio17
Connect the LCD
- vss to gnd
- vdd to 5v
- vo to 100 ohm resistor
- the resistor to the gnd
- rs to gpio 21
- r/w to gnd
- E to gpio 20
- DB0 to gpio 16
- DB1 to gpio 12
- DB2 to gpio 25
- DB3 to gpio 18
- DB4 to gpio 23
- DB5 to gpio 24
- DB6 to gpio 19
- DB7 to gpio 26
- A to 5V
- K to gnd
Carve Out Disc Player
Cut out the disc player
Cut Out Lcd
Cut out a hole for the lcd on the top of the ps2
Spacers
Place the spacers on the pre-existing fasteners
Wrap
Wrap the top and the bottom in carbon
Attach LCD
put the lcd through the hole and glue it in place
Attach Ldr
glue the LDR in place
Relay and Current Sensor
Place the socket extensions in the existing holes of the ps2 and connect them to the current sensor and relay
Finish Casing
place the top on the bottom of the ps2 and screw them down
Make the Database
Recreate the database using the picture above
Code
Download the code from this link