No video

Raspberry Pi Automated lights with 8 channel relay, PIR motion sensor

  Рет қаралды 519,397

skiwithpete

skiwithpete

Күн бұрын

Пікірлер: 213
@kestonmendez4290
@kestonmendez4290 5 жыл бұрын
Great job sir! Looks awesome... I'm not there yet hahahaha, just getting started but OMG great work..
@SirCumferance
@SirCumferance 7 жыл бұрын
That wiring, that was what I needed to see. Thanks man
@chrisjheath1768
@chrisjheath1768 4 жыл бұрын
I know this video is a few years but it’s an excellent project that has inspired me to do something similar. I love the wiring too, great work. Cheers.
@RB-be4yf
@RB-be4yf 7 жыл бұрын
awesome job. I suggest lining up all your outputs in one line to avoid wiring mess later. Wires coming in from your lights will be crossing the other terminal blocks, unless you use some wireways.
@jawa6306
@jawa6306 5 жыл бұрын
This is gorgeous. Inspiration for this year's Christmas lights.
@atilizam
@atilizam 9 жыл бұрын
Already done this for my final year project and using this as my base circuit..but for my project, i add some feature such as web-based gui, switch, temperature sensor, and pir sensor..thank you for the great tutorial..it really help me a lot.. 😊
@skiwithpete
@skiwithpete 9 жыл бұрын
I'm happy to hear it! Any chance you'll post a vid or some pictures?
@atilizam
@atilizam 9 жыл бұрын
skiwithpete i think gonna post it in future when i have some free time as i already disassembled everything..
@skiwithpete
@skiwithpete 9 жыл бұрын
atilizam Can I ask what course the final year project it was for? I haven't done any training, and I wonder what sort of courses I could complete with my projects?
@atilizam
@atilizam 9 жыл бұрын
skiwithpete i'm in electronics engineering (computer)..the project was for my bachelor degree..me as well doesn't go for any training..just learn by myself through internet.. **i wonder if i answered your question..bit bad in english..huhu..
@ahmadizzarudinzainudin2412
@ahmadizzarudinzainudin2412 5 жыл бұрын
hi. can u sent to me the codingfor ur fyp project? i would like to try it on
@stopthephilosophicalzombie9017
@stopthephilosophicalzombie9017 3 жыл бұрын
Love the sound of those little relays clicking. Why the sequential delay between them?
@jdjz62
@jdjz62 8 жыл бұрын
Just found your channel today, fantastic videos! Thanks for taking the time to make and share!
@azraelsgrave
@azraelsgrave 9 жыл бұрын
I am curious outside just tinkering for fun what this would be applicable for. As they sell kits that can expand far beyond this capability in the $100+ range. And my guess with the pi, the boards, and everything the cost of this came close to that. Also why pull on a cloth? You can install a switch for that.
@skiwithpete
@skiwithpete 11 жыл бұрын
That's exactly the plan - I hope my next video will be about the software. I plan to run PyEphem which will enable me to calculate sunrise and sunset and only run the lights at those times (for example, sunset to midnight and 530AM to sunrise). Still need to finish the code to a level I'm happy with - then I'll post it.
@hydrolisk1792
@hydrolisk1792 7 жыл бұрын
For every one here that is asking if a relay can control something, well first I think you should go learn what a relay is used for and how it works then ponder if you can do what ever it is you are trying to do with it. Here is a basic description of what a relay is and its use. A relay is basically an Electro-mechanical activated switch. In most cases the coil voltages has nothing to do with the contacts of the relay. Once the coil has been activated with the proper voltage (in this case 5VDC) the contacts at the other end close (COM and NO contacts) and you have a closed switch similar to one turning on a light switch. A relay is used to control a generally higher heaver load with a small logic (or low voltage) device such as an Arduino or Raspberry Pi. So effectively one could slap together a small program with a motion sensor and a relay with a pi to activate the lights in a room when someone walks in to it. Make sure to always read the contact rating on the relay before switching a higher load to make sure the relay can handle it and always make sure the relay is at least 15% more then the load being switched. It is good practice (for instance) if you want to switch 5A @120VAC to get a relay that is rated for 7-10A @ 240VAC This prevents the relay from pre-maturely burning up or even fire. In the case of switching mains lighting inside a residence, light switches are rated for 15A @ 120VAC even though most light bulbs are only pulling a max of 100W which is roughly 1A @120VAC if you have a single socket lamp attached to that switch.
@prashkd7684
@prashkd7684 4 жыл бұрын
have you works in panel building shop ?? Its rare to see such neat wiring
@bruceyoung9791
@bruceyoung9791 3 жыл бұрын
Hmmmmm. I trying to build train engine from soldered/welded wire silhouette for Christmas decoration. The wheels will not moving. But on the wheels spokes I can light strings on and have them flash on/off to give that impression they are turning. If I could get the good code I start building for next Christmas. Do you have a video as such?
@skiwithpete
@skiwithpete 11 жыл бұрын
Hey Jonathan, I made you a video reply explaining the lights I use and what I use them for. Check it out *sorry, I can't post a link here* it's called: "Raspberry Pi: Automated Lighting Control - The Light selection". And, thanks for your comment. I think a lot of people buy the Pi to just be XBMC, which is cool, but only a sliver of what it's capable of. Enjoy.
@steve64464
@steve64464 11 жыл бұрын
So far i wired it into a keyboard PCB so i could make the rpi drive a tank in a pc game, Now im thinking of hotwireing it into a old large RC car to see if i can control it with the rpi etc. Its probly going to be a somewhat slow project for me as i dont know much python but i did manage to make a script turn on off relays when pressing 1-8 on keyboard.
@loxoko
@loxoko 11 жыл бұрын
The GPIO on the Raspberry PI is not 5V tolerant however I have a similar relay and Ive not seen a voltage higher than 3v on the relay pins but it would not hurt to put protection between the relay and Raspberry GPIO anyway. 3.3V is about safe for the Raspberry PI GPIO.
@steve64464
@steve64464 11 жыл бұрын
Ive managed to connect it to my rpi and got all relays going fine , It draws about 500ma from all relays being on at the same time which i assume is okay , I adapted some the python code from the LED blinking demos and managed to make it blink :-). Now i just need to think of some cool project to do with it.
@Goryl314
@Goryl314 6 жыл бұрын
i cant see any fuse on outputs is your power supply still alive?
@ColinRichardson
@ColinRichardson 9 жыл бұрын
I presume all the relays do not have to be powered by the same power source but just a choice you decided to make?
@EnergySeeker
@EnergySeeker 3 жыл бұрын
i connected the relays without power and cycle the lights i see the light flashing one y one but no clicking sound what is that means please ?
@thatonesnowboarde
@thatonesnowboarde 7 жыл бұрын
Why would you use an 8 channel relay? if one of the relays go back dont you have to replace the whole thing or your entire system will be down while you repair it? I also would suggest solid state relays as these relays are prone to failure
@billwatson4468
@billwatson4468 9 жыл бұрын
hi :) thanks for the great video. you have everything laid out so nicely. In regards to your sensor wiring, is there any chance you have a wiring diagram from the breakout to the relay. Thanks so much.
@skiwithpete
@skiwithpete 9 жыл бұрын
I don't, but I do have a video explaining the wiring to the relay directly. That's here. Raspberry Pi: 8 Channel Relay step-by-step with software examples for automation In terms of the breadboard, it simply has the Pi's 5V out to that, which then splits to the relay and the PIRs. Nothing more. Let me know how you get on. P
@chaseswafford
@chaseswafford 8 жыл бұрын
This is a complete work of Art and my OCD is very pleased!!! Where did you get the PI Case? I like that look.
@skiwithpete
@skiwithpete 8 жыл бұрын
+chaseswafford This is the updated version of that case on Amazon: amzn.to/1OsWJ53
@jonathanbailey5996
@jonathanbailey5996 11 жыл бұрын
Very nice. I love the organization. What are the model lights you are using, such as wattage I guess is what I am asking. I love the RPI.. just this year I got into coding... so it is really helping me with coding and seeing what I am coding. My first was the XBMC a 1 year ago today. Thanks for the videos.. Subscribed.
@skiwithpete
@skiwithpete 11 жыл бұрын
Hey Nathaniel, Check my new video *sorry, I can't post a link here* called: "Raspberry Pi: Automated Lighting Control - The Light selection", where I explain which lights I use. It likely won't be much use for your concert lighting - but who knows?
@jwebb1975
@jwebb1975 10 жыл бұрын
Ok, so your 12v power supply answered my question. To run my bilge in my boat that would be the 12v from my battery, into the relay. All other power for the pi would come in via my usb connector. Good video, and wonderful cabling!
@skiwithpete
@skiwithpete 10 жыл бұрын
Hey thanks so much. Hope it serves you well! The videos you've been looking at are all PIR controlled, but you might also check out my video: Raspberry Pi: 8 Channel Relay step-by-step with software
@mitchh16
@mitchh16 11 жыл бұрын
Nice work! What are your plans when it's running? Is the script going to run on boot & only a certain time of the day??
@stanislasnguimatsa2555
@stanislasnguimatsa2555 8 жыл бұрын
I find your fantastic installation is it possible the diagram?
@johnnyrizzo8057
@johnnyrizzo8057 7 жыл бұрын
cool idea. how did you overcome voltage drop? did you inject power at the lights?
@steve64464
@steve64464 11 жыл бұрын
I managed to obtain one of these boards the other day , On the jumper what should it be set to if i wanted to use a external 5v source? as someone suggested takeing it from the gpio could damage the rpi.
@BorysMB
@BorysMB 10 жыл бұрын
Hi, i've made similar setup as Yours but with 2 channel relay board module,( not using any script yet ) but in my case there is a problem, when PIR is waiting for movement relay bard is ( "ON" ) when the movement is detected relay is getting "OFF". Is should be inversely. What i could do wrong ?
@raduen2hadmi78
@raduen2hadmi78 4 жыл бұрын
Man!!! You made my day.
@tausifibrahimmohammad7666
@tausifibrahimmohammad7666 6 жыл бұрын
Could you make a video of raspberry pi project of classroom light and fan monitoring
@robertpoynton9923
@robertpoynton9923 7 жыл бұрын
I was thinking of doing this in my new home. Run all the lights on 12vdc but what would be the voltage drop and would I need to have about 500a power supply?
@mitchh16
@mitchh16 11 жыл бұрын
Very cool. Never heard of PyEphem till now, thanks for the info! I'll subscribe and keep updated with your work. -Mitch
@roystervi
@roystervi 7 жыл бұрын
Hi I am running an home automation software HA,, Can the relay handle hooking up to a washing machine (+or-) to cut the power off? I have some 5v single relay and I like to ask 1st before I start connecting them to receptacles. Also I notice an 14gauge with cannot fit the relay because the screw cannot screw in. any ideas of relays I can use for my project . I want to cut off my washing machine and well pump when its not is use...
@juanguajardo3369
@juanguajardo3369 10 жыл бұрын
Really Cool Stuff! I just got my first raspberry pi and home automation is my plan. I am a novice in programming so any suggestions, books that might catch me up to speed?
@skiwithpete
@skiwithpete 10 жыл бұрын
Hey glad to hear you're starting on your mission. My suggestion is you get a relay and start playing. Start small and simple. And, don't rush. Once you figure it all out, and know what you want to do - get an electrician round to build it with you and check your work. I get a lot of panicked emails saying they're in the dark and I need to help fast... these things take time. And keep me posted. As far as reading material: Google it.
@juanguajardo3369
@juanguajardo3369 10 жыл бұрын
Thanks!
@jashenberner1
@jashenberner1 10 жыл бұрын
I have recently started using www.checkio.org/ to help me learn how to write in python. It's free so I would recommend checking that before buying any books or such.
@CShand
@CShand 6 жыл бұрын
I hope your going to Mount that in a panel that is larger than an industrial star delta starter for a 8kw motor lol
@TheWoofacyp
@TheWoofacyp 9 жыл бұрын
Awesome Project!!!! Really smart!!! Can this be used for 220volt lights as well?
@TheWoofacyp
@TheWoofacyp 9 жыл бұрын
skiwithpete Sorry about this. I was just wondering because i would like to connect some table lamps in my house sort of an experiment with the raspberry pi. If you say is dangerous i believe you and i know but is it possible?
@skiwithpete
@skiwithpete 9 жыл бұрын
George Georgiou Yesterday, I published a video showing exactly that - and I quickly and widely received criticism from the community. Not only was what I was showing extremely dangerous, but even then I was not clear if the parts I was using were correctly certified for the task I was doing - and I thought I knew what I was doing! So, my best answer is: change your table lamps to a 12V or 24V system as I plan to do - then try it. If you want to play with mains, contact a certified electrician - NO IN BETWEENS.
@9kraby9
@9kraby9 9 жыл бұрын
cool video, very inspiring.
@parisisal
@parisisal 4 жыл бұрын
Is there the possibility to integrate in the project also "ordinary" button ? Would be interesting create an hybrid manual/remote light control system.
@skiwithpete
@skiwithpete 4 жыл бұрын
yep. Just need another trigger with a momentary switch.
@parisisal
@parisisal 4 жыл бұрын
@@skiwithpete As "ordinary" button i mean the button that you have installed in the walls. Like Vimar, Btcino...
@skiwithpete
@skiwithpete 4 жыл бұрын
@@parisisal yeah, a button is a button is a button. As long as the connection triggers the program...
@parisisal
@parisisal 4 жыл бұрын
A button sends a pulse at 220v. Would be intresting how integrate it...
@dragonx5150x
@dragonx5150x 10 жыл бұрын
What are the plastic pieces connecting all the wires. Specifically the brand or part no in the video.
@skiwithpete
@skiwithpete 10 жыл бұрын
The clear plastic pieces are "Terminal Blocks." I bought them at the hardware store (in the electrician section beside the wire) and cut them to lengths of 6.
@alexroberts3437
@alexroberts3437 10 жыл бұрын
Very cool project. What is the gauge of the orange and black wire that you are using?
@skiwithpete
@skiwithpete 10 жыл бұрын
I have moved to Manhattan and left this project behind with a friend. To my recollection it was 14-16. I can't remember if it was 14 or 16... Single core. Hope that helps. P
@camcam6745
@camcam6745 8 жыл бұрын
i have a similar 12 volt lighting setup for my house. i would like to knwo if it is possible to add wifi on off witch that can be controled with my cell phone. is therw a way a could contact you?
@ricardowinsislao3997
@ricardowinsislao3997 6 жыл бұрын
is there any way I can pull up particular relay and control it manually On/Off? the same command I can integrate to a we page button so I can press on or off? many thanks, a novice here....
@OriginalRaveParty
@OriginalRaveParty 6 жыл бұрын
Lovely neat logical wiring
@steggeawraam4500
@steggeawraam4500 9 жыл бұрын
Hi what model on the raspberry do you use??. And great video!!:)
@donster222
@donster222 9 жыл бұрын
very interesting, thank you. I presume that since there is no "physical" connection between the Pi's GPIO and the power on the other side of the relay you don't need to protect the Pi in any way with a resistor or something from surges or spikes?
@WhygamingL2
@WhygamingL2 7 жыл бұрын
so basically you are using rpi as a simple timer? Any timed relay can do that and it would be cheaper also. Its nice project you have here but i just dont see the point.
@skiwithpete
@skiwithpete 7 жыл бұрын
NotSoSerious Net eventually there will be zones, persistant lighting and control from a mobile...
@WhygamingL2
@WhygamingL2 7 жыл бұрын
that sounds more like it :) Good luck with this project! i will start mine from today maybe but mine will be industrial machinery controls with touch screen and set of relays. Anyway keep up the good work!
@kojakeugenio1064
@kojakeugenio1064 10 жыл бұрын
I would like to learn how to setup like this. Is there a thorough tutorials for beginners?
@skiwithpete
@skiwithpete 10 жыл бұрын
Check the about section. And subscribe. There'll will be a new video from me in a couple of days with a complete set of instructions and several sample scripts. P
@skiwithpete
@skiwithpete 11 жыл бұрын
See my "How to connect it up" video, linked in the description of this video. Sorry, I can't post a link in this section. There are two concerns which lead people to suggest not using the 5v: 1) is about drawing too much power from the 5V which will cause the Raspi to restart - not a problem I've faced. 2) returning 5V to one of the GPIO pins will fry the circuitry, however, I'm returning it to GND, not a GPIO pin (look at a schematic to understand).
@ronaldfernandes5697
@ronaldfernandes5697 4 жыл бұрын
You did not use 110v. You hv mounted 12v output to the light. But how many amps did the 12v has
@skiwithpete
@skiwithpete 4 жыл бұрын
Iirc it was 6a, and I needed to divide the lights so that 6a was sufficient to power them all.
@Polliny86
@Polliny86 10 жыл бұрын
nice idea!!!! but you can realize it easier and cheaper for example with a atmel mega 8 controller
@Tyrone-Ward
@Tyrone-Ward 5 жыл бұрын
Not really. A Raspberry pi w ∅ is $5 and for an inexperienced developer, Python much easier to learn and program in.
@tubeDude48
@tubeDude48 10 жыл бұрын
Thanks for the code!
@johncrowelladams
@johncrowelladams 7 жыл бұрын
I thank you
@jimistephen
@jimistephen 10 жыл бұрын
Okay, I have a question. Can you trigger all 8 relays at once, or do you have to trigger them one at a time. I would think you'd want to do them all at once.
@skiwithpete
@skiwithpete 10 жыл бұрын
Yeah triggering them all at once is just a matter of changing the python code to remove the half-second delay. In the about section, you'll find part 2. Check that out, it's where you'll find all the source scripts.
@skiwithpete
@skiwithpete 9 жыл бұрын
stegge awraam Model B, but it could be done on any. I suggest the B+ if starting from scratch.
@SC-cz8kq
@SC-cz8kq 6 жыл бұрын
skiwithpete, the Crystal Spectrum to the Pineal Gland is wireless Incorporated internally in a humans anatomy. Before freedom or free well of man Externally sold any electromagnetic ideals in a textbook. So which came first, textbook, or Instructions by internal thought given?? Tesla once argued, who is giving me this thought?? It's not textbook..there is nothing written. He then began working with frequency in a wireless magnetic field. In conclusion man is wireless, and has a wireless connection to creativity of creation. So the Genesis 11 frequency of the altitude, "tower of Babel" was a change of frequency from internal communications with no external device, to viberation of vocals, and tongues external.
@josephiles
@josephiles 9 жыл бұрын
very cool
@dutchdronevieuwdronevieuw4787
@dutchdronevieuwdronevieuw4787 7 жыл бұрын
Nice, i like this things. i am 15 years old and i want to make this too. how can i made that in smaller One and cheaper. i want to play with this things. sorry for me had Englisch.
@brahimelboudani601
@brahimelboudani601 9 жыл бұрын
Will you be able to provide a code please ? if possible ? really good tutorial I would like to see how the code works
@skiwithpete
@skiwithpete 9 жыл бұрын
Brahim el boudani The code is in this video. kzfaq.info/get/bejne/pceWkt2CyNjLZ5s.html
@tubeDude48
@tubeDude48 10 жыл бұрын
What I was trying to get is the code you have with both Relays and PIR. I haven't seen any code with the two together...
@skiwithpete
@skiwithpete 10 жыл бұрын
#!/usr/bin/env python # -*- coding: utf-8 -*- import subprocess import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) PIR_PIN = 7 GPIO.setup(PIR_PIN, GPIO.IN) def MOTION(PIR_PIN): print 'Motion Detected!' # subprocess.Popen ("this_is_your_relay_script.py", shell=True) print 'PIR Module Test (CTRL+C to exit)' time.sleep(2) print 'Ready' try: GPIO.add_event_detect(PIR_PIN, GPIO.RISING, callback=MOTION) while 1: time.sleep(100) except KeyboardInterrupt: print 'Quit' GPIO.cleanup()
@skiwithpete
@skiwithpete 10 жыл бұрын
Ted Mieske I separate it out. Above you'll find trigger.py which is the default "trigger" I use to set off a script.
@wesleywilliams4716
@wesleywilliams4716 9 жыл бұрын
what are the white things that join the cable called?
@skiwithpete
@skiwithpete 9 жыл бұрын
Wesley Williams Hey, the clear things are called "Terminal Blocks." The white things are quite simply called "Cable Clips" - I've put links to both in the about section. Terminal Blocks - amzn.to/1yqbSfm Cable Clips - amzn.to/1HPiJEl
@skiwithpete
@skiwithpete 11 жыл бұрын
Glad to hear you've got it working. Check out my new video which is opening and closing my garage doors! And, keep me posted on what you end up getting yours to do. Cheers, P
@JimfromIndy
@JimfromIndy 8 жыл бұрын
Pete, I keep trying to find definitive instructions on how to use the GPIO pins as input. I keep running into crazy complex and boring spec sheets. They all talk about using resistors and other such stuff. Any videos or blogs on how to use them? I want to use my RPi for a double garage door control using my phone. I'm getting closer with using gpiopi, but the hardware (on the input side...) still mystifies me. Resources?
@skiwithpete
@skiwithpete 8 жыл бұрын
+Jim Shaffer I think you just want to read a switch right? Check this out: learn.adafruit.com/playing-sounds-and-using-buttons-with-raspberry-pi/overview
@JimfromIndy
@JimfromIndy 8 жыл бұрын
+skiwithpete I can't figure out why the 10kOhm resistor. The switch grounds the pin when it's actuated. That seems straightforward. What does the resistor connection to 3.3v do?
@tonydew
@tonydew 8 жыл бұрын
+Jim Shaffer I know I'm late on this, but this thread has a good explanation: www.raspberrypi.org/forums/viewtopic.php?f=44&t=46525 Essentially, the resistors are not *required* per se, but are a safety measure against frying the Pi if you make a mistake and set a GPIO pin to output when you meant input.
@LukasVolpers
@LukasVolpers 11 жыл бұрын
Dude you are way too orgenized :D
@ajayden
@ajayden 8 жыл бұрын
I have a light that runs on 6v. Can I use the 12v 8 channel relay to control the light?
@skiwithpete
@skiwithpete 8 жыл бұрын
the relay is just a switch, so yes, you can control your 6v light with it.
@skar603
@skar603 9 жыл бұрын
im wanting to use a rasbery pi and a relay board to control 12v aux applications in my vehicle. do you happen to have the software to do this and the software to allow me to control these items from a touch screen connected to the rasberry pi? the only programming i have done was years ago with visual basic 6 and im unfamiliar with the rasberry pi's language.
@skiwithpete
@skiwithpete 9 жыл бұрын
Michael Siegel Check out my relay tutorial with software examples here: kzfaq.info/get/bejne/pceWkt2CyNjLZ5s.html
@DigitalLandscape
@DigitalLandscape 9 жыл бұрын
Hello, great project! Good explainations! I plan to implement an simular project using those relais boards and a raspberry pi 2 B+. The plan is to control my gardening environent like pumps, filters and lamps by a webserver and PHP. I guess you are also using the GPIO's, provided by the Raspberry. I ask myself, if the 3.3VDC outputs of the GPIO's are really able to control the 5VDC inputs of the relais-board. I mean - in your video I'm able to see that, but in other forums, people tend to include an amplifier or transistors to push the signal. Do you have any experiances with that or does that really work rock solid without amplifying the signals? Greetings from germany. Alex
@skiwithpete
@skiwithpete 9 жыл бұрын
+Alex G the 5v out from the raspberry pi powers the relay and the 3.3v pins control the switches. I have a number of relay vids and suggest you check them out.
@tubeujoe
@tubeujoe 8 жыл бұрын
+skiwithpete ft ggggfmgfey
@sohaibahmed8820
@sohaibahmed8820 3 жыл бұрын
Can we use atmega instead of raspberry pi??
@skiwithpete
@skiwithpete 3 жыл бұрын
The planned webserver part of this project that I'd planned required more power. But as you see it here, yes Arduino would be enough.
@skiwithpete
@skiwithpete 11 жыл бұрын
Hey Nathaniel, I did this for 12V LED lights. Contact a professional Electrician before playing with mains.
@chriscarroll2175
@chriscarroll2175 8 жыл бұрын
im looking to control billiard table lights. Any suggestion how this can be achieved? I need to have a program with table icons that when clicked will switch table light on and start recording the cost of the table. For example if it was 10 pence per minute, each minute that the table is on the total for that table would increase by 10 pence. I need this for 16 tables. Anyone out there able to write the script for this? Willing to pay.
@skiwithpete
@skiwithpete 8 жыл бұрын
Look at my garage door remote video. That's done with a website and a relay controlling it. It would be super easy to expand that to a 16-channel relay.
@samhankin
@samhankin 10 жыл бұрын
Hi, thanks for the video. It's very useful. Just out of interest what 12V power supply are you using?
@skiwithpete
@skiwithpete 10 жыл бұрын
I got it at Jaycar in NZ. Unfortunately it doesn't appear to be on sale there anymore, so I can't send you a link - but it is very similar to this one from HPM www.bunnings.com.au/hpm-12v-60w-garden-light-transformer_p4374665 But calculate the amount of Watts you'll need as they come in a variety of sizes.
@samhankin
@samhankin 10 жыл бұрын
skiwithpete Awesome! Thanks for the quick reply! I'm looking at the relay board as well - would a solid state relay work just as well? Have you had any experience using solid state?
@skiwithpete
@skiwithpete 10 жыл бұрын
***** Hey Sam, No i haven't played with Solid State relays. Hoping someone will donate enough to me to be able to get some ;) Cheers, P
@skiwithpete
@skiwithpete 10 жыл бұрын
***** If you're asking, this is the one I'd like to test: www.ebay.com/itm/1pcs-250V-2A-8-Channel-OMRON-SSR-G3MB-202P-Solid-State-Relay-Module-For-Arduino-/290908894602?pt=LH_DefaultDomain_0&hash=item43bb85758a
@samhankin
@samhankin 10 жыл бұрын
skiwithpete Yep - they're not too badly priced actually. I believe they only work with AC though - so it wouldn't work in this example.
@gregg5574
@gregg5574 7 жыл бұрын
Where can i get the script and what would i need to set it up to work
@skiwithpete
@skiwithpete 7 жыл бұрын
Greg G check my other relay videos...
@mangyaninthecity99
@mangyaninthecity99 6 жыл бұрын
Do you have diagram of that and component ?can have copy....hihihi
@bertfranyie3946
@bertfranyie3946 6 жыл бұрын
Hey, I called my attention that the hot line goes into NO connection in the relay, instead of COM. Is this correct? I have seen other tutorials where the hot line goes to COM and the hot line of the equipment goes to the NO. Since this could be dangerous, I would like to get the whole concept right, thanks in advance.
@skiwithpete
@skiwithpete 6 жыл бұрын
Humberto Franyie you're right. Hot should go to COM. Device should be NO or NC.
@bertfranyie3946
@bertfranyie3946 6 жыл бұрын
Thank you!!! Nice tutorial
@Potato_217
@Potato_217 8 жыл бұрын
what are you using to control the pi with another computer?
@skiwithpete
@skiwithpete 8 жыл бұрын
That's SSH. It's a great way to remote in to another computer.
@Dexterbostic
@Dexterbostic 6 жыл бұрын
can the PI work more thin just 8 relays ? maybe 200?
@KhayyamAbdullah
@KhayyamAbdullah 6 жыл бұрын
yes
@okaylol3334
@okaylol3334 6 жыл бұрын
Great!
@JustinDiazJokes
@JustinDiazJokes 6 жыл бұрын
is it a better idea to be switching the LIVE signal instead of NEUTRAL? i dont remember which one is better or if there is a better way.
@VinnyGjokaj
@VinnyGjokaj 6 жыл бұрын
It is better to switch the Live (Hot- as called from where im from). If you switch neutral you would leave the potential of the circuit to the voltage potential of your house (which in a perfect would be okay since everything is insulated but in reality its not) where as if you switch the live youd leave the circuit with the difference between neutral to ground which is okay as it wont do anything if someone touches it.
@wtfiswiththosehandles
@wtfiswiththosehandles 6 жыл бұрын
WTF are you talking about... This is a 12V system.
@VinnyGjokaj
@VinnyGjokaj 6 жыл бұрын
I know its a 12v system, he stated that in the video! I guess i misread his question, i took it as; "is it a better idea to switch LIVE signal or NEUTRAL" as in a general case.
@JustinDiazJokes
@JustinDiazJokes 6 жыл бұрын
Vinny Gjokaj yeah I meant in general.
@al-eysaelvators4594
@al-eysaelvators4594 7 жыл бұрын
please ,I want to know how i can control it by whats app commands
@ronangpower
@ronangpower 10 жыл бұрын
Any chance you have a searchable part number for that bank of relays ? and which interface on the PasberryPi did you use to connect them ?
@skiwithpete
@skiwithpete 10 жыл бұрын
All of that information is available in the about section of Part 2 - unfortunately I can't post a link here, but check the about section on this video for the link. Thanks, P
@ronangpower
@ronangpower 10 жыл бұрын
skiwithpete thanks my bad, I didn't recognise your voice from video 2 to video 3 until i back tracked from 3 to 2 and saw it was your vid too., :-) I saw that, but more importantly wondering about a possible part number for that relay bank as i have seen them in year of old but cant seem to find any PCB mounted and assembled kits these days in the usual suspects shops,(RS/Farnell etc) sorry about the cross post on the inter connectivity question.
@skiwithpete
@skiwithpete 10 жыл бұрын
Ronan Power I have bought many different relays for the Pi. I'll see if I can have a look later, at this particular one - but do a search on ebay for 5v optocoupler relay. That's what I look for. Cheers, P
@ronangpower
@ronangpower 10 жыл бұрын
skiwithpete That 8 channel relay board is proving very difficult to find from any electronics wholesaler a part number would be so nice ;_0 But in my search i did find this thing that many user might find very useful for a low voltage electronics or robotic application : called PiFace and sits right on top of the GPIO pins inside the Pi footprint limited on IO though but handy i have one now to play with but could really do with some relays i dont have to build out myself :-) www.element14.com/community/docs/DOC-52857?CMP=KNC-EU-RPI-ACC-PIFACE
@skiwithpete
@skiwithpete 10 жыл бұрын
Ronan Power Hey Ronan, I've recently moved countries, and I hope that my container will arrive through customs in the next week or so - until then, I can't give you the part #. You're not the only one asking, and I have made contact with a supplier who will be able to consistently provide these relays - but again, I haven't been able to test the product out yet, as I'm waiting for my Pis to arrive. In the meantime: www.ebay.com/itm/New-Eight-8-Channel-Relay-Module-With-optocoupler-Fr-PIC-AVR-DSP-ARM-Arduino-5V-/171265879930?pt=LH_DefaultDomain_0&hash=item27e03def7a But that link will only work until it sells...
@georgeraymond1462
@georgeraymond1462 5 жыл бұрын
Really fucking cool man. Is this on github? I found your channel for keyboard stuff but I love the hardware stuff as well. I just built my first pi project. We kinda reverse engineered Alexa using node.js and google cloud speech to text api. Hard wired some LEDs and TA DA cheap knockoff of Alexa. That project kinda made me want to play with hardware more so I figure I have to build my next board instead of buying something.
@bhavishubhu7230
@bhavishubhu7230 5 жыл бұрын
This can be done by aurdino !!! I think ... Why u used rasberry?
@skiwithpete
@skiwithpete 5 жыл бұрын
So I could add WiFi, a lamp server, and more.
@tobynorton7805
@tobynorton7805 9 жыл бұрын
FYI- The link to get the 5V/2A power supply is dead!
@skiwithpete
@skiwithpete 9 жыл бұрын
Toby Norton Updated! Cheers, P
@PLeeA99
@PLeeA99 8 жыл бұрын
Pete, how are you wiring up the motion sensors? Also, do you have the script that incorporates those motion sensors? In part two, I see the python script but it doesn't seem to match up with the one shown here in Part 3... Thanks for your videos!
@skiwithpete
@skiwithpete 8 жыл бұрын
+Phil Austin Keep your eyes peeled for a video on that in the next couple of weeks. If you need the code more urgently than that, let me know and I'll paste it below when I get home from work.
@PLeeA99
@PLeeA99 8 жыл бұрын
skiwithpete Not a huge deal, don't feel like you have to do anything on my behalf. I got all the parts and am excited to get motion sensing LED's in my kitchen! My kids always seem to be running into things at night, hopefully this will help with that. :)
@skiwithpete
@skiwithpete 8 жыл бұрын
+Phil Austin I'll do my best to get it to you tonight. In terms of wiring, it's just 5V and GND with the middle wire going to the GPIO. I use BCM numbering... so you'll see that in the code I share tonight.
@PLeeA99
@PLeeA99 8 жыл бұрын
skiwithpete sounds great! i did get that far by some research and following the wires in your videos. :) my issues seems to be in the python script. You're the man, thanks Pete!
@skiwithpete
@skiwithpete 8 жыл бұрын
+Phil Austin Here's the code. You need an init .py script with underscores if you want to use the subprocess line as written. #!/usr/bin/env python # -*- coding: utf-8 -*- import subprocess import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) PIR_PIN = 7 GPIO.setup(PIR_PIN, GPIO.IN) def MOTION(PIR_PIN): print 'Motion Detected!' # subprocess.Popen ("this_is_your_relay_script.py", shell=True) print 'PIR Module Test (CTRL+C to exit)' time.sleep(2) print 'Ready' try: GPIO.add_event_detect(PIR_PIN, GPIO.RISING, callback=MOTION) while 1: time.sleep(100) except KeyboardInterrupt: print 'Quit' GPIO.cleanup()
@seanlovesjobo
@seanlovesjobo 7 жыл бұрын
Ugh, I thought this related to openhab somehow. Nice work though!
@FrederikMunchHansen
@FrederikMunchHansen 6 жыл бұрын
Hi SkyWithPete, have you ever experienced some trouble with the 8 channel relay? I experience that the relay might be clicking on and off for some of the relays, when I have 6 channels running at the same time. Could you maybe solve my problem? I have tried with two different raspberries. One old and one new version. No difference. The 8 channel relay is a 5V channel relay and I have tried to use the JD-VCC connections for extra power supply. Still no difference. What should I do? :-(
@skiwithpete
@skiwithpete 6 жыл бұрын
You need to add more power to your pi (you should have at least 5V2A) and if you already have that and still have problems, you should get a separate power supply for the relay.
@FrederikMunchHansen
@FrederikMunchHansen 6 жыл бұрын
Hi there, I already have connected 2.5A for my Pi. Also I have added extra power supply - but the external power supply is only 5V1A - is this not enough? Maybe it's wrong connected up? It's working, but sometimes it's flickering a lot, which is really sad and also bad for the lightbulbs. Could you maybe send me a wiring diagram for the correct wiring with the external power supply? Thanks for answer.
@skiwithpete
@skiwithpete 6 жыл бұрын
With external supply, you simply remove the jumper JDVCC and VCC and plug the power into VCC and GND accordingly. But, if you've already done that I worry that it's your relay that is bad. I've never had a problem with flickering even using a 1.5A Pi only supply. Your's is definitely an Optocoupler relay - correct?
@FrederikMunchHansen
@FrederikMunchHansen 6 жыл бұрын
Well, that sounds pretty crappy for me. What about the JD-VCC pin? Should it just be left? Should I still connect VCC + GND with the 10 pins to the Pi?
@FrederikMunchHansen
@FrederikMunchHansen 6 жыл бұрын
Watching this movie doesn't support you way to connect external power supply - which one is the correct one? :) kzfaq.info/get/bejne/i9hgqpqHyrK8YGw.html
@PD-iz2ws
@PD-iz2ws 6 жыл бұрын
Can you control the relays with an app?
@skiwithpete
@skiwithpete 6 жыл бұрын
Watch my Garage Door Remote with a Raspberry Pi or my 1-Channel relay video to see how I do it on my phone.
@ndkcha
@ndkcha 10 жыл бұрын
can you tell me the tools used in this ?
@skiwithpete
@skiwithpete 10 жыл бұрын
1 screwdriver, shielded. 1 wire cutter. 1 pair of pliers. 1 hammer. 1 drill. Is that what you wanted to know?
@ndkcha
@ndkcha 10 жыл бұрын
Yes! Thanks!! Can you explain the relay in terms of load ??
@skiwithpete
@skiwithpete 10 жыл бұрын
Anand Kacha Better if I just give you the link: www.ebay.com/itm/8-Channel-5V-Relay-Shield-Module-Board-Optocoupler-module-Arduino-ARM-PIC-AVR-/161317483666?pt=LH_DefaultDomain_0&hash=item258f457492
@ryhu4755
@ryhu4755 6 жыл бұрын
what is the max voltage/amperage this relay can control?
@skiwithpete
@skiwithpete 6 жыл бұрын
This relay was a 220V 10A - but don't play with mains power. Yours may be different and it's a bad idea to play at the top end of any non-certified, non-professionally installed device. I built all of this on 12V so no one can get hurt.
@ryhu4755
@ryhu4755 6 жыл бұрын
I was thinking of a 120v lighting project, nothing crazy. I was wondering if it was only good for low voltage (12v etc) or if I could use it with 120v applications. Is it not a listed device?
@ryhu4755
@ryhu4755 6 жыл бұрын
BTW, thanks for the content and reply!
@morlanius
@morlanius 6 жыл бұрын
using a pi for this really overkill
@MonaichFother
@MonaichFother 4 жыл бұрын
Arduino then?
@DerekDickerson
@DerekDickerson 9 жыл бұрын
85k holy smokes
@keyboard_toucher
@keyboard_toucher 6 жыл бұрын
why do you need to run your lighting script with sudo?
@skiwithpete
@skiwithpete 6 жыл бұрын
Geoff McQueen the gpio control was only on sudo. This may have changed.
@worldschaos2181
@worldschaos2181 7 жыл бұрын
have you tried this with a raspberry pi 3?
@skiwithpete
@skiwithpete 7 жыл бұрын
Yes. it is compatible with pi 3
@worldschaos2181
@worldschaos2181 7 жыл бұрын
skiwithpete can you show how to hook it up? I was not able to get mine to work. I am starting to think my relay is bad.
@skiwithpete
@skiwithpete 7 жыл бұрын
I have several videos like that. Please search.
@drewbush6535
@drewbush6535 6 жыл бұрын
wow wish i could do that. i know people with ling driveways need automatic lights all around the house
@nurfatinwahidahbintimohdsi993
@nurfatinwahidahbintimohdsi993 7 жыл бұрын
can i know how to make this project?
@skiwithpete
@skiwithpete 7 жыл бұрын
Fatin Wahidah check the video description for more information
@truko22
@truko22 6 жыл бұрын
KDE4 :D
@TanTan-ni4mg
@TanTan-ni4mg 6 жыл бұрын
You seem to know enough to be dangerous.... YIKES!
@skiwithpete
@skiwithpete 6 жыл бұрын
This is all based on low-voltage (12V and 5V) sources. Don't play with mains.
@fusseldieb
@fusseldieb 6 жыл бұрын
A Arduino would do that just fine. It's cheaper and more reliable..
@skiwithpete
@skiwithpete 6 жыл бұрын
Fusseldieb but I wouldn't be able to add the higher functions like web control. Nor a system that dynamically responds to weather forecasts. Agree that in the state you can see here Arduino would be fine, but the plans for the project exceed that.
@denesjavorek8709
@denesjavorek8709 6 жыл бұрын
Webcontrol can be accomplished via simple ReST API on ESP32, but I can see your point. No way you can fetch weather data as well. It could work, but the code would be horrible.
@kevinbacon8716
@kevinbacon8716 6 жыл бұрын
Damnit I need to learn python
@45ArmedJeepFreak
@45ArmedJeepFreak 7 жыл бұрын
I hope you are not really switching the neutral on all of those outlets! That would be begging to kill someone. The narrow blade of the receptacle is the hot wire and that is the one that should be switched. The wider blade is the neutral or 'grounded' side of the outlet and should never be disconnected. Please check with any electrician before you get yourself or someone else killed! - Other that that - nice project -
@justinmassengill5591
@justinmassengill5591 7 жыл бұрын
? Are you watching the right video? This is 12 volt with no outlets.
Кадр сыртындағы қызықтар | Келінжан
00:16
Joker can't swim!#joker #shorts
00:46
Untitled Joker
Рет қаралды 40 МЛН
Challenge matching picture with Alfredo Larin family! 😁
00:21
BigSchool
Рет қаралды 43 МЛН
UNO!
00:18
БРУНО
Рет қаралды 5 МЛН
Effective Ways To Detect People With Common Sensors
7:43
Core Electronics
Рет қаралды 70 М.
RASPBERRY PI - All  About controlling Relay Boards for Home Automation
15:05
How to Use a PIR Motion Sensor with Raspberry Pi
12:24
Tech With Tim
Рет қаралды 113 М.
Raspberry Pi Automation #1: Mains Relay HAT
15:03
ExplainingComputers
Рет қаралды 272 М.
How To Use A Relay With Raspberry Pi Pico
11:59
Core Electronics
Рет қаралды 25 М.
Build a DIGITAL MAGIC MIRROR - Full Tutorial
24:26
DIY Machines
Рет қаралды 199 М.
7 Common LED Strip FAILS and How To Avoid Them
12:14
The Hook Up
Рет қаралды 9 МЛН
Кадр сыртындағы қызықтар | Келінжан
00:16