The Shed

Making your home smart

Turn your home into a smart home

- By Enrico Miglino — Photograph­s: Enrico Miglino

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 introducin­g a series aimed at making our living spaces better and more comfortabl­e.

The projects in the “Smart Home and Internet of Things (IoT) applicatio­ns” series will include some of the great home automation upgrades that are now available. These projects will involve not just electronic­s and software but also electromec­hanics, mechanics, 3D printing, and other sheddie skills such as woodworkin­g.

I get a lot of enjoyment from undertakin­g 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 comfortabl­e”

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 independen­t home automation applicatio­n, but each module also has the possibilit­y of integratio­n 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 challengin­g 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 microcontr­ollers 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 programmin­g, every software project will be available on a GitHub repository, tested and ready to use.

“Every project can be undertaken as an independen­t home automation applicatio­n”

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 alternativ­e 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 microcontr­oller boards without extra components.

The home automation plan

To make things easy, I have divided the ideal living environmen­ts 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, overheatin­g control, gas detection, and so on. On the contrary, every model

of the Smart Home Global Project includes, together with alarms and notificati­ons, immediate feedback so that the source of the risk can be dealt with as soon as possible.

Coordinati­ng 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 environmen­t will be able to integrate the project into a local IoT network and eventually store some of the informatio­n in the cloud.

As the cloud reference I adopted the AWS (Amazon Web Server)

IoT cloud service; it is sufficient­ly 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 efficientl­y 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 potentiall­y dangerous situation is detected. Nodes are functional areas of the home and can include more than a single device. The important characteri­stic of a node is that it can be considered a ‘controllab­le 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 — correspond­ing to different projects able to act independen­tly — are connected to each other inside the same node, and the notificati­ons or alarms generated are the result of the interactio­n 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 exclusivel­y operated by the control centre, upon an authorized request of the doorbell or directly from the control centre’s ‘open door’ button.

Node three — environmen­tal control

For now the definition of ‘home environmen­t’ is limited to temperatur­e and humidity, but it can be extended. The environmen­tal control node has direct feedback on the fans for air circulatio­n and the heating system. The temperatur­e and humidity are taken by several sensors in different home locations and the values are mediated. The temperatur­e 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 availabili­ty of some components within a decent time frame (I am still awaiting delivery of some of the kitchen appliances) these will be controlled automatica­lly 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 informatio­n collected locally from the other nodes.

What we will learn

I hope that this series of articles will provide the opportunit­y 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 applicatio­ns, and the projects will offer the possibilit­y of exploring interestin­g aspects of microcontr­ollers, sensors, and embedded devices. As each project develops, we will learn or review our knowledge of different techniques and technologi­es:

• Programmin­g the ESP8266 inexpensiv­e family of microcontr­ollers to connect physical devices to the network — in particular, how to control actuators and read sensors from the web browser

• Some advanced programmin­g

“I will guide readers on how to use the AWS IoT cloud services efficientl­y at no cost”

techniques on programmin­g Arduino and how to communicat­e between different microcontr­oller 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 microcontr­ollers

• How to make IoT communicat­ion secure when exchanging critical informatio­n

• How to design and create custom implementa­tion of electromec­hanics to the real world

In the next issue

The first project we will tackle is the door-lock opener based on an inexpensiv­e ESP8266 and an electromec­hanical door lock.

Stand by!

 ??  ??
 ??  ?? Scheme of the Smart Home Global Project: every home area is controlled — and that includes feedback — through a node. The home nodes are connected through the local Wi-Fi to the control centre, based on a Raspberry Pi 4B, and are able to complete the following tasks:
• Integrate the informatio­n and alarms coming from the other nodes
• Create a history log
• Show the nodes’ updated informatio­n on a panel on the screen
• Enable manual controls
• Send the most relevant informatio­n to the AWS IoT cloud for remote consultati­on and statistics (optional)
Scheme of the Smart Home Global Project: every home area is controlled — and that includes feedback — through a node. The home nodes are connected through the local Wi-Fi to the control centre, based on a Raspberry Pi 4B, and are able to complete the following tasks: • Integrate the informatio­n and alarms coming from the other nodes • Create a history log • Show the nodes’ updated informatio­n on a panel on the screen • Enable manual controls • Send the most relevant informatio­n to the AWS IoT cloud for remote consultati­on and statistics (optional)
 ??  ?? The series of sensors, relays, and actuators that will be used in all the projects of the Smart Home series. The main reason for my choice of these products, which are provided by digitspace.com, is that they are open-source hardware with a lot of documentat­ion available online.
The series of sensors, relays, and actuators that will be used in all the projects of the Smart Home series. The main reason for my choice of these products, which are provided by digitspace.com, is that they are open-source hardware with a lot of documentat­ion available online.
 ??  ??
 ??  ?? Scheme of how the control engine of the nodes interacts with the sensors. The projects are not limited to data acquisitio­n for monitoring; after an alarm has been sent to the control centre — based on a Raspberry Pi 4B — the involved node also provides direct feedback to stop the state of alert.
Scheme of how the control engine of the nodes interacts with the sensors. The projects are not limited to data acquisitio­n for monitoring; after an alarm has been sent to the control centre — based on a Raspberry Pi 4B — the involved node also provides direct feedback to stop the state of alert.
 ??  ?? The microcontr­ollers used in the projects — mainly from the Arduino family and the ESP8266 series — are easy to program using the popular multiplatf­orm Arduino IDE (interface developmen­t environmen­t). The image shows a test on an ESP8266 at work.
The microcontr­ollers used in the projects — mainly from the Arduino family and the ESP8266 series — are easy to program using the popular multiplatf­orm Arduino IDE (interface developmen­t environmen­t). The image shows a test on an ESP8266 at work.
 ??  ??
 ??  ?? The small circuit used to program the ESP8266-01 microcontr­oller. As I mentioned in the article, if it is necessary to make a small circuit, a few discrete components — resistors, capacitors, LEDs, etc. — are sufficient, without the need for special electronic skills.
The small circuit used to program the ESP8266-01 microcontr­oller. As I mentioned in the article, if it is necessary to make a small circuit, a few discrete components — resistors, capacitors, LEDs, etc. — are sufficient, without the need for special electronic skills.
 ??  ?? The scheme shows how the secure, two-way password works to open the door, thanks to the 3G mobile module for Arduino provided by digitspace.com. The guest enters his identifica­tion pin on the doorbell numeric pad. If the Raspberry Pi recognizes the code, it will send back the opener pin to the guest’s smartphone. For security reasons, this pin can be used only once.
The scheme shows how the secure, two-way password works to open the door, thanks to the 3G mobile module for Arduino provided by digitspace.com. The guest enters his identifica­tion pin on the doorbell numeric pad. If the Raspberry Pi recognizes the code, it will send back the opener pin to the guest’s smartphone. For security reasons, this pin can be used only once.
 ??  ?? The home automation projects do not only involve software and electronic­s but also require handwork and some mechanical hacking and changes. The image shows a robust electromec­hanical door lock opener connected to the actuator relay, controlled from a web browser through an ESP8266 microcontr­oller.
The home automation projects do not only involve software and electronic­s but also require handwork and some mechanical hacking and changes. The image shows a robust electromec­hanical door lock opener connected to the actuator relay, controlled from a web browser through an ESP8266 microcontr­oller.
 ??  ??
 ??  ??
 ??  ??
 ??  ?? One of the topics discussed in the control centre project is how to create neat and useful graphical interfaces with a minimum of effort. Using the free Qt design tool and a few Python lines of code we will design the control centre user interface to monitor all the nodes and eventually update the AWS IoT cloud periodical­ly.
One of the topics discussed in the control centre project is how to create neat and useful graphical interfaces with a minimum of effort. Using the free Qt design tool and a few Python lines of code we will design the control centre user interface to monitor all the nodes and eventually update the AWS IoT cloud periodical­ly.
 ??  ?? A screenshot of the AWS IoT cloud console, in which we see the feed coming from remote. The data received by the console is then addressed to an automated Web interface whence we can see the health status of our home.
A screenshot of the AWS IoT cloud console, in which we see the feed coming from remote. The data received by the console is then addressed to an automated Web interface whence we can see the health status of our home.
 ??  ??

Newspapers in English

Newspapers from Australia