Chris, your UA-cam videos are well-prepared, well thought-out and very enlightening, something which is unfortunately rare on this platform, where lots of fast-talking UA-camrs are ad-lib'ing it and in essence wasting the audience's time. They could definitely learn from you. Thank you so much!
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"
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!
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!
“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.
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 😁
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.
@@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.👍
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 :)
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.
Oh this was great! Clicking sounds, Python on pi, testing, experimenting, wiring here, tinkering there... Most satisfying videos on UA-cam! Cognitive/visual/audible pleasure.
"Most satisfying videos on UA-cam! " 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 hilarious, I just posted a few minutes ago about how cats are the number one reason we lose computer games we shouldn't: ua-cam.com/video/Zv8wt9TIXog/v-deo.html
"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.
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.
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.
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 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.
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.
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!
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.
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.
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.
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. :)
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 :)
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 )
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
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.
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.
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!
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.
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. :)
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.
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.
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
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
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.
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.
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?
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. ;)
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! :)
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.
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 !
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.
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 ...
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.
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.
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
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.
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.
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!
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
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!
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.
Hi, well timed series for me. Just started trying to get a razberry z-wave adaptor working with rPi. Took a bit of work because I'm using a 3B and the razberry uses the same port as the bluetooth module, but after hours of searching online found out that it's just a question of turning off the bluetooth adaptor. As z-wave is a sort of standard thing for home control(with a nifty web browser interface accessible from anywhere in world) it might be something worth looking at in this series.
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.
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. ;-)
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
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!
Nice video, As you stated demoing this board shows how you can modify the code to fit into your environment and control devices either on a time bases or remote / manually. With home automation using network/wifi I would just say do your homework with regards to securing your creation.
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. ;-)
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?
We use the same wiring standard colours in New Zealand and the B22 Bayonet style bulbs too. The only difference here is we use a different style 3 pin 230V 10Amp plug.
Nice video as usual, but in reality, to control mains loads, Sonoff devices are much more flexible and cost a lot less. With built in esp8266 and the ability to reflash them with Tasmota or anything you wish, the Sonoffs can be controlled by the pi very easily using WIFI via http, Mqtt etc. Then you still have the Python option as well as a myriad of other choices including Node Red
That python code at the end looked like a busy loop. It will keep checking the date repeatedly as fast as possible, turning your pi into a mini heater. You should put a sleep in there somewhere.
I was thinking the same thing. The code as written will chew up a cpu. It would be very useful for beginners if the difference was noted and explained. You could do a whole video just on that!
As an Electrician I would not recommend putting mains voltage on a board mounted directly on the Pi as if you picked it up while still connected to the mains ones finger could easily connect with a live track on the board. Also if some metal object got accidently between the board and the Pi damage or a fire hazard could occur. Better to have the board separate and enclosed or use the relays on low voltage to operate separate mains relays.
Wow! That's fantastic! Using a high end microprocessor capable of producing 4K video for a job quite easily done with three 555 timers worth a couple of cents. Never mind the complexity of the board.
I've no idea how three 555 times could turn bulbs on and off at many preset times. The purpose of this video is to demonstrate a principle that will be built on in future episodes.
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!
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.
The raspberry pi is becoming more standard for industrial groups and home automation tinkering as it's so well documented and exposed as well as disposable cheap.
Thank you for that Video. Very interesting. Could you make one with the I2C Bus and I/O's as well as Analog I/O's? Would be very interesting. If 3 Relays are not enough and if someone would like to use an Industrial 4-20mA Pt100 device for example. or RS485 Modbus.
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.
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
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.
Hello Christopher from the US. I’ve been watching your videos for awhile and of course, I subscribe to your channel. I love this idea for a new series of projects for Raspberry Pi! I’ve got several Raspberry Pi Zero, Zero W, Zero WH, 3b and 3b+ and I’m constantly tinkering with them. I noticed in your video you referred to the black metal parts that you screwed into the backside of the HAT as “risers”. Over here in the US we call those “standoffs.” It might also be helpful to note where you can purchase these. Thanks so much for your videos. I’m always looking forward to the next one.
Chris, your UA-cam videos are well-prepared, well thought-out and very enlightening, something which is unfortunately rare on this platform, where lots of fast-talking UA-camrs are ad-lib'ing it and in essence wasting the audience's time. They could definitely learn from you. Thank you so much!
Thanks for your kind feedback. Appreciated.
I concur. I really appreciate your professionalism.
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"
Great to hear. Good luck with your channel. :)
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.
Support via patreon and install adblock. That's what everyone should do.
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!
Finally someone that explains the code. As a beginner looking at scripts is a bit confusing sometimes.
Thanks!
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!
“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.
I never get invited to the cool parties!
"Lightbulb sequencing parties"!? Ohhh... the high life. Too rich for my blood.
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 😁
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.
@@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.👍
When RGB just won't cut it
@@jasongooden917 😂😂
Always look forward to your videos. Sunday isn't Sunday without Stanley the knife and Mr Scissors.
I was just thinking exactly the same!
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.
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 :)
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.
and thank you
Oh this was great!
Clicking sounds, Python on pi, testing, experimenting, wiring here, tinkering there...
Most satisfying videos on UA-cam!
Cognitive/visual/audible pleasure.
Thanks Elvira. :)
ExplainingComputers when are you going to upload the video about TPM?
"Most satisfying videos on UA-cam! "
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.
@@teebee5323 and of course peoples cats.... What would the internet be like without random pictures of cats everywhere?
@@mickelodiansurname9578 hilarious, I just posted a few minutes ago about how cats are the number one reason we lose computer games we shouldn't: ua-cam.com/video/Zv8wt9TIXog/v-deo.html
Nice A team and Magyver reference, did not realize y'all had watched that across the pond
Top shows. :)
"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.
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.
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.
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.
can you please share the source for your project I would be very interested in building voice activated light system
@@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.
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.
You are amazing you explain things so adequately that’s why I got into Linux mint
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!
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.
Your commentaries always make me smile - keep them up, PLEASE!
I have no plans to stop! :)
This is a series with amazing potential! I am really looking forward to getting into a serious real world scenario for the Pi!
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.
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.
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.
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.
There was indeed a Wilko trip involved! :)
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. :)
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 :)
This is gonna be a fun series.
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.
Very informative and concise video SBC and applications. Thank you for filtter thur all noise on this subject.
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 )
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
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.
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.
Thanks for the sub -- welcome aboard!
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!
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...
My brother and I have been discussing such an automation, thank you for helping.
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.
Computing still amazes me, especially when it interfaces with the real world.
This is definitely going to be used for controlling lights, fans and pumps in indoor hydroponic gardening setups.
Certainly for cash crops.
Stanley the Knife, Mr. Scissors and Crinkle Crinkle all in 10 seconds. Your on a roll today.
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.
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. :)
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.
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.
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
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
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.
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.
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?
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. ;)
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! :)
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.
True, but more complex to cover in a short video. :)
Thanks Chris, PI working in the real world is great to see. Thanks for the example.
its nice that you included the code with beard numbering as well, thank you!
The LED relays clicking sound reminds me of a metronome. Quite soothing actually.
more like a grandfather clock. reminds me not to work too late.
I got super excited when the lights lit up in sequence, great stuff!
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 !
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.
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 ...
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.
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.
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
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.
You are right on all counts. :)
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.
McGyver used duct tape...ya gotta have duct tape!!! 😃
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
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. :)
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.
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!
Sounds good. I will be looking at light and PIR (movement) sensors as triggers in a later episode of this series.
@@ExplainingComputers good on yu mate, ill be looking forward to it!
so watchable as usual..can't wait for the next one.
Looking forward to using light and temperature sensors to trigger relays.
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
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!
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.
Hi, well timed series for me. Just started trying to get a razberry z-wave adaptor working with rPi. Took a bit of work because I'm using a 3B and the razberry uses the same port as the bluetooth module, but after hours of searching online found out that it's just a question of turning off the bluetooth adaptor. As z-wave is a sort of standard thing for home control(with a nifty web browser interface accessible from anywhere in world) it might be something worth looking at in this series.
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.
Try...Finally. Takes me back to my Delphi days.
oh im so glad i'm back here. Please keep doing this
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. ;-)
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
I like the idea of a hydroponics project. :)
Excellent start. Hopefully will get to more complex apps.
Your Raspberry Pi videos are the coolest 😎 🙏
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!
My thoughts exactly.
have you tried node-red with the relay board.
Nice video,
As you stated demoing this board shows how you can modify the code to fit into your environment and control devices either on a time bases or remote / manually. With home automation using network/wifi I would just say do your homework with regards to securing your creation.
print("... and I hope to talk to you again...")
time.sleep(3)
print("... very soon")
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. ;-)
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?
We use the same wiring standard colours in New Zealand and the B22 Bayonet style bulbs too. The only difference here is we use a different style 3 pin 230V 10Amp plug.
Nice video as usual, but in reality, to control mains loads, Sonoff devices are much more flexible and cost a lot less. With built in esp8266 and the ability to reflash them with Tasmota or anything you wish, the Sonoffs can be controlled by the pi very easily using WIFI via http, Mqtt etc. Then you still have the Python option as well as a myriad of other choices including Node Red
I love these videos. Everything is always so beautifully and brightly lit.
That python code at the end looked like a busy loop. It will keep checking the date repeatedly as fast as possible, turning your pi into a mini heater. You should put a sleep in there somewhere.
Useful feedback, noted for future videos.
I was thinking the same thing. The code as written will chew up a cpu. It would be very useful for beginners if the difference was noted and explained. You could do a whole video just on that!
Btw, in the arduino you busy loop all the time. But it's not a multitasking CPU. You almost have no choice with it. So you could note that, as well.
Just to note that with the onscreen clock turned off, CPU utilization is about 1% running this loop. :)
Ahhh yesss!!!! This is the meat and potatoes type content. Thank you ever so much!!!
As an Electrician I would not recommend putting mains voltage on a board mounted directly on the Pi as if you picked it up while still connected to the mains ones finger could easily connect with a live track on the board. Also if some metal object got accidently between the board and the Pi damage or a fire hazard could occur. Better to have the board separate and enclosed or use the relays on low voltage to operate separate mains relays.
Good advice.
Great video. Again you make it seem so effortless.
Wow! That's fantastic! Using a high end microprocessor capable of producing 4K video for a job quite easily done with three 555 timers worth a couple of cents. Never mind the complexity of the board.
I've no idea how three 555 times could turn bulbs on and off at many preset times. The purpose of this video is to demonstrate a principle that will be built on in future episodes.
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!
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.
@@ExplainingComputers ua-cam.com/video/BzpOHSaiQTg/v-deo.html
I Am I Love With The Respberry Pi Mini PC. This is Amazing n Superb!
Great video, where's the video on using the Pie for wireless home automation that you mentioned near the end of the light bulb video please ?
That video is now complete, and releases here next Sunday (May 26). :)
The raspberry pi is becoming more standard for industrial groups and home automation tinkering as it's so well documented and exposed as well as disposable cheap.
Thank you for that Video. Very interesting. Could you make one with the I2C Bus and I/O's as well as Analog I/O's? Would be very interesting. If 3 Relays are not enough and if someone would like to use an Industrial 4-20mA Pt100 device for example. or RS485 Modbus.
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.
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.
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
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.
Very good. I'm going to investigate C programming of the Rasberry.
Hello Christopher from the US. I’ve been watching your videos for awhile and of course, I subscribe to your channel. I love this idea for a new series of projects for Raspberry Pi! I’ve got several Raspberry Pi Zero, Zero W, Zero WH, 3b and 3b+ and I’m constantly tinkering with them. I noticed in your video you referred to the black metal parts that you screwed into the backside of the HAT as “risers”. Over here in the US we call those “standoffs.” It might also be helpful to note where you can purchase these. Thanks so much for your videos. I’m always looking forward to the next one.