Chapter 12. Home Automation Project - Booting a Custom Image

The Internet of Things is a very hot subject today. Using automation within the home to ease daily tasks has gained more importance than ever. The Raspberry Pi, due to its size, price, and the possibilities to easily connect it to other electronics equipment, is a very good choice for making small home automation projects. This chapter will guide you through a small home automation project that will let you set up a remote lighting control system using the Raspberry Pi and then control it remotely with the help of a smartphone. The project will require skills learned in earlier chapters, so this chapter will also act as a summary of all you have learned throughout the book.

The chapter will start with an introduction to our home automation project and the material that is required for it. Then, it will go into the integration of Yocto with our project. This section of the chapter will explain how to set up up the image used by the Raspberry Pi: it will cover things such as creating a new layer containing our new image recipe and adding/modifying packages required for our project. The chapter will end with a section that puts everything together. It will explain how all the physical parts should be connected and how to remote control the device using different devices, such as a smartphone or another Raspberry Pi with touchscreen.

Home automation using a Raspberry Pi

Our home automation project will loosely continue from the "light an LED" example in Chapter 5, Creating, Developing, and Deploying on the Raspberry Pi. It will adapt and evolve that project to create one where the end user can wirelessly light a lamp using a smartphone (or some other device with a web browser).

As illustrated in the following diagram, the idea is to connect a one-channel relay module to the Raspberry Pi, using the GPIO pins. Then, we connect a lamp and an external power source to the relay module, creating a circuit. When everything has been connected, it will be possible to control the relay module (on/off) using GPIO connections from the Raspberry Pi.

Home automation using a Raspberry Pi

A home automation project that enables remote lighting

Material required for the project

You will need the following material for the project:

  • A Raspberry Pi (any model will do)

 The Raspberry Pi Zero requires that you either solder in a GPIO header or solder the wires directly to the GPIO pads

  • Jumper cables (three are required)
  • A one-channel 5V relay module
  • A lamp (preferably a lamp you don't mind splitting and cutting the cable of)
  • An external power supply (preferably 12V)

Note

WARNING: This project requires basic knowledge of electrical circuits. We strongly discourage using high-voltage power if you don't have the knowledge or experience.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.184.113