Making your home smart
Turn your home into a smart home
YOU’VE GOT YOUR SMARTPHONE — NOW IT’S TIME FOR A SMART HOME. DRAW ON ALL YOUR SHEDDIE SKILLS TO CREATE A HOME OF THE FUTURE
In this issue of The Shed, I am introducing a series aimed at making our living spaces better and more comfortable.
The projects in the “Smart Home and Internet of Things (IoT) applications” series will include some of the great home automation upgrades that are now available. These projects will involve not just electronics and software but also electromechanics, mechanics, 3D printing, and other sheddie skills such as woodworking.
I get a lot of enjoyment from undertaking these home automation projects and I’m sure you will also enjoy seeing them installed in your home.
“A series aimed at making our living spaces better and more comfortable”
A small budget
I have designed the projects to be as easy as possible, adaptable to very different living spaces. Every project can be undertaken as an independent home automation application, but each module also has the possibility of integration into an IoT home network that would allow all the modules to operate through a single control centre.
The projects will be focused on achieving the best possible results on a small budget. For me, the most challenging aspect in choosing the components has been to keep the total cost of the projects under $1000.
Obviously, as sheddies, we should not only choose exactly how we want to make these objects but we should also depend on our own ability to assemble them.
The software
Every project includes a part dedicated to the software. The choice of the microcontrollers makes it possible to use the popular Arduino IDE to program all of them, while the programs for the Raspberry Pi are developed with Python — powerful and easy to program. For all those readers with little or no experience in software programming, every software project will be available on a GitHub repository, tested and ready to use.
“Every project can be undertaken as an independent home automation application”
Sensors and handmade components
As I have been involved with 3D printing technology for many years, most of the handmade components (supports, cases, etc.) have been designed for 3D printing. The 3D-printable STL files will be available on the GitHub repository, but any alternative to 3D printing can be adopted as well.
The sensors I plan to use in the projects are open-source cheap devices that in most cases can be wired directly to the pins of the microcontroller boards without extra components.
The home automation plan
To make things easy, I have divided the ideal living environments into ‘node modules’ — every module will cover one aspect of home automation. I have taken particular care of two important aspects in the design: the security and the feedback.
Commercial home automation solutions are frequently limited to generating alarms, locally or remotely, that eventually send messages to your smartphone: fire and smoke detection, overheating control, gas detection, and so on. On the contrary, every model
of the Smart Home Global Project includes, together with alarms and notifications, immediate feedback so that the source of the risk can be dealt with as soon as possible.
Coordinating all the projects — they come from a single global design — simplifies the Wi-Fi connection of each node. I have tried to ensure that anyone who wants to modify one or more of the projects to their personal living environment will be able to integrate the project into a local IoT network and eventually store some of the information in the cloud.
As the cloud reference I adopted the AWS (Amazon Web Server)
IoT cloud service; it is sufficiently secure, available worldwide, and offers reliable options to implement a personal cloud Smart Home Network at no cost. In the articles discussing the cloud connection, I will guide readers on how to use the Amazon Web Services IoT cloud services efficiently at no cost or, at least, at a ridiculous price. This is because this personal Smart Home project — limited to the use of the essential data — generates so little traffic that the free plans offered by Amazon are more than sufficient to do the job.
An in-depth look at the project
As mentioned, I have split an ideal home automation design into different ‘nodes’.
Every node refers to a specific aspect of the home that should be controlled or that can generate an alarm when a risky or potentially dangerous situation is detected. Nodes are functional areas of the home and can include more than a single device. The important characteristic of a node is that it can be considered a ‘controllable unit’: a group of IoT devices (boards and sensors) that can be identified on the network as a single IoT object.
The reason is that these devices — corresponding to different projects able to act independently — are connected to each other inside the same node, and the notifications or alarms generated are the result of the interaction of all the node components.
Below are some insights into how the nodes are designed, analyzing one of the first nodes I will present in the upcoming issues.
Node one — doorbell
This node includes everything related
“anyone … will be able to integrate the project into a local IoT network”
to the main door entrance. It will include three different projects.
1. When someone comes to the door and no one is home, the doorbell informs the guest of this and the guest can request a phone call to the owner. This project will be carried out with an Arduino and a 3G mobile phone module.
2. Known guests — persons registered as authorized to access the home — can enter their four-number pin on the numeric keypad. In a few seconds they will receive another pin that can be used just once to unlock the door. This is a secure two-way password.
3. Direct access with a BBC micro:bit used as an electronic key.
Node two — door opener
The door opener is exclusively operated by the control centre, upon an authorized request of the doorbell or directly from the control centre’s ‘open door’ button.
Node three — environmental control
For now the definition of ‘home environment’ is limited to temperature and humidity, but it can be extended. The environmental control node has direct feedback on the fans for air circulation and the heating system. The temperature and humidity are taken by several sensors in different home locations and the values are mediated. The temperature feedback is regulated according to the season, the presence of persons, and the rooms where the persons are.
Node four — lighting control
The lighting control is not only a way to control the lights remotely; it is also designed to turn off the lights in a room when there is no person present. It also has other features.
Node five — appliances
Depending on the availability of some components within a decent time frame (I am still awaiting delivery of some of the kitchen appliances) these will be controlled automatically and will be able to be activated from a remote. If I receive the water pump and some other parts in time, the appliances node should also be able to control plant humidity and the watering system.
Node six — alarms
The alarms node takes care of situations that may pose a risk to home security, such as detecting a gas leak. The alarms node should also provide direct feedback so that this risky state of affairs can be remedied, and keep the alarm setting on high until it has been reset by the control centre.
Node seven — the cloud
This is the implicit node coincident with the control centre machine, with the role of publishing on the AWS cloud the strategic information collected locally from the other nodes.
What we will learn
I hope that this series of articles will provide the opportunity to learn new skills and techniques with some new approaches to some of the most popular platforms. The term ‘home automation’ covers a wide range of possible applications, and the projects will offer the possibility of exploring interesting aspects of microcontrollers, sensors, and embedded devices. As each project develops, we will learn or review our knowledge of different techniques and technologies:
• Programming the ESP8266 inexpensive family of microcontrollers to connect physical devices to the network — in particular, how to control actuators and read sensors from the web browser
• Some advanced programming
“I will guide readers on how to use the AWS IoT cloud services efficiently at no cost”
techniques on programming Arduino and how to communicate between different microcontroller boards. We will also see how it is possible to interface the Arduino boards to a GSM/3G capable device without a great effort
• How to interface actuators and relays to automate the behaviour of some home appliances with simple hackings with microcontrollers
• How to make IoT communication secure when exchanging critical information
• How to design and create custom implementation of electromechanics to the real world
In the next issue
The first project we will tackle is the door-lock opener based on an inexpensive ESP8266 and an electromechanical door lock.
Stand by!