Raspberry Pi Automation #1: Mains Relay HAT

  Рет қаралды 273,694

ExplainingComputers

ExplainingComputers

Күн бұрын

Пікірлер: 618
@ExplainingComputers
@ExplainingComputers 5 жыл бұрын
WARNING: mains electricity is dangerous. As noted in the introduction, do not attempt what is shown in this video unless you have prior experience working with mains electricity and understand how to take appropriate safety measures. In particular, when working with mains electricity, ensure that your circuit is connected to an residual current device (RCD) or other form of circuit breaker.
@stephenlittle7534
@stephenlittle7534 5 жыл бұрын
Rcd will not Work if NO EARTH IS USED. ☝WAGGLE FINGER AGAIN.
@patrickwigmore3462
@patrickwigmore3462 5 жыл бұрын
@@stephenlittle7534 RCDs don't require an earth connection. They work by detecting imbalance in the current flowing through line and neutral. However, they won't protect against connecting a human between line and neutral, or connecting a human in series with the load. The human is only spared if they are connected between line and earth or between neutral and earth.
@princedube5008
@princedube5008 5 жыл бұрын
hi, I would like to use a raspberi pi to control the price sign outside two family-owned stores that are far from each other I want to create a simple signboard that has 36 lights that display a price much like block characters from old calculators. I want to be able to update the prices remotely over the internet. how would I go about doing especially with the code and controlling it to change prices on a weekly basis? can you be of assistance thanks
@patrickwigmore3462
@patrickwigmore3462 5 жыл бұрын
@@princedube5008 Those number displays are called 7 segment displays, because of how many segments make up each digit. This seems like a good question to ask at a local Linux User Group or a similar specialist group, where you can have an extended discussion about it and multiple people can offer opinions over a period of time. It's way too big a project to discuss it in KZbin comments. It's a really involved project if you are a complete beginner. If you just want something that works without much hassle, a much simpler option would be to buy an off-the-shelf, serial-input LED number display, and control that using a Pi. The DIY approach will involve an electronics module to drive the display (possibly DIY electronics), software to drive that, and a secure way to control it over the internet. For simplicity's sake, I'd recommend using SSH to control it. SSH can be secure, but you absolutely must read up on properly securing it, because people *will* be trying to break into it within *minutes* of you putting it online. The Internet is not a safe neighbourhood and the default settings are not secure.
@jkelectrical
@jkelectrical 5 жыл бұрын
I love the R-pi! But I can't see how one can provide isolation between low voltage, I.e 110V-600 volts and extra low voltage, ( >110 volt) connections. If the low voltage connector came into contact with the R-pi, there is a danger there would be a 230 Volt + connector across the telephone network, assuming the R-pi is connected via the Ethernet port.
@kjeldgaard0
@kjeldgaard0 5 жыл бұрын
Chris, your KZbin videos are well-prepared, well thought-out and very enlightening, something which is unfortunately rare on this platform, where lots of fast-talking KZbinrs are ad-lib'ing it and in essence wasting the audience's time. They could definitely learn from you. Thank you so much!
@ExplainingComputers
@ExplainingComputers 5 жыл бұрын
Thanks for your kind feedback. Appreciated.
@markawbolton
@markawbolton 5 жыл бұрын
I concur. I really appreciate your professionalism.
@twoshedsjackson6478
@twoshedsjackson6478 5 жыл бұрын
Chris, this is the ONLY channel where I gladly watch the adverts in the hope that it boosts your income a tiny bit. Everybody should.
@mmdirtyworkz
@mmdirtyworkz 3 жыл бұрын
Support via patreon and install adblock. That's what everyone should do.
@wasitacatisaw83
@wasitacatisaw83 5 жыл бұрын
Always look forward to your videos. Sunday isn't Sunday without Stanley the knife and Mr Scissors.
@MarkoVukovic0
@MarkoVukovic0 5 жыл бұрын
I was just thinking exactly the same!
@canwenot573
@canwenot573 5 жыл бұрын
I couldn't agree more. I had my cup of coffee in hand when I saw the notification for a new EC video. Sunday morning done right.
@reggiep75
@reggiep75 5 жыл бұрын
There was a time when various TV programmes (good & bad) were symbolic of a Sunday night but in modern times this channel is always part of my Sunday night I enjoy on account of all of the interesting content, dry humour, good quality and production values. I'd always wondered how to control various mains products and lights but SBC's have allowed lots of people to access a lot of projects and SBC's can be used in so many ways. Another great video and keep up the good work!
@TheSwitzAutomotive
@TheSwitzAutomotive 5 жыл бұрын
Christopher I've started an automotive and car maintenance channel and I've tried to use the Christopher Barnatt method of "extreme literary efficiency" when explaining topics. Quick and right to the point with no wasted words. Thanks for the inspiration! Keep up the great work! ~ Tom "The Switz"
@ExplainingComputers
@ExplainingComputers 5 жыл бұрын
Great to hear. Good luck with your channel. :)
@elviraeloramilosic9813
@elviraeloramilosic9813 5 жыл бұрын
Oh this was great! Clicking sounds, Python on pi, testing, experimenting, wiring here, tinkering there... Most satisfying videos on KZbin! Cognitive/visual/audible pleasure.
@ExplainingComputers
@ExplainingComputers 5 жыл бұрын
Thanks Elvira. :)
@joland119
@joland119 5 жыл бұрын
ExplainingComputers when are you going to upload the video about TPM?
@teebee5323
@teebee5323 5 жыл бұрын
"Most satisfying videos on KZbin! " very well said Elvira, I just read were some old fart that worked for DARPA says "the internet is broken and no longer useful", clearly he hasn't seen the ExplainingComputers channel, the work Chris does here is the most useful thing the internet has ever done.
@mickelodiansurname9578
@mickelodiansurname9578 5 жыл бұрын
@@teebee5323 and of course peoples cats.... What would the internet be like without random pictures of cats everywhere?
@teebee5323
@teebee5323 5 жыл бұрын
@@mickelodiansurname9578 hilarious, I just posted a few minutes ago about how cats are the number one reason we lose computer games we shouldn't: kzbin.info/www/bejne/kKebqKdvia6Lpck
@pete-the-nete
@pete-the-nete 5 жыл бұрын
Your commentaries always make me smile - keep them up, PLEASE!
@ExplainingComputers
@ExplainingComputers 5 жыл бұрын
I have no plans to stop! :)
@joshuavstheworld7
@joshuavstheworld7 4 жыл бұрын
Finally someone that explains the code. As a beginner looking at scripts is a bit confusing sometimes. Thanks!
@kayferrari5361
@kayferrari5361 5 жыл бұрын
When i see video's like this they stay in my head as i try and think of other ways these relay switches can be used, or other ideas for HAT's. I think they're going to become really big, i can already feel it without thinking about it yet. I had no idea about these HAT's so this is great for me. Beautiful model Chris, well done.
@kayferrari5361
@kayferrari5361 5 жыл бұрын
and thank you
@yoonpark8311
@yoonpark8311 5 жыл бұрын
Mr. Barnatt, I didn't understand about the raspberry pi, but when you explained (not all but part of it) I understand how it works and the codes. Thank you!
@perrymcclusky4695
@perrymcclusky4695 5 жыл бұрын
“Lightbulb Sequencing Parties” ? How shocking! It would be beneath Stanley the knife and Mr. Scissors’ social standards to attend such parties. Plus they would never wear a hat indoors. Looking forward to your next video.
@jerril42
@jerril42 5 жыл бұрын
I never get invited to the cool parties!
@SBCBears
@SBCBears 5 жыл бұрын
"Lightbulb sequencing parties"!? Ohhh... the high life. Too rich for my blood.
@calmac3723
@calmac3723 5 жыл бұрын
This isn't too bad, the "LED Light bulb sequencing parties" are the expensive ones, the "Energy Efficient Light bulb sequencing parties" can take a while to get going 😁
@perrymcclusky4695
@perrymcclusky4695 5 жыл бұрын
Cal Mac Also parties using floodlights would be dangerous. Mixing water with electricity would be hard on the people attending those parties! Yet I’m no expert since I don’t drink.
@calmac3723
@calmac3723 5 жыл бұрын
@@perrymcclusky4695 Floodlight sequencing parties are for royalty, it would be a dream to attend one of those my friend. Water is used frugally at these type of parties, lager is used chiefly, it is safer, it's less conductive.👍
@jasongooden917
@jasongooden917 5 жыл бұрын
When RGB just won't cut it
@calmac3723
@calmac3723 5 жыл бұрын
@@jasongooden917 😂😂
@Jim-be8sj
@Jim-be8sj 5 жыл бұрын
Great video. I am pleased to see that this is just the first video in what has the potential to be a very informative and interesting series.
@DiverJames
@DiverJames 5 жыл бұрын
This little HAT would make a useful base for activating a sprinkler system which are usually powered by 12VAC. Being a Pi, you could also pull in local weather to make sure you’re not activating the system when it’s raining or too windy etc :)
@jezebabe
@jezebabe 5 жыл бұрын
Thanks Chris as always. You have a very engaging teaching style and always make "projects" seem like fun. I am looking forward to the rest of this series and have subscribed.
@ExplainingComputers
@ExplainingComputers 5 жыл бұрын
Thanks for the sub -- welcome aboard!
@jasongooden917
@jasongooden917 5 жыл бұрын
Stanley the Knife, Mr. Scissors and Crinkle Crinkle all in 10 seconds. Your on a roll today.
@peterjansen4826
@peterjansen4826 5 жыл бұрын
"Boys and their toys" has gotten a new meaning in the last decade. ;) As a 10-15 years old kid I would have loved these toys. The coding for Raspberry Pi is surprisingly easy compared to coding in C.
@stefanolivingketo1076
@stefanolivingketo1076 5 жыл бұрын
Thank you for this series and all of your videos i find the raspberry pi very fascinating so all your videos are like a mini course. working 12hrs a day time is short but following your videos have helped me figure out what to do at a rapid rate.
@xPowerdriverx
@xPowerdriverx 5 жыл бұрын
This is a series with amazing potential! I am really looking forward to getting into a serious real world scenario for the Pi!
@DogSerious
@DogSerious 2 жыл бұрын
I want to use a Pi to switch on and off 15 self powered generators and also monitor their outputs and running times, this looks like it has potential.
@jinchoung
@jinchoung 5 жыл бұрын
you should totally do an episode on the MiSTer FPGA project. it's right up your alley and i could really use a good explainer on exactly what is going on physically inside of an FPGA chip.
@ObsidianMercian
@ObsidianMercian 5 жыл бұрын
Another fantastic video. Recently purchased a Raspberry Pi (your SBC videos have been tremendously helpful, thank you) and am considering what projects to undertake. Looking forward to the rest of this series!
@AnimalFacts
@AnimalFacts 5 жыл бұрын
This is gonna be a fun series.
@asteele7931
@asteele7931 5 жыл бұрын
Nice A team and Magyver reference, did not realize y'all had watched that across the pond
@ExplainingComputers
@ExplainingComputers 5 жыл бұрын
Top shows. :)
@椰糠种植者
@椰糠种植者 4 жыл бұрын
lots of fun watching your video and glad to see this channel growing bigger. can't wait to see your next episode on RPi automation.
@MegaMiir
@MegaMiir 4 жыл бұрын
I got super excited when the lights lit up in sequence, great stuff!
@Kevin-mx1vi
@Kevin-mx1vi 5 жыл бұрын
I'm intrigued by remote control in the home and looking forward to the rest of the series to give me some ideas. This is going to be interesting.
@migueldias1292
@migueldias1292 3 жыл бұрын
its nice that you included the code with beard numbering as well, thank you!
@davydoo13
@davydoo13 5 жыл бұрын
You are amazing you explain things so adequately that’s why I got into Linux mint
@jcpartri
@jcpartri 5 жыл бұрын
You do such a good job making these videos. Hats off to you across the pond! :-) My daughters like to watch instructional videos with their daddy. This was today's lesson on electricity and what a program can do. - many blessings.
@CharloSeychell
@CharloSeychell 5 жыл бұрын
Thanks for the highly informative video. Coincidently, last week, I built a similar project, but I used another type of relay switches (not the hat type). Another difference is that the lights are voice-activated using Google Assistant and IFTTT applets. Keep up the good work. You are the source of inspiration for us common mortals.
@alizee3687
@alizee3687 2 жыл бұрын
can you please share the source for your project I would be very interested in building voice activated light system
@CharloSeychell
@CharloSeychell 2 жыл бұрын
@@alizee3687 As I had said in my comment 3 years ago, I used IFTTT. However, a few months ago, IFTTT made changes that affected the way voice activation functions. So, unfortunately, I am afraid I cannot help. Sorry.
@Vhbaske
@Vhbaske 5 жыл бұрын
You are a very nice teacher, I love all of your tutorials. Keep informing us! Now we need more about the Raspberry pi 4. I am anxious to hear...
@jezzermeii
@jezzermeii 5 жыл бұрын
Someone's been to Wilko! ;) I used to work as a supervisor at a brand new Wilko store. It was a really fun job. :) An odd thing about Wilko is the variation in customer experience between stores. Some Wilko shops are great and some are really, really poor. Hence the mixed reputation! Thanks for the great video. :) Very inspiring.
@ExplainingComputers
@ExplainingComputers 5 жыл бұрын
There was indeed a Wilko trip involved! :)
@BorgSwarm
@BorgSwarm 5 жыл бұрын
Awesome video. Very simple project and good instructions. It sparks the imagination. I have had all the parts laying in my Pi Box for a couple years but have lacked any motivation to get in there and actually do something with it. But this give me some other ideas and just maybe the motivation to get started. Thanks so much.
@y2ksw1
@y2ksw1 5 жыл бұрын
Yeeeeeee, automation! 😄 I remember the times (70-80's) when this kind of automation was done by discrete electronics and the difficulties we had to face with clocks ... I still remember a device I made and used a normal digital clock in order to find out which time it was ... there were no or only extremely expensive RTC chips available, but alarm clocks were an affordable alternative.
@heywood62
@heywood62 5 жыл бұрын
I am always happy to see another one of your videos. You seem to answer my questions without my having to ask them. Mainly what would I practically use an SMB for after purchasing it? Thanks for another great video and for sharing your vast knowledge with us. P.S.: Could you explain and maybe demonstrate what a Computer cluster is using RPI or any of the boards? I see where people have claimed to have made a cluster and others in comments say it's not. And also what they would be used for. Thanks in advance.
@ExplainingComputers
@ExplainingComputers 5 жыл бұрын
A cluster is on my (long) list. :)
@icenesiswayons9962
@icenesiswayons9962 5 жыл бұрын
My brother and I have been discussing such an automation, thank you for helping.
@appalachianwanderer4634
@appalachianwanderer4634 5 жыл бұрын
The LED relays clicking sound reminds me of a metronome. Quite soothing actually.
@johnblack6134
@johnblack6134 5 жыл бұрын
more like a grandfather clock. reminds me not to work too late.
@benkerr9051
@benkerr9051 5 жыл бұрын
This is definitely going to be used for controlling lights, fans and pumps in indoor hydroponic gardening setups.
@Chris.Brisson
@Chris.Brisson 5 жыл бұрын
Certainly for cash crops.
@BigRalphSmith
@BigRalphSmith 5 жыл бұрын
Thanks Chris. I really appreciate the information you've gone to the trouble to show everyone. It's unfortunate that so many in the comment section have to behave like safety Nazis or advertising conspiracy trolls. I took your demonstration at face value and I got a lot out of it. It doesn't bother me at all who's products you choose to use in your videos and I took your disclaimer at the start of the video to heart so hopefully I'm not too stupid to safely put your information to use in practical applications in the future. Please keep doing what you do on YT and I hope to see you again... very soon. ;)
@ExplainingComputers
@ExplainingComputers 5 жыл бұрын
Thanks for this. I'm glad somebody understands what I'm trying to do here. I provide details on the parts used because if I don't, I get asked for them! :)
@WokLover
@WokLover 5 жыл бұрын
so watchable as usual..can't wait for the next one.
@malcytull
@malcytull 5 жыл бұрын
Another brilliant video, you sounded surprised when it started working, I was confident that if you'd made, it will work. Thank you for posting.
@ExplainingComputers
@ExplainingComputers 5 жыл бұрын
Computing still amazes me, especially when it interfaces with the real world.
@ashtongrist
@ashtongrist 4 жыл бұрын
oh im so glad i'm back here. Please keep doing this
@ronniewilliams3420
@ronniewilliams3420 5 жыл бұрын
Very informative and concise video SBC and applications. Thank you for filtter thur all noise on this subject.
@dcc1165
@dcc1165 5 жыл бұрын
Yet another excellent HowTo. I actually plan on doing something like this to control dampers in my house because the air circulation is horrible and I'd like to be able to programmatically control air flow so I don't have to stand on a stool anymore. :)
@h2o-fpv623
@h2o-fpv623 5 жыл бұрын
Yes I have the raspberry b , and I just got me the b+ so I'm in the process of moving so I can't do anything yet. Well in a couple days I will .now this new hat will help me a lot.
@sanjaybhatikar
@sanjaybhatikar 4 жыл бұрын
Your Raspberry Pi videos are the coolest 😎 🙏
@dale9616
@dale9616 5 жыл бұрын
As an electrical engineer trying to learn more computing aspects I always notice the neutrals in the videos. Normally I would loop the neutral from each light together with the last direct off the cable (with no connectors). These videos always seem to bring each neutral to connectors and loop them there. It makes no difference at all, but I wonder why it’s done. But great video!
@sihledotcom
@sihledotcom 5 жыл бұрын
Hi Chris, just an idea for an explaining video...Could you do APIs like DirectX and OpenGL/Vulkan and explain how they work and why they are necessary?
@mikiethebikie
@mikiethebikie 5 жыл бұрын
Thanks Chris, PI working in the real world is great to see. Thanks for the example.
@Keeping_IT_Simple
@Keeping_IT_Simple 5 жыл бұрын
A great start to what promises to be yet another excellent series. Ps Can I have an invitation to the next lbsp? ( Light Bulb Sequencing Party )
@zetaconvex1987
@zetaconvex1987 5 жыл бұрын
Wahey. Lighbulb Sequencing Party at Chris' place.
@crash5868
@crash5868 5 жыл бұрын
Try...Finally. Takes me back to my Delphi days.
@resrussia
@resrussia 5 жыл бұрын
I love this video! Once again thanks for a clear and understandable presentation an interesting project using raspberry pi. You have created an excellent presentation on a fairly complex topic for those of us who dapple with raspberry pi from outside the world of computers and electronics. I very much enjoyed the thoughtful presentation of the topic. I am looking forward to your video on using Wifi and a raspberry pi to control a device. Keep up the good work!
@leeoliver2969
@leeoliver2969 5 жыл бұрын
My thoughts exactly.
@chrisbeukman7691
@chrisbeukman7691 5 жыл бұрын
have you tried node-red with the relay board.
@old_guard2431
@old_guard2431 5 жыл бұрын
A thoughtful design - you can remove the jumpers on additional boards, rewire and add them on. You can sequence 6 or 9 or more and be assured of being the hit at your next Lightbulb Sequencing Party.
@petesday8632
@petesday8632 5 жыл бұрын
Thanks for this video, My son and I will use this as a basis for him to use L.e.d.s to light up his model railway. Intead of relays he wants to use transistors. (bc 548's) I feel a lot of low voltage and soldering is in our future. I might grab one of your linked boards too. Thanks for your hard work :)
@i.p.knightly149
@i.p.knightly149 5 жыл бұрын
"Sorry I was just a bit surprised there, it's working." lol
@NyneIX9
@NyneIX9 3 жыл бұрын
He was so genuinely excited lol
@ridefast0
@ridefast0 5 жыл бұрын
Thanks for this video. I noticed that the Pi is lacking a heatsink - perhaps getting hot is better than having the metal heatsink reach up to touch the mains tracks on the PCB above ...
@ExplainingComputers
@ExplainingComputers 5 жыл бұрын
Thanks for your concern. :) Many HATs have tracks both sides, and the clearance here is good. The mains relay pins are far from any potential heat sink. But care should of course always be taken with mains.
@michelfilion5482
@michelfilion5482 5 жыл бұрын
Great video. Again you make it seem so effortless.
@tasmedic
@tasmedic 5 жыл бұрын
I love these videos. Everything is always so beautifully and brightly lit.
@dragonboyjazz
@dragonboyjazz 5 жыл бұрын
i will be getting 1 of these, this is awesome, set the garden lights on a timer which also controls my hallway night light so when i walk out of my bedroom i can have a sensor that will turn on the hallways and toilet light for my kid, winner winner chicken dinner.... or in this case i guess its raspberry pi, thanks for the video mate!
@ExplainingComputers
@ExplainingComputers 5 жыл бұрын
Sounds good. I will be looking at light and PIR (movement) sensors as triggers in a later episode of this series.
@dragonboyjazz
@dragonboyjazz 5 жыл бұрын
@@ExplainingComputers good on yu mate, ill be looking forward to it!
@srtcsb
@srtcsb 5 жыл бұрын
This is great stuff Chris. The jokes about "light bulb sequencing parties" have been well covered by other posters, but with Adafruit and other vendors selling all sorts of lighting for clothing and costumes, I'm sure it's "a thing" somewhere :-D. Looking forward to more videos in this series. Thank you.
@ytbabbler
@ytbabbler 5 жыл бұрын
The relays can also be controlled from the shell. $ echo 37 >/sys/class/gpio/export $ echo out >/sys/class/gpio/gpio37/direction $ echo 1 >/sys/class/gpio/gpio37/value
@pulesjet
@pulesjet 5 жыл бұрын
LOL, You reminded me of your Light Bulb types, better then the thread in junk here in the U.S. .. Some day I really need to dig into Python. My programing skill are most lacking. Good Stuff from you Sir !
@Cilmaen
@Cilmaen 5 жыл бұрын
Yet again, another fantastic video/ tutorial
@realevostevo
@realevostevo 5 жыл бұрын
I love electronics. I wish I would have taken an interest and studied years ago. I really think DYI projects would be a lot of fun but I still have much to learn.
@dquinceyhjornevik7823
@dquinceyhjornevik7823 5 жыл бұрын
In the US people (not me) get all excited if you don't use all three wire. I noticed that the relay did support three wire but that the light sockets did not seem to. Is that normal for sockets in UK? It might calm some of the more tense if you mention the relays do handle 3 wire connections. Great work and I might be trying this one! Would like to see comparisons between cheap single boatd Win PCs one day.
@RuneInternational
@RuneInternational 5 жыл бұрын
the relay is switching the middle pin between the two outer, so you have a common pin in the middle, and then a normal open and a normally closed. there is nowhere to connect a PE wire, as there is no metal boxes that might become live at mains voltage in case of failure
@freesaxon6835
@freesaxon6835 5 жыл бұрын
Useful addition to the Pi, test setup good, no problems, but if the mains HAT is mounted in a permanent position they should have included a isolation strip to cover the mains outlets. ( In a similar way as a mains fusebox )
@NewAgeDIY
@NewAgeDIY 5 жыл бұрын
Interesting project Chris. I can see using it for my work-shop lighting needs. It's available on Amazon.ca sold by Waveshare Raspberry Pi Power Relay Board sold for $33.00 Canadian
@alizee3687
@alizee3687 2 жыл бұрын
Thanks for the video I was looking for a solution to control three motors with a spare Pi 3b+ in my house this tutorial gave me a complete solution as I had never done any programming in Python only thing I need to search on how to change the time delay from seconds to minutes and hours. This is a very good practical example to learn Python and Relay control. Very please to visit your channel and the work you do Thank you very much
@peterjansen4826
@peterjansen4826 5 жыл бұрын
The A-Team, that was a great show. 30-40 years ago, only 5 seasons and a shortened 5th season but we still know and love it. Crazy but highly capable Murdock, Hannibal who was even more crazy but also a brilliant tactician, tough BA and smooth talker Face. They could repeat it again and kids would watch it again.
@spuds6423
@spuds6423 5 жыл бұрын
McGyver used duct tape...ya gotta have duct tape!!! 😃
@zmooc
@zmooc 4 жыл бұрын
If you add a sleep in that while-loop, it'll use a lot less CPU; no need to check the time every millisecond. This'll make your Pi much more responsive and it probably saves power, but I'm not 100% sure of that.
@ExplainingComputers
@ExplainingComputers 4 жыл бұрын
You are right on all counts. :)
@blevenzon
@blevenzon 5 жыл бұрын
Ahhh yesss!!!! This is the meat and potatoes type content. Thank you ever so much!!!
@ummmjames
@ummmjames 5 жыл бұрын
Thanks for sharing. Looking forward to more videos about automation. Also, look into cron/crontab if you haven’t yet. It’s a time-based job scheduler built right into raspbian (and linux/unix in general). Very useful!
@DFX2KX
@DFX2KX 5 жыл бұрын
I didn't know they made a relay hat for the Pi, very interesting. Combined with a few other things, I can see this being useful to automatically turn devices on/off, such as automatically restarting the router when I'm not home if it detects a loss of internet for x amount of time. or using it's DC function to hit the power_on line in my server to turn that back on automatically after a power outage (ditto sending it and my gaming PC commands to turn off safely if my UPS runs low). I've always wanted to do that because of how awful the electrical is in this apartment.
@3dlabs99
@3dlabs99 5 жыл бұрын
print("... and I hope to talk to you again...") time.sleep(3) print("... very soon")
@apoch003
@apoch003 5 жыл бұрын
Always entertaining stuff, if a little weird on the subject. I'm hooked. Seems to me you could just buy a wall timer that plugs into the mains, and then plug the lamp into the timer.
@ExplainingComputers
@ExplainingComputers 5 жыл бұрын
A wall timer would indeed be a better option for controlling one lamp. But the more lamps are added, and the more sophisticated control required, the greatest benefits of computer control. :)
@getyerspn
@getyerspn 5 жыл бұрын
Gread video .. hopefully this will inspire people..I've done a hell of a lot of home automation now using Esp8266 devices ....I have lots of spare Raspberry Pi 2's ...I think I'll have to have a play ... I would though recommend using a relay board that uses opto-isolators as well.
@PeetPeeet
@PeetPeeet 2 жыл бұрын
Edit: Hi Chris sorry if the comment seemed impolite - I really enjoy your videos they’re fantastic :) My Pi1 (bought for £10 off eBay) does not run some later OS versions and the GPIO programming is different to yours pictured as a result, cannot update or the kernel doesn’t run my Wi-Fi adapter… I was only trying to share my experience with setting up relays. I am programming for the first time… very unfamiliar with the lexicon and electronics as a whole but enjoying the learning experience. I have three types of relay now and 3 types of DC-DC booster / transformer to try. I’ll post a video of my own when the project is done. Thanks!
@ExplainingComputers
@ExplainingComputers 2 жыл бұрын
This is very strange and I think not entirely accurate. Others please note that the "GPIO coding language" is not dependent on the Raspberry Pi model used. The version of Python available in Raspberry Pi OS (formerly Raspbian) has changed over the years, but all Raspberry Pi models can run the same version. So this is an issue of keeping the software on a Pi updated. On the voltage issue, the GPIO pins on a Raspberry Pi output 3.3 volts at very low current, and absolutely cannot be used to directly control a relay (or indeed any other electrical component). GPIO pins are for the control of low-current electronic devices only, and are very likely to be damaged if high-current devices are connected. So a relay control board will always be needed. This video shows a Pi fitted with a suitable board. To be clear, do not connect relays directly to GPIO outputs, as not only will it not work, but it is likely to damage the Pi.
@PeetPeeet
@PeetPeeet 2 жыл бұрын
@@ExplainingComputers kzbin.info/www/bejne/eKvTgHuJls6Eisk
@JohnDoe-tm2sc
@JohnDoe-tm2sc 5 жыл бұрын
Excellent start. Hopefully will get to more complex apps.
@DominicWattsUK
@DominicWattsUK 5 жыл бұрын
Very good. If you like using a Raspberry PI to get light bulbs going then I think you would love the set-up I have. I have my PI to get my out door Gas Light going with some Python code which alters everyday based on sunset and sunrise. The PI switches a solenoid which lets the gas through in a Sugg light. I love it, never have to think about altering the time because the PI does it for me. This HAT looks perfect because I can then use the same PI to control our second Gas Light too. Our entire street (in Sheffield) is Gas Lit.
@chriholt
@chriholt 5 жыл бұрын
Thanks as always Chris, I’m looking forward to the rest of this series!
@leonidas14775
@leonidas14775 Жыл бұрын
I had no idea what a "darlington transistor" was, but after looking it up I've been noticing a lot of pairs of transistors like those next to relays on circuit boards. The more you know
@andreamitchell4758
@andreamitchell4758 5 жыл бұрын
so is that outless a 433mhz or 315mhz 9 whichever one you use in UK,315 is it?), RF socket? will you be showing how to use pi with a superheterodyne RF transmitter? i got a TX RX pair of on the way from China i ordered it to put me over for a free $3 ebay coupon promotion ,wasn't sure what else to buy and i always wanted to experiment with RF libraries seem pretty complicated though
@ExplainingComputers
@ExplainingComputers 5 жыл бұрын
It is from an Energenie Pi-mote kit.
@springlj
@springlj 5 жыл бұрын
Thank you for your Sunday video. Very much appreciated as always. Request: please show us how to make this setup visible to openhab or homeassistant and comment on other available options for home automation.
@stevelarkin3285
@stevelarkin3285 5 жыл бұрын
Great video really enjoyed it the wiring side of the project looked to me rather easy but writing that code to make it work that is way over my head .... well done
@esurfrider7687
@esurfrider7687 5 жыл бұрын
I’ve wanted to create a automated hydroponic plant growing box using a raspberry pi, I know there’s an open source farm bot that I believe runs on the raspberry pi, it would be cool to see what you would use and program for such a project
@ExplainingComputers
@ExplainingComputers 5 жыл бұрын
I like the idea of a hydroponics project. :)
@davidrichmond3709
@davidrichmond3709 5 жыл бұрын
I've been looking into building a speech timing light for my Toastmasters club. This comes really close to having everything needed. The white bulbs could be substituted with green, yellow and red bulbs.
@Colin_Ames
@Colin_Ames 5 жыл бұрын
Clear and informative, as usual. Thanks Chris.
@IsaacPiera
@IsaacPiera 5 жыл бұрын
Very useful, just one tip: To execute code at particular times of the day usually is better to set up a Cron job handled by the operating system than having a python code running in an infinite loop.
@ExplainingComputers
@ExplainingComputers 5 жыл бұрын
True, but more complex to cover in a short video. :)
@stenbiller99
@stenbiller99 2 ай бұрын
is it possible to stack more HAT boards and get MORE relays? I've got a project where I want a smart power strip, where there is 6 regular on/off outlets, and 6 dimmable outlets. Could one stack a bunch of HAT devices on and kind of daisy chain them somehow?
@StephenNu9
@StephenNu9 5 жыл бұрын
Very good. I'm going to investigate C programming of the Rasberry.
@esra_erimez
@esra_erimez 5 жыл бұрын
Can this also be used for light bulb sequencing cotillions? I'm asking for a friend.
@edrymes3653
@edrymes3653 5 жыл бұрын
Well, if it isn't shades of PLC. (Programmable Logic Controller) As usual your descriptions and explanations help make computers and electronics clear for new kids on the block or oldies needing a refresh. I will stay away from the light bulb party scene though. That's more for the younger crowd. ;-)
@MrJaz8088
@MrJaz8088 5 жыл бұрын
Congrats Chris, you made a $10 Timer, actually $25 being digital and programmable, I really like that Relay Board, need to find a better use
@ExplainingComputers
@ExplainingComputers 5 жыл бұрын
The point of this video is to provide an introduction, not a final application. And even as a timer, a Pi can do far more than a dedicated unit. :)
@NicoDsSBCs
@NicoDsSBCs 5 жыл бұрын
Hi Christopher. That is very cool. Nice job. I make a lot of electrical projects(mostly with arduino and esp32), but haven't used mains yet. Everything is 5V for me. This video is great for giving young people an interest in electricity. I've ordered the Odroid N2 yesterday. Now 2 very long weeks waiting fr it. Next week I'll make a video about the Orange Pi 3. Last week I made 2 videos, one about a media script for the Rock64 to make video playback better in Linux. And anoher one of Retro PC games on the Raspberry. Have a great day, greetings. NicoD
@ExplainingComputers
@ExplainingComputers 5 жыл бұрын
Hi Nico. I should have guessed you wer into Arduino. I look forward to your coverage of the N2. I managed to get a pre-order of a Jetson Nano last week. And will return to the Rock Pi 4 here soon.
@NicoDsSBCs
@NicoDsSBCs 5 жыл бұрын
@@ExplainingComputers That's awesome. I had to choose between the Jetson and the N2. Hard choice. It's an impressive package. But I can use the N2 more. For my needs it should be ideal. I hope the N2 can run Blender stable at 2Ghz on all cores. Then I can use that one for rendering animations with blender together with my RK3399's and NanoPC T3+. I can't wait to have it. I wonder how good the Linux support is on the Jetson Nano. Also wonder if Blender would support that GPU. Then it could be a better choice for me. Certainly with blender 2.80. Can't wait to see your review on it. Would it be possible to do a simple 7zip benchmark for me of the cpu. To install 7zip : sudo apt install p7zip-full to run the benchmark on all cores : 7z b and to run it on one core : sudo taskset -c 0 7z b I wonder how an A57 compares with other architectures. Greetings.
@LMacNeill
@LMacNeill 5 жыл бұрын
The relays' ticking sounds like my grandfather clock that my father built for me many years ago now. One tick per second. Pendulum swinging back and forth... Back and forth... Back and forth... Very hypnotic... Zzzzzzzzzzzzzz....... Seriously, though -- I bet if you re-wired a second "hat" to use three different pins, you could stack two on top of the Pi and control six relays, yes? And perhaps even 9 relays, if you rewired a 3rd board -- assuming there are enough GPIO pins to go around, right? I can see all sorts of possibilities for this! And the wireless controller that will appear in next week's video -- very much looking forward to seeing that. You know what'd be really great? Wireless remote keypads for the Pi -- maybe hooked to the home's WiFi? Press a button on the wireless remote-control keypad, and it sends a signal to the Pi, which then turns on whatever light you wanted to turn on, perhaps via that wireless controller from next week's video? I think I've found something I need to spend some money on. ;-)
@teebee5323
@teebee5323 5 жыл бұрын
mount the relays on a hollow wood block for a bit of acoustic echo and you have the perfect "sound effect" for an old great wall or standing clock. As for the wireless keypad remote light switching, you can of course already buy those for a few hundred dollars and on up, but wouldn't it be much more satisfying to build it yourself and save some $$s?
@a_papa_robot
@a_papa_robot 4 жыл бұрын
Would it be possible to stack 2 hats on top of each other (I would like 6 relays)... the first set is wired to the default pins and then the top set can be wired to other pins?
@ExplainingComputers
@ExplainingComputers 4 жыл бұрын
Yes, you can do this, exactly as you describe.
@a_papa_robot
@a_papa_robot 4 жыл бұрын
@@ExplainingComputers excellent! Thank you for this video... I already bought one out to test the waters (slightly a pun) as Im building out a sprinkler controller with a Blazor WebAssembly front-end... sprinkler status / control / configuration will be done initially through there... eventually being connected to azure iot hub.. building it for me, my dad, my father in law, and my uncle. I'm not 100% sure on the 24VAC part, but sounds like this hat will be able to handle that. If you have any thoughts, recommendations, or more videos I can check out I would greatly appreciate it... Here is a quick video i made this morning of my project... I have links to my github if you are interested in reviewing the code. Thanks again! kzbin.info/www/bejne/jamXpaJ8jKd4g7c
@bb2k16
@bb2k16 4 жыл бұрын
@@a_papa_robot did you stack 2 hats together in the end? I am looking to stack the set up for 6 relays, not sure if it is powerful enough to hold / throw all 6 relay at the same time
@a_papa_robot
@a_papa_robot 4 жыл бұрын
b.b. 2k16 I didn’t get the second hat, wife and I got really busy as we were expecting twins so the project is sitting on the shelf :(. Let me know if it works out for you though.
@h2o-fpv623
@h2o-fpv623 5 жыл бұрын
U r the best I'm glad that I got to know ur show thank u so much for all the info u have giving us.
@SmallSpoonBrigade
@SmallSpoonBrigade 5 жыл бұрын
This could be really useful for power cycling devices that regularly require it. Set the Pi to cut the power for about 10 seconds and power things back on in the correct order whenever it detects a missing connection to the net.
@LunarJim69
@LunarJim69 5 жыл бұрын
Another excellent video. Thanks Christopher!
Raspberry Pi Automation #2: Energenie Wireless Sockets
15:17
ExplainingComputers
Рет қаралды 92 М.
Raspberry Pi Plant Watering (& Time Lapse)
23:41
ExplainingComputers
Рет қаралды 337 М.
"كان عليّ أكل بقايا الطعام قبل هذا اليوم 🥹"
00:40
Holly Wolly Bow Arabic
Рет қаралды 6 МЛН
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 262 #shorts
00:20
Cool Parenting Gadget Against Mosquitos! 🦟👶 #gen
00:21
TheSoul Music Family
Рет қаралды 26 МЛН
Миллионер | 2 - серия
16:04
Million Show
Рет қаралды 1,5 МЛН
I Can Save You Money! - Raspberry Pi Alternatives
15:04
Linus Tech Tips
Рет қаралды 3,5 МЛН
RASPBERRY PI - All  About controlling Relay Boards for Home Automation
15:05
Building my PERFECT Smart Home Control Panel!
13:24
Everything Smart Home
Рет қаралды 1,2 МЛН
Radxa X4: An N100 Pi
20:48
ExplainingComputers
Рет қаралды 77 М.
Automatic Garden Watering System
15:28
Nikodem Bartnik
Рет қаралды 209 М.
Connecting a Relay Module to a Microcontroller
11:41
Brad Henson
Рет қаралды 242 М.
Top 10 Raspberry Pi Projects for 2022
7:54
Jeff Geerling
Рет қаралды 1,5 МЛН
MP3 CDs: a hybrid "format" that never existed, yet was surprisingly common
34:18
Technology Connections
Рет қаралды 775 М.
How To Control A Solenoid With A Raspberry Pi Using a Relay
6:15
Core Electronics
Рет қаралды 91 М.
"كان عليّ أكل بقايا الطعام قبل هذا اليوم 🥹"
00:40
Holly Wolly Bow Arabic
Рет қаралды 6 МЛН