Raspberry Pi in a case

AUTOMATION AND THE RASPBERRY PI

TECH

The Raspberry Pi is a British charitable foundation of the same name, and aimed at promoting education in computer science.

The simplified computer board started selling to coding enthusiasts and now has sales of 20 million units.

The unit was an attempt at making something cheap and flexible. These devices have been hacked to control robots, drones, and home automation.

Picture of the Raspberry Pi in a case with power and Network cable, attached on top of the Pi is a radio transmitter.

Pi

The Pi starts from $35 and comes with WIFI, 4 USB sockets (+Micro USB), LAN, HDMI, Bluetooth and 1GB LPDDR2 memory.

The result is an amazing, versatile machine, perfect for use as a controller unit.

There are two easy things to try with a Raspberry Pi:

  •          Homemade Arcade Machine
  •          Home Automation and Security

Arcade

The are some starter projects that help Pi inductees understand the components and programs that work with the unit.

A good starting project is adapting the Pi for use as an arcade machine. All the sockets on the board for the controller are there.

Developers have made; Atari, NEC, Sony, Sega, and Nintendo emulators.

Retropie.org.uk and Recalbox.com are open source emulators that can be downloaded to and run off a MicroSD card. It might be the case that some tweaking is required to fit a screen or USB joystick.

After getting the hardware and software ready many enthusiasts build cases for the PI, they are easy to make, or you can buy a simple buy one online. Some people go a bit further and make an entire retro-style arcade game tower to house the unit.

Home automation

Home automation and protection is an expensive business. High-end systems are hard to mess with, cheap systems often route information through sites with poor security.

With the Pi, there are several open source sites that provide software to run your own security and home automation control centre.

Open source programs such as Openhab and Home-assistant are simple-ish to use and adapt.

A small amount of programming knowledge is useful, but the code is generally available from forums on the site for cut and pasting.

A good guide on the topic is Paul Hibbert. A prominent Youtuber that has plenty of explanations on setting up home automation systems. He uses ZIGBEE and other devices including this video on adapting your system with Amazons Alexa.

Home-assistant

For a learner, it would be better to start with Home-assistant, it is easier, there is a lot of pre-written for a cut and paste approach.

The program is easier to change on the fly. Home-assistant has a full dashboard for monitoring changes, such as humidity or movement.

The platform reads infrared changes and displays them on contrast charts. Action levels on the readings can be changed if it is a particularly hot or cold day.

The Pi can take over the chore of ongoing manual changes. The Pi can automate by downloading weather predictions. Then the Pi links up to weather sensors set up around the home adjusting air conditioning units.

Openhab

For a more experienced Pi user, Openhab is the better option, it is a little bit heavy on the programming side. This is a good platform, though it would discourage a first-time user.

Openhab has a  number of add-ons for the platform from programs that initiate a home device on air quality, to  publishing of the information on a social media site

A grove (connector) temp sensor and a gas sensor.
A grove (connector) temp sensor and a gas sensor. AA Battery for scale.

So, to set a scene, you have gone on holiday, and you live in an area with a high rate of air pollution. You can set the add-on to record the levels, and activate all electric windows to be shut, then have the reading sent to your social media page.

Set a different scene, you have a hot water tank that is usually heated by solar panels, it has been cloudy lately, so the immersion heater timer is set.

The Pi can read weather forecasts, to judge if the weather will improve enough to rely on the solar panel, and in turn switch off the immersion timer.

Weather

IFTTT is a good platform to easily instruct with a series of choices. For example, if the weather is hot,  you have the Pi turn on the A/C.

You can go further with the Pi and have a security camera detect for motion of your face, to turn on the TV when you are coming to the door. The IFTTT does require the internet, but it is simple to setup, and can be linked to your Pi home automation if needed.

Home Automation on the Cheap

It is possible to control industry standard products with ZIGBEE or Z-wave controllers. Premium manufacturers such as the Philips Hue Lights, these lights already have, radio or WIFI transmitters.

The same goes for light sockets and other devices from manufacturers that are ZIGBEE of Z-WAVE compliant. There is no need for the manufactures Hub, as the Pi will serve as the controller.

Remember to look at the power adaptors voltage rating, depending on US Power supply or UK power supply.

Check that these manufactured adaptors work with ZIGBEE of Z-wave, otherwise you are going to have many hours of programming fun

Soldering

From this point onward, you may need a bit of soldering knowledge, though you can get by with add-ons that have Grove connectors. You can buy home kits to build all the sensors by yourself.

This kit has 16 sensors modules to detect among other things; humidity, motion, vibration, and many other common sensors modules. You can also use a Hat to send commands via sending a text message from your mobile phone.

Death

Now from this point on, the chance of death high, especially if you do not know what you are doing when it comes to manipulating high voltage home circuits.

It is advisable to rely on simple modules the can radio or IR control certified electronics. (If in doubt call an electrician.

This article is only intended on how to use a Pi to set up security or Home automation, not a guide on protecting your home.) Having said that, these little computers are for creating life hacks.

They are cheap, and great fun for messing about with, so have fun turning your home into a place where you don’t ever have to leave the safety of your sofa.

See the article on THIRD PARTY FIRMWARE & ROUTERS

Channels
WiFi Channels

One thought on “AUTOMATION AND THE RASPBERRY PI

Comments are closed.