create account

Raspberry Pi Home Automation Part IV by robingreig

View this thread on: hive.blogpeakd.comecency.com
· @robingreig ·
$0.33
Raspberry Pi Home Automation Part IV
[In my first post](https://stemgeeks.net/hive-163521/@robingreig/raspberry-pi-home-automation) I went over the layout of my Raspberry Pi home automation system. [In my second post](https://stemgeeks.net/hive-163521/@robingreig/raspberry-pi-home-automation-part-ii) I went into a little bit more detail on the Power Supply and Raspberry Pi. [In my third post](https://stemgeeks.net/hive-163521/@robingreig/raspberry-pi-home-automation-part-iii) I described my MOSFET controller board that I used to control the LED light strips that I have installed in the toe kick area of my kitchen and bathroom cupboards. Here are a couple of pics of the lights in action;

![Bathroom.jpg](https://images.hive.blog/DQmfF7G3tyW2JyENnKZYpTjzLo5uo18gRokR6Dbx7cUmLbR/Bathroom.jpg)

![Island.jpg](https://images.hive.blog/DQmZFDU8vK9WKRgKK1jC5fiSxjnPwxwWoNbPHRjwpq29ik9/Island.jpg)

![Oven.jpg](https://images.hive.blog/DQmNWJ6CbfZ7qu4KXs6kb9eU5gZrYRCMastm8FKxcLq4f7x/Oven.jpg)

So the MOSFET board is great at turning the 5V or 12V from the power supply on or off to a device such as the LED lights. The MOSFET's could also be used to dim the LED lights via PWM (Pulse Width Modulation) from the Pi.

But what if you want to control a different device that has a separate power source not connected to your raspberry pi? That is where I use these small relays:

![RelayBoard.jpg](https://images.hive.blog/DQmXTbhEkZAGQfwSenvWHTczA7YXdCP56FaEV3WuuUwzhVU/RelayBoard.jpg)

In Canada we use a forced air furnace to heat the house in the winter, and our hobby room is downstairs where it is a little cooler. So the solution is to turn the furnace fan on to circulate the warm air more evenly throughout the house. The circuit board in the furnace has a set of contacts that when shorted out (with a switch) will turn the fan on, and I'm using this relay as a remote controlled switch! The orange and green wires you see coming out of the bottom of the relay board are connected to the NO (Normally Open) contacts on the relay and to the Fan Override contacts on the furnace circuit board. The second relay (#8) is a spare for future use. 
Previously, I showed how I used MOSFET's to isolate and amplify the outputs of the Raspberry Pi. The small black IC's (Integrated Circuits) above the blue relays are opto-isolators which perform a similar function. They optically (via a LED & opto-coupler inside) isolate the output from the Pi GPIO pin from the relay coil. They are great, but they don't handle much current, so I couldn't use them to drive my LED light strips. I purchased these relay boards from ebay.ca and I've seen them as single, double, quad and even 8 relay boards.

***** One word of warning, be very, very skeptical of the ratings on the top of the blue relays (grin). 10A @ 250V or 125VAC. I have found them to work great with small current loads up to a couple of amps, but I tried to use one to control a 500W halogen lamp ~4A and it worked great for about a month, and then the contacts burned out. In a later post I'll show you a circuit I built where the Pi controls a set of small blue relays, and they in turn control a much larger set of relays to a much higher current load.

In tomorrow's post, I'll go over the Node-Red software I'm using in the Pi and hopefully show you how easy it is to be able to remotely control these devices from your smartphone, or tablet!
Thanks for viewing!
Robin

Posted with [STEMGeeks](https://stemgeeks.net)
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorrobingreig
permlinkraspberry-pi-home-automation-part-iv
categoryhive-163521
json_metadata{"tags":["raspberrypi","electronics","nodered","python3","mqtt","iot","stem","homestead"],"image":["https://images.hive.blog/DQmfF7G3tyW2JyENnKZYpTjzLo5uo18gRokR6Dbx7cUmLbR/Bathroom.jpg"],"links":["https://stemgeeks.net/hive-163521/@robingreig/raspberry-pi-home-automation"],"app":"stemgeeks/0.1","format":"markdown","canonical_url":"https://stemgeeks.net/@robingreig/raspberry-pi-home-automation-part-iv"}
created2021-01-03 14:02:24
last_update2021-01-03 14:02:24
depth0
children5
last_payout2021-01-10 14:02:24
cashout_time1969-12-31 23:59:59
total_payout_value0.164 HBD
curator_payout_value0.162 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,444
author_reputation1,302,463,163,835
root_title"Raspberry Pi Home Automation Part IV"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,200,393
net_rshares2,233,684,727,754
author_curate_reward""
vote details (36)
@hivebuzz ·
Congratulations @robingreig! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s) :

<table><tr><td><img src="https://images.hive.blog/60x70/http://hivebuzz.me/@robingreig/upvoted.png?202101031603"></td><td>You received more than 500 upvotes. Your next target is to reach 600 upvotes.</td></tr>
</table>

<sub>_You can view your badges on [your board](https://hivebuzz.me/@robingreig) and compare yourself to others in the [Ranking](https://hivebuzz.me/ranking)_</sub>
<sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub>



**Do not miss the last post from @hivebuzz:**
<table><tr><td><a href="/hivebuzz/@hivebuzz/pud-202101-feedback"><img src="https://images.hive.blog/64x128/https://i.imgur.com/xQGM37X.png"></a></td><td><a href="/hivebuzz/@hivebuzz/pud-202101-feedback">Feedback from the January 1st Hive Power Up Day</a></td></tr><tr><td><a href="/hivebuzz/@hivebuzz/update-202101"><img src="https://images.hive.blog/64x128/https://i.imgur.com/GZV4AF7.png"></a></td><td><a href="/hivebuzz/@hivebuzz/update-202101">Happy New Year - Project Activity Update</a></td></tr></table>
properties (22)
authorhivebuzz
permlinkhivebuzz-notify-robingreig-20210103t161829000z
categoryhive-163521
json_metadata{"image":["http://hivebuzz.me/notify.t6.png"]}
created2021-01-03 16:18:30
last_update2021-01-03 16:18:30
depth1
children0
last_payout2021-01-10 16:18:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,188
author_reputation367,970,703,369,846
root_title"Raspberry Pi Home Automation Part IV"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,202,101
net_rshares0
@wwwiebe ·
I've just caught up on your home-automation posts and I'm suitably impressed. I'm currently in the midst of building out a raspberry-pi based Zoom/Google Meet conference setup for the front room. I love to see how pi's and arduino's can be used in all sorts of purposes.

Definitely looking forward to your Node-Red configuration! I'm a big fan of Node-Red and use it almost everywhere I go. I have one instance where I'm using it to receive logs, parse them, and place them into a db. Very useful and versatile!
👍  
properties (23)
authorwwwiebe
permlinkre-robingreig-qmd9gt
categoryhive-163521
json_metadata{"tags":["hive-163521"],"app":"peakd/2020.12.3"}
created2021-01-03 16:22:06
last_update2021-01-03 16:22:06
depth1
children3
last_payout2021-01-10 16:22:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length512
author_reputation318,663,954,734,459
root_title"Raspberry Pi Home Automation Part IV"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,202,157
net_rshares19,745,950,976
author_curate_reward""
vote details (1)
@robingreig ·
Thanks @wwwiebe for the feedback! Please let me know how your build goes for the Pi based Zoom/Google setup? And I wouldn't mind seeing your config for receiving and parsing the log files..... I can think of several applications for that!!!
I've been using Node-Red for about a year now, and I still think I'm a noob! There is so much power in the graphics based programming..... well you know!
The one device that cannot utilize Node-Red is the Pi ZeroW. If I recall correctly the processor cannot run the necessary version of npm or node.js (I think?) and so I've started learning mqtt and have a Pi running mosquitto that my Node-Red devices can interface with as well as my Pi ZeroW devices via Python3
properties (22)
authorrobingreig
permlinkqmdby9
categoryhive-163521
json_metadata{"tags":["stem"],"users":["wwwiebe"],"app":"stemgeeks/0.1","canonical_url":"https://stemgeeks.net/@robingreig/qmdby9"}
created2021-01-03 17:15:45
last_update2021-01-03 17:15:45
depth2
children2
last_payout2021-01-10 17:15:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length706
author_reputation1,302,463,163,835
root_title"Raspberry Pi Home Automation Part IV"
beneficiaries
0.
accounthiveonboard
weight100
1.
accountpeakd
weight300
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,202,833
net_rshares0
@wwwiebe ·
I've had nothing but issues with running Node-Red on a PiZero, too. I like the idea of using mqtt instead! I've put a project on hold and might need to revisit with mqtt. I'll see if I can make a post on that soon!
👍  
properties (23)
authorwwwiebe
permlinkre-robingreig-qme0hg
categoryhive-163521
json_metadata{"tags":["hive-163521"],"app":"peakd/2020.12.3"}
created2021-01-04 02:05:39
last_update2021-01-04 02:05:39
depth3
children1
last_payout2021-01-11 02:05:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length214
author_reputation318,663,954,734,459
root_title"Raspberry Pi Home Automation Part IV"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id101,208,345
net_rshares19,234,546,439
author_curate_reward""
vote details (1)