Reader small image

You're reading from  Building Smart Homes with Raspberry Pi Zero

Product typeBook
Published inOct 2016
PublisherPackt
ISBN-139781786466952
Edition1st Edition
Right arrow
Author (1)
Marco Schwartz
Marco Schwartz
author image
Marco Schwartz

Marco Schwartz is an electrical engineer, entrepreneur, and blogger. He has a master's degree in electrical engineering and computer science from Supélec, France, and a master's degree in micro engineering from the Ecole Polytechnique Fédérale de Lausanne (EPFL), Switzerland. He has more than five years' experience working in the domain of electrical engineering. Marco's interests center around electronics, home automation, the Arduino and Raspberry Pi platforms, open source hardware projects, and 3D printing. He has several websites about the Arduino, including the Open Home Automation website, which is dedicated to building home automation systems using open source hardware. Marco has written another book on home automation and the Arduino, called Home Automation With Arduino: Automate Your Home Using Open-source Hardware. He has also written a book on how to build Internet of Things projects with the Arduino, called Internet of Things with the Arduino Yun, by Packt Publishing.
Read more about Marco Schwartz

Right arrow

Controlling home appliances


In the final section of this chapter, we are going to see how to control appliances in your home that can only be set to on or off, for example, lamps, but also heaters, coffee machines, and other appliances. In this section, you are going to learn how to control a simple desk lamp using your Raspberry Pi Zero.

Let's first see how to assemble the project. Simply connect the Vin+ pin of the PowerSwitch Tail Kit to the GPIO18 pin on the Raspberry Pi Zero, and the two remaining pins of the PowerSwitch Tail to GND.

The following image shows the final result:

Of course, after this you need to connect a lamp to the project. For that, I used a simple 30W desk lamp. You simply need to connect the appliance you want to control to the female plug of the PowerSwitch Tail, and then connect it to the mains electricity via the male power plug.

We are now going to see how to control the lamp using a simple interface, which will run on our Raspberry Pi. For that, we'll again use...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Building Smart Homes with Raspberry Pi Zero
Published in: Oct 2016Publisher: PacktISBN-13: 9781786466952

Author (1)

author image
Marco Schwartz

Marco Schwartz is an electrical engineer, entrepreneur, and blogger. He has a master's degree in electrical engineering and computer science from Supélec, France, and a master's degree in micro engineering from the Ecole Polytechnique Fédérale de Lausanne (EPFL), Switzerland. He has more than five years' experience working in the domain of electrical engineering. Marco's interests center around electronics, home automation, the Arduino and Raspberry Pi platforms, open source hardware projects, and 3D printing. He has several websites about the Arduino, including the Open Home Automation website, which is dedicated to building home automation systems using open source hardware. Marco has written another book on home automation and the Arduino, called Home Automation With Arduino: Automate Your Home Using Open-source Hardware. He has also written a book on how to build Internet of Things projects with the Arduino, called Internet of Things with the Arduino Yun, by Packt Publishing.
Read more about Marco Schwartz