Introduction
I have been always cautions with the energy I use at home. I don't like waste and in my family I have always been the one who always turn off the lights in the house. For this project, I actually want to make a Smart Home Energy Management System (SHEMS) to control LED lights and maybe even a fan to reduce the waste of energy consumption. I have 2 LED strips in my bathroom which are always on every time I go there. One LED strip is attached on top of the bathroom and the other one around the mirror cabinet on top of the sink. I don't need both of them on all the time I use the bathroom so it would be nice to add some sensors and control automatically the lights depending what I am doing the in bathroom.
Top LED lights
Mirror LED light (You can see the remote controller of the lights)
Switch for the two LED lights (They use the same microcontroller but then are separated into two strips)
The voltage regulator (240V to 12V) and the microcontroller on top of the mirror cabinet.
Sensors
This is the list of the sensors and the activities they should detect:
- Infrared temperature sensor: detect if somebody enters the bathroom to turn on the top LED lights and turn on the camera;
- Temperature & Humidity sensor V2.0 (DHT20): detect if I am doing a shower to turn on the top LED lights, half the mirror LED lights, turn on the fan to filter the humidity, and turn on/off the camera;
- Nicla Vision Board: detect if I am washing my hands to turn off the top LED lights and turn on the mirror LED lights (I got this board from an element14 event. Although I think it would be great to use just the camera to detect if somebody entered and is doing a shower I wouldn't feel comfortable knowing a camera is watching me during my private time).
Tasks
On my next blog, I will be connecting the RGB LED lights I have in my bathroom with the Arduino Microcontroller Board, SAMD21G18. I will be following this tutorial:
https://learn.adafruit.com/rgb-led-strips/usage
Since I have two strips, I will need double the MOSFETs. This will require to use mostly all the GPIO pins of the Arduino board but luckily I can use the Nicla Vision Board for the other sensors.
The Arduino Microcontroller support UART and I think it is the best way to communicate for this case scenario since it only uses 2 GPIO pins and it doesn't have any clock. For my third post, I will be writing about connecting the Arduino microcontroller with the Nical Vision board via UART. The Nicla Vision Board should be able to send messages to the Arduino microcontroller to turn on or off the LED lights. If the blog is too short, I will be writing also to create a machine learning model to detect whenever I am washing hands with the camera. I will be following this tutorial to create a custom machine learning model:
https://docs.edgeimpulse.com/docs/tutorials/continuous-motion-recognition
Following, I will be writing another blog post about the other two sensors connected to the Nicla Vision Board. The infrared temperature sensors seems to use very few energy so it is ideal to make it run all the time instead of the camera. Once the infrared temperature sensor detect somebody in the bathroom, the top LED lights should turn on the camera as well to detect if I am washing my hands. I have described above what the DHT20 should do.
Options
Other things I can include in the project are:
- Raspberry Pi4: detect the power consumption in real time and control the LED lights remotely as well;
- Fan: Remove the humidity while showering (I have a big fan in my bathroom that is activated every time the lights, not the LED lights, are turn on for more than 1 minute and it is deactivated after 5 minutes the lights are off. It is really annoying because I don't need the fan on all the time I turn on the lights so it would be nice if the SHEMS could actually detect when it is needed);
- OpenAI API: send all the data to OpenAI API to improve the energy consumption thanks to AI to detect pattern and preferences;
Conclusions
This project could be integrated with other smart home devices, such as smart thermostats or lighting systems, to create a fully automated and energy-efficient home environment. Overall, this project has the potential to significantly reduce energy consumption and promote sustainability while also leveraging the power of AI and machine learning.
The goal for this project should be to reduce energy consumption so I should find a way to calculate how much energy I am using with the SHEMS and compare it with every day usage of my regular LED lights. Probably I can do something with the Raspberry Pi4 but let me know if there is another way to actually calculate power usage while operating the SHEMS.
I will be working more in September since now I am unable to retrieve the kit or to work with my LED lights so more blog posts later. In the meantime, let me know if you have any suggestions.