Raspberry Pi Automation #1: Mains Relay HAT

Поділитися
Вставка
  • Опубліковано 23 лис 2024

КОМЕНТАРІ • 617

  • @kjeldgaard0
    @kjeldgaard0 5 років тому +3

    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!

    • @ExplainingComputers
      @ExplainingComputers  5 років тому

      Thanks for your kind feedback. Appreciated.

    • @markawbolton
      @markawbolton 5 років тому

      I concur. I really appreciate your professionalism.

  • @TheSwitzAutomotive
    @TheSwitzAutomotive 5 років тому +2

    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"

  • @twoshedsjackson6478
    @twoshedsjackson6478 5 років тому +25

    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 роки тому +1

      Support via patreon and install adblock. That's what everyone should do.

  • @reggiep75
    @reggiep75 5 років тому +6

    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!

  • @joshuavstheworld7
    @joshuavstheworld7 4 роки тому +2

    Finally someone that explains the code. As a beginner looking at scripts is a bit confusing sometimes.
    Thanks!

  • @yoonpark8311
    @yoonpark8311 5 років тому +1

    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 років тому +33

    “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 років тому +1

      I never get invited to the cool parties!

  • @SBCBears
    @SBCBears 5 років тому +148

    "Lightbulb sequencing parties"!? Ohhh... the high life. Too rich for my blood.

    • @calmac3723
      @calmac3723 5 років тому +11

      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 років тому +3

      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 років тому +1

      @@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 років тому +4

      When RGB just won't cut it

    • @calmac3723
      @calmac3723 5 років тому +3

      @@jasongooden917 😂😂

  • @wasitacatisaw83
    @wasitacatisaw83 5 років тому +66

    Always look forward to your videos. Sunday isn't Sunday without Stanley the knife and Mr Scissors.

    • @MarkoVukovic0
      @MarkoVukovic0 5 років тому +3

      I was just thinking exactly the same!

    • @canwenot573
      @canwenot573 5 років тому +2

      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.

  • @DiverJames
    @DiverJames 5 років тому +6

    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 :)

  • @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.

  • @elviraeloramilosic9813
    @elviraeloramilosic9813 5 років тому +22

    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.

    • @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 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
      @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: ua-cam.com/video/Zv8wt9TIXog/v-deo.html

  • @asteele7931
    @asteele7931 5 років тому +1

    Nice A team and Magyver reference, did not realize y'all had watched that across the pond

  • @peterjansen4826
    @peterjansen4826 5 років тому +2

    "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 років тому +1

    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.

  • @jinchoung
    @jinchoung 5 років тому +1

    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.

  • @CharloSeychell
    @CharloSeychell 5 років тому +1

    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.

  • @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.

  • @davydoo13
    @davydoo13 5 років тому +2

    You are amazing you explain things so adequately that’s why I got into Linux mint

  • @ObsidianMercian
    @ObsidianMercian 5 років тому +1

    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!

  • @Jim-be8sj
    @Jim-be8sj 5 років тому +3

    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.

  • @pete-the-nete
    @pete-the-nete 5 років тому +1

    Your commentaries always make me smile - keep them up, PLEASE!

  • @xPowerdriverx
    @xPowerdriverx 5 років тому +2

    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.

  • @h2o-fpv623
    @h2o-fpv623 5 років тому +2

    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.

  • @BorgSwarm
    @BorgSwarm 5 років тому +1

    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.

  • @jezzermeii
    @jezzermeii 5 років тому +1

    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.

  • @dcc1165
    @dcc1165 5 років тому +1

    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. :)

  • @petesday8632
    @petesday8632 5 років тому +2

    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 :)

  • @AnimalFacts
    @AnimalFacts 5 років тому +1

    This is gonna be a fun series.

  • @Kevin-mx1vi
    @Kevin-mx1vi 5 років тому +1

    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.

  • @ronniewilliams3420
    @ronniewilliams3420 5 років тому +2

    Very informative and concise video SBC and applications. Thank you for filtter thur all noise on this subject.

  • @freesaxon6835
    @freesaxon6835 5 років тому +1

    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 )

  • @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

  • @old_guard2431
    @old_guard2431 5 років тому +1

    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.

  • @jezebabe
    @jezebabe 5 років тому +4

    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.

  • @dale9616
    @dale9616 5 років тому +1

    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!

  • @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...

  • @icenesiswayons9962
    @icenesiswayons9962 5 років тому +1

    My brother and I have been discussing such an automation, thank you for helping.

  • @malcytull
    @malcytull 5 років тому +2

    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.

  • @benkerr9051
    @benkerr9051 5 років тому +2

    This is definitely going to be used for controlling lights, fans and pumps in indoor hydroponic gardening setups.

  • @jasongooden917
    @jasongooden917 5 років тому +12

    Stanley the Knife, Mr. Scissors and Crinkle Crinkle all in 10 seconds. Your on a roll today.

  • @apoch003
    @apoch003 5 років тому +1

    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. :)

  • @jcpartri
    @jcpartri 5 років тому +2

    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.

  • @getyerspn
    @getyerspn 5 років тому +1

    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.

  • @leonidas14775
    @leonidas14775 Рік тому +1

    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

  • @ytbabbler
    @ytbabbler 5 років тому +2

    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

  • @springlj
    @springlj 5 років тому +2

    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.

  • @davidrichmond3709
    @davidrichmond3709 5 років тому +1

    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.

  • @sihledotcom
    @sihledotcom 5 років тому +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?

  • @BigRalphSmith
    @BigRalphSmith 5 років тому +1

    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! :)

  • @SembeiNorimaki
    @SembeiNorimaki 5 років тому +1

    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.

  • @mikiethebikie
    @mikiethebikie 5 років тому +1

    Thanks Chris, PI working in the real world is great to see. Thanks for the example.

  • @migueldias1292
    @migueldias1292 3 роки тому +1

    its nice that you included the code with beard numbering as well, thank you!

  • @appalachianwanderer4634
    @appalachianwanderer4634 5 років тому +2

    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.

  • @MegaMiir
    @MegaMiir 4 роки тому

    I got super excited when the lights lit up in sequence, great stuff!

  • @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 !

  • @SmallSpoonBrigade
    @SmallSpoonBrigade 5 років тому +1

    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.

  • @ridefast0
    @ridefast0 5 років тому +1

    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.

  • @realevostevo
    @realevostevo 5 років тому +1

    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.

  • @NewAgeDIY
    @NewAgeDIY 5 років тому +3

    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

  • @zmooc
    @zmooc 4 роки тому +1

    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.

  • @peterjansen4826
    @peterjansen4826 5 років тому +3

    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!!! 😃

  • @MrJaz8088
    @MrJaz8088 5 років тому +1

    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. :)

  • @椰糠种植者
    @椰糠种植者 5 років тому +1

    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.

  • @dragonboyjazz
    @dragonboyjazz 5 років тому +6

    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 років тому +2

      Sounds good. I will be looking at light and PIR (movement) sensors as triggers in a later episode of this series.

    • @dragonboyjazz
      @dragonboyjazz 5 років тому +1

      @@ExplainingComputers good on yu mate, ill be looking forward to it!

  • @WokLover
    @WokLover 5 років тому +1

    so watchable as usual..can't wait for the next one.

  • @nickhenley8040
    @nickhenley8040 5 років тому +1

    Looking forward to using light and temperature sensors to trigger relays.

  • @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

  • @ummmjames
    @ummmjames 5 років тому +2

    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!

  • @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.

  • @frigbychilwether
    @frigbychilwether 5 років тому +2

    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.

  • @DFX2KX
    @DFX2KX 5 років тому +1

    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.

  • @crash5868
    @crash5868 5 років тому +1

    Try...Finally. Takes me back to my Delphi days.

  • @ashtongrist
    @ashtongrist 4 роки тому +1

    oh im so glad i'm back here. Please keep doing this

  • @edrymes3653
    @edrymes3653 5 років тому +1

    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. ;-)

  • @esurfrider7687
    @esurfrider7687 5 років тому +1

    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

  • @JohnDoe-tm2sc
    @JohnDoe-tm2sc 5 років тому

    Excellent start. Hopefully will get to more complex apps.

  • @sanjaybhatikar
    @sanjaybhatikar 4 роки тому +1

    Your Raspberry Pi videos are the coolest 😎 🙏

  • @resrussia
    @resrussia 5 років тому +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!

  • @sethrd999
    @sethrd999 5 років тому +1

    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.

  • @3dlabs99
    @3dlabs99 5 років тому +12

    print("... and I hope to talk to you again...")
    time.sleep(3)
    print("... very soon")

  • @LMacNeill
    @LMacNeill 5 років тому +1

    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?

  • @TheNZJester
    @TheNZJester 5 років тому +1

    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.

  • @anthonycalia1317
    @anthonycalia1317 5 років тому +1

    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

  • @tasmedic
    @tasmedic 5 років тому

    I love these videos. Everything is always so beautifully and brightly lit.

  • @brianwakem7258
    @brianwakem7258 5 років тому +3

    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.

    • @ExplainingComputers
      @ExplainingComputers  5 років тому +2

      Useful feedback, noted for future videos.

    • @MichaelSchwagerPlace
      @MichaelSchwagerPlace 5 років тому +1

      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!

    • @MichaelSchwagerPlace
      @MichaelSchwagerPlace 5 років тому +1

      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.

    • @ExplainingComputers
      @ExplainingComputers  5 років тому

      Just to note that with the onscreen clock turned off, CPU utilization is about 1% running this loop. :)

  • @blevenzon
    @blevenzon 5 років тому +3

    Ahhh yesss!!!! This is the meat and potatoes type content. Thank you ever so much!!!

  • @tedjennings34
    @tedjennings34 4 роки тому

    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.

  • @michelfilion5482
    @michelfilion5482 5 років тому +1

    Great video. Again you make it seem so effortless.

  • @frankkoslowski6917
    @frankkoslowski6917 5 років тому +1

    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.

    • @ExplainingComputers
      @ExplainingComputers  5 років тому

      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.

  • @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 роки тому +1

      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 ua-cam.com/video/BzpOHSaiQTg/v-deo.html

  • @wajahatahmad2551
    @wajahatahmad2551 4 роки тому +1

    I Am I Love With The Respberry Pi Mini PC. This is Amazing n Superb!

  • @Wayne-Pr
    @Wayne-Pr 5 років тому +1

    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 ?

    • @ExplainingComputers
      @ExplainingComputers  5 років тому

      That video is now complete, and releases here next Sunday (May 26). :)

  • @williamhart4896
    @williamhart4896 5 років тому

    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.

  • @JS-do2ye
    @JS-do2ye 3 роки тому +1

    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.

  • @h2o-fpv623
    @h2o-fpv623 5 років тому +3

    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.

  • @dquinceyhjornevik7823
    @dquinceyhjornevik7823 5 років тому +2

    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 років тому +1

      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

  • @srtcsb
    @srtcsb 5 років тому +2

    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.

  • @StephenNu9
    @StephenNu9 5 років тому +1

    Very good. I'm going to investigate C programming of the Rasberry.

  • @fixed.computer
    @fixed.computer 5 років тому +2

    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.