Raspberry Pi: 8 Channel Relay step-by-step with software examples for automation

900,852
0
Published 2014-05-24
Check in this section for all the further information relating to this video.

Get the relay here: amzn.to/1zG6Daz
Get the GPIO wires: amzn.to/1VyYIYb
Get the WiFi dongle: amzn.to/1v8L7Ho
And, the Raspberry Pi 2B: amzn.to/1zJlP9L

Get the parts in the UK: bit.ly/15XFRBH

**Remember: Help each other in the comments section. And please repost your code.

Find the scripts here:
Lights1: github.com/skiwithpete/relaypi/blob/master/8port/s…
Lights2: github.com/skiwithpete/relaypi/blob/master/8port/s…
Lights3: github.com/skiwithpete/relaypi/blob/master/8port/s…
Lights4: github.com/skiwithpete/relaypi/blob/master/8port/s…
Lights5: github.com/skiwithpete/relaypi/blob/master/8port/s…

Watch my other Raspberry Pi relay videos:
1 channel relay video:    • Raspberry Pi: 1 Channel Relay control...  
4 channel relay video:    • Raspberry Pi: 4-channel Relay step-by...  
16 channel relay video:    • Raspberry Pi: 16 Channel Relay how to...  

To see my other Raspberry Pi projects:
Garage door remote:    • Easy Raspberry Pi Garage Door Remote ...  
Outdoor Automated Lights:    • Raspberry Pi Automated lights with 8 ...  
File Server (NAS):    • Raspberry Pi: File Server (NAS Networ...  
Weather Station:    • Raspberry Pi: Weather Monitoring Proj...  
How to Bitcoin Miner:    • How to: Mine Bitcoins with Raspberry ...  
Voice activated lights:    • Raspberry Pi: Voice activated light c...  
Control a light with your Mobile phone:    • Raspberry Pi: how to turn on a light ...  

Donate here: If you like the video or think it's useful buy me a coffee bit.ly/1kAous6

Donate with bitcoin! 1HfHr25qZQjPzwphPxpNaD5CytDNYcfzrJ

Support this channel on Patreon!
patreon.com/skiwithpete

All Comments (21)
  • @azelbane87
    I DISCOVERED your channel JUST&ONLY NOW!!! and I LOOOOOOOVE IT!!! YOU ARE MY SAVIOR!!!!BLESS YOU WHOEVER YOU ARE!!BLESS YOU BLESS YOU BLESS YOU BLESS YOU BLESS YOU!!!
  • @HamzaQayyum
    I really love how you explain this everything such depth, all while sounding very non-monotone. Keep doing what you're doing!
  • @woodywood6961
    You sound like Christian Slater. I found this comforting and reassuring. Great video
  • @shiro.kabocha
    This seems to be the most friendly community i ever saw on youtube.
  • Watching this in 2020! :) Did my first use of GPIO with a spare RPi 2 v1.1 and your same 8 relay module. Pinout was the same. Worked flawlessly with your script. My board is attached to cabled Ethernet not WiFi. Thank you very much.
  • @blenderbari
    Thank you so much for the tutorial videos. It took me a few days to figure it out, but finally, everything worked just like your video. I had to edit the scripts a little to update the print commands, but then everything came to life. Please post more - we appreciate them, and the work you put in.
  • @nikf3188
    Top tutorial which has just resulted in a Pi, Relay, Asterisk mashup to control gate opening & closing via SIP. Thank you!
  • @jameshyde6395
    Hi I have just hooked up the Raspberry pi 3 to the 8 channel relay board exactly how it is in this video , however i had an intermittent problem with channel 3, this was easily solved by moving the wire for GPIO pin 4 to GPIO pin 5 and Edited the code at the start of the script to output to GPIO5 pin instead, problem solved. great Video clear instructions and got to the point without beating about the bush.
  • @JayMoodley
    Thanks for the video.. used it as my lockdown project for get my reef pi up and running.👍🏽
  • @Skilldibop
    Very simple but effective demo. I'm a network engineer by trade and like many I have a test lab at home full of kit I can connect to remotely. Downside is leaving it all on so it's accessible can burn something like 650-700w. The plan is to borrow some of the principals and code you kindly provided to be able to connect remotely to the Pi and power on only the equipment I need, only when I need it. Hopefully saving me a heap on my energy bills! It should also be a fair bit cheaper and more fun than buying a proper network managed PDU off the shelf :)
  • @xcruell
    Thanks a ton for all the videos about the RaspberryPi & 8ch relay! Im planning on doing the same in my rather small garden, since i dont have any lights atm. Keep up the great work man! :)
  • @girardaquino
    Thanks so much man! I had a slightly different setup but your video provide a good starting point.
  • @Channel-nc9yl
    I build one of 30 years ago using a VIC-20 and a hand-build 4-relay board.  Programmed it with BASIC.
  • @ianmoore5129
    Just noticed that the relay supports two power supplies - one from the PI and the JCC being the 5V for the relays. These can operate independently as from the internal diagram, the two parts (input control and relay control) are connected via a photo diode . As each relay requires 20mA, then it would seem better to use a separate power supply. To change, remove the jumper. Connect the PI power supply using the GND and VCC on the jumpers next to the inputs, and use the other GND,JVCC to connect power for the relays
  • @RandyRasmussen
    I must say your videos are very impressive. The tutorials are great and I love the way you put in the links. Very nice.
  • @fetchitnowuk
    Thank you so much for this. Followed the instruction and using this now for an Aliuminum Can crusher project. I'll share the automation code once done. Thanks again.
  • @chrisurban6835
    Bravo! It worked with my Raspberry pi 4 b. in conjunction with Mu 1.0.2. Finally i made it do something.
  • @Cmdrlucky8
    Fantastic video! Really appreciate the time you've put into this. Looking forward into delving into these projects!
  • @LukeAlderton
    Thanks man! Saw your video, immediately ordered the parts, just used wget on the Pi over SSH to get your scripts and it's all working. Brilliant!