Reader small image

You're reading from  Home Automation with Intel Galileo

Product typeBook
Published inMar 2015
Publisher
ISBN-139781785285776
Edition1st Edition
Tools
Right arrow
Author (1)
Onur Dundar
Onur Dundar
author image
Onur Dundar

Onur Dundar is a software engineer who graduated from the Computer Engineering Department of Boazii University. He started working on embedded systems while he was at the university, and in his senior year project, he worked with wireless sensor networks for security and health monitoring. Onur started his career at JPMorgan Chase & Co. Then, he worked at Intel Corporation for 4 years as a software application engineer. He has specialized in embedded Linux and mostly worked on IPTV platforms, Android, as well as IoT platforms, such as Intel Galileo and Edison, and has developed applications for them. He has also helped software developers enhance their applications on these platforms. He has attended many conferences and developer events to introduce Intel Galileo and Edison. He developed the first application and wrote the public collaterals of Intel Edison when he worked at Intel Corporation. Onur is continuing his career at Invent Analytics, implementing algorithms for data analytics.
Read more about Onur Dundar

Right arrow

Chapter 3. Energy Management with Environmental and Electrical Sensors

Energy management is one of the major purposes of home automation together with home security and surveillance. Energy management means saving and using energy efficiently in residential areas so that you can reduce electricity consumption and create a green, energy saving house.

In this chapter, we will learn how to connect sensors to Intel Galileo and develop C applications that will give us the ability to develop specific devices only with Intel Galileo.

After you learn how to develop applications for Intel Galileo with a sample application, we will follow up with controlling electrical switches remotely to control the energy consumption of our home.

Delving into energy management


Energy management is about managing devices that consume energy in order to save energy and control their consumption. Saving energy will lead to the more efficient usage of resources and will reduce consumption. For energy management in Smart Homes, there are sensors that help you control devices to power them on or off.

Many sensors and devices are being produced for energy management purposes. Temperature sensors and energy meters are key sensors; relay switches and dimmers are essential actuators of energy management systems. You can either get a sensor and develop your own device to embed into your home, or you can directly buy devices to embed into your home and control them.

There are wall plugs with both energy meters and on/off switches, and lamp holders with switches and dimmers. Other sensors can be integrated with the energy management system to make them work more efficiently and automatically. Temperature, motion, or light sensors can be used to...

Developing sensor-based applications with Intel Galileo


Let's start with learning how to use sensors with Intel Galileo. In this section, we will develop an application with Intel Galileo. We pick the temperature and humidity sensors for application development because knowing the temperature of your house is the key to energy management. With temperature data, you can decide whether to switch on or switch off the heater or air conditioner in your home to save energy.

In order to get temperature data, we will use a new device: the Sensirion SHT11 Temperature and Humidity Sensor. We will connect this sensor to Intel Galileo's pinout to read temperature and relative humidity values. All the development will be done with the C programming language and Linux operating system, as mentioned earlier.

When we are finished with this section, you will have the knowledge to use pins on Intel Galileo and GPIO device files in the Linux filesystem. These methods can be reused for other sensors and devices...

Energy management with remote switches


Remote switches are another key component required to automate your home. A remote switch gives the ability to remotely switch on and switch off if the plugged device is required to be open or closed. Some remote switches also have energy meters on them that provide the amount of consumed energy to the user.

We have a remote wall plug from Fibaro that uses the Z-Wave protocol to communicate. The Fibaro wall plug has a relay switch to turn it on/off and an energy meter to provide a power consumption value. You can see the device in the following image:

We will try to switch it on and off by sending basic commands through a Z-Wave controller. We will use the Aeon Labs Z-Stick S2 USB adapter for our controller. As Intel Galileo has a USB host port, we will connect the Z-Wave controller from Intel Galileo's USB host. The Z-Wave USB adapter uses serial communication when it's on a host device, and so we will implement a couple of C functions to create communication...

Summary


During the course of this chapter, we have tried to develop two simple applications. First, we have gone over all the C application development steps for a temperature sensor and talked about the importance of temperature data in home automation. We also measured relative humidity from the sensor, which it already calculates.

Then we discussed remote switches and tried to work on a device that exists in the market. In order to work on this remote switch, we included a controller sensor to communicate via the serial protocol with Intel Galileo. In order to make our application work with serial devices, we learned about building kernel modules for new devices attached to Intel Galileo.

Finally, we implemented functions to help us send and receive data from the serial Z-Wave controller and tried our samples to control energy consumption values from the remote wall plug.

In the next chapter, we will cover more on remote switches, that control light bulbs and lamp holders, and get more information...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Home Automation with Intel Galileo
Published in: Mar 2015Publisher: ISBN-13: 9781785285776
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Onur Dundar

Onur Dundar is a software engineer who graduated from the Computer Engineering Department of Boazii University. He started working on embedded systems while he was at the university, and in his senior year project, he worked with wireless sensor networks for security and health monitoring. Onur started his career at JPMorgan Chase & Co. Then, he worked at Intel Corporation for 4 years as a software application engineer. He has specialized in embedded Linux and mostly worked on IPTV platforms, Android, as well as IoT platforms, such as Intel Galileo and Edison, and has developed applications for them. He has also helped software developers enhance their applications on these platforms. He has attended many conferences and developer events to introduce Intel Galileo and Edison. He developed the first application and wrote the public collaterals of Intel Edison when he worked at Intel Corporation. Onur is continuing his career at Invent Analytics, implementing algorithms for data analytics.
Read more about Onur Dundar