1 week later I have my parts and the free time, it works! You're awesome man!!! I'm a full time software engineer, but I've never messed with this stuff before. So cool!
What pi did you end up using? I’m in uk and can’t find the exact one that’s in the video- I’m also new to the pi so don’t know the difference between the models!
@@i_Tubs have you found what you were looking for? I am using the pi Model B rev 2 and i did have the issue acouple of years ago, that swpete was talking about, but revisiting this, it just simply worked... okay, after adjusting the GPIO numbers in the list. as long as you know what pi you are ussing you can search the 'net for pin/gpio layout. This also worked for me using raspberry pi 3
Stephen Viner yes thanks Stephen. In the end I just went for the 4gb pi 4, for the extra £20 or so I thought it would be worth to go for the newest and highest spec one! Got it controlling my Christmas lights at the moment!
Watching this in 2020! :) Did my first use of GPIO with a spare RPi 2 v1.1 and your same 8 relay module. Pinout was the same. Worked flawlessly with your script. My board is attached to cabled Ethernet not WiFi. Thank you very much.
Hi I have just hooked up the Raspberry pi 3 to the 8 channel relay board exactly how it is in this video , however i had an intermittent problem with channel 3, this was easily solved by moving the wire for GPIO pin 4 to GPIO pin 5 and Edited the code at the start of the script to output to GPIO5 pin instead, problem solved. great Video clear instructions and got to the point without beating about the bush.
James are you using the same relay? I cant get it to work and its suggested that i get an external power source for the relay. I am using RSpi 3 model b.
Very simple but effective demo. I'm a network engineer by trade and like many I have a test lab at home full of kit I can connect to remotely. Downside is leaving it all on so it's accessible can burn something like 650-700w. The plan is to borrow some of the principals and code you kindly provided to be able to connect remotely to the Pi and power on only the equipment I need, only when I need it. Hopefully saving me a heap on my energy bills! It should also be a fair bit cheaper and more fun than buying a proper network managed PDU off the shelf :)
This is just one person's opinion, but I think that the general profile of people who watch these videos is that of someone who puts themselves to work and produce stuff, people on the internet who just want to be entretained by YT videos end up not having fun, being bored and frustrated which makes them angry and toxic.
Just noticed that the relay supports two power supplies - one from the PI and the JCC being the 5V for the relays. These can operate independently as from the internal diagram, the two parts (input control and relay control) are connected via a photo diode . As each relay requires 20mA, then it would seem better to use a separate power supply. To change, remove the jumper. Connect the PI power supply using the GND and VCC on the jumpers next to the inputs, and use the other GND,JVCC to connect power for the relays
I DISCOVERED your channel JUST&ONLY NOW!!! and I LOOOOOOOVE IT!!! YOU ARE MY SAVIOR!!!!BLESS YOU WHOEVER YOU ARE!!BLESS YOU BLESS YOU BLESS YOU BLESS YOU BLESS YOU!!!
Hi matey update is, the 8 channel relays I got are faulty. I since brought 4 channel relays from another ebay seller and its all working great! Thanks for your help!
Thank you so much for the tutorial videos. It took me a few days to figure it out, but finally, everything worked just like your video. I had to edit the scripts a little to update the print commands, but then everything came to life. Please post more - we appreciate them, and the work you put in.
Hi, I think the problem with the delay in minute 9:30 is a thing that use to happen to me when I was programming applications using C in linux. Many devices use buffers for operation. The program screen output is called stdout in C and if you don't free the buffer, it will remain stuck some times until the program ends. So the solution is to flush the bufer tight after you need to: printf("seven"); // the C instruction for printing seven on the terminal fflush(stdout); // the instruction to force to free the screen buffer I guess it must work the same way on other programming languages. Regards
+Andres Pinilla Yes, this is the way to go. When we want a thing to occur in almost realtime, then we have to do like that. In one of my projects long ago, I had to read keypresses and avoid multiple presses; I had used fflush(). Thanks for sharing.
I just built my relay box 8 channels similar to how you have yours set up, mine is a box looking thing but non the less functions just like your does. However I do not get the same problem as you on the test script countdown the very first one you run, it lags out at 7 8 and yours but on mine it does not do that at all, Even with all WiFi Bluetooth and HDMI with Ethernet didn't make it trip like that I'm not sure why your is doing that. My model is the pi 3 b+. Thank you so much for this video it worked wonders for my build, I built a controllable 8 channel wall plugs 4 of them but able to control individually by snipping the positive connecting piece on the plug thus I can control 8 plugs. I'm using mine for this years Christmas lights show. Yes I went with mains on this project because of what I wanted to do, I know everyone says stay away, but your good if you have the right equipment, a gfci plug goes a long long way to test these things and common sense is the best form of safety. Also the pi supply's all the power to the relay board on my setup, no additional power source needed, I also using python coding to control so that may play a factor idk I'm knew to the pi world and loving it, not knew to how pc's works and what not but knew to tinkering with it and controlling it the way I want it to be controlled is awesome
The question about why the output stopped displaying when using the Model B may have been rhetorical, but if not, I'd guess that there wasn't enough current to run the relays and the wi-fi adaptor, so when you operate enought relays, the wifi stops working. The code finishes, the wi-fi comes back on and the laptop them displays the remaining counts 7, 8, 9. My suggestion would be to give the relay board its own 5V supply.
A quick way to test this theory would be to have a continuous ping going to the device IP - i.e. "ping 192.168.0.2 -t" in CMD Windows, if the pings drop "Request timed out", then you'd know communication to the Pi over Wifi was stopped.
Dude, this is awesome! I have no programming experience, but the idea of programming something for automation is awesome. I would like to get a raspberry pi to learn how have it water plants at a certain time/length of time as a fun, side project. Great work! :)
Thanks a ton for all the videos about the RaspberryPi & 8ch relay! Im planning on doing the same in my rather small garden, since i dont have any lights atm. Keep up the great work man! :)
Awesome video love it !!!! Question im trying to connect a relay switch with Bluetooth to turn on a light by Bluetooth from a vibration sensor? So when the vibration sensor goes off it turns on the light. Thank you 😊
Thank you for the tutorial. I am resurrecting a 5 loop guitar effects rack that I built in the late 80's. I am dropping one of my effects and focusing on using four relays for clean signal switching and the other four for powering LEDs at the foot controlled switch box. I have been told that I can simply apply digital on and off signals to the relay triggers. However, it would be better if four input switches could enable a more complex array of effects e.g. 1=comp, 2 = comp+dist, 3 = dig delay, 4 = octaver + dig delay. My question, yet unanswered, is how do I get my dry closures from my foot switches inputted into the RasPi or other?
Power the relays externally. On the set I have (mine are made by Sainz but they are all the same), the JD-Vcc is 5VDC, and the Vcc is 3.3VDC. Power the relays externally and you won't draw down the power buses on the Pi. I have run banks of 8 relays this way with no issues.
Nice job explaining clearly! I setup my new PI and I think it doesn't have enuf power as the older models do. I get the full display on the screen of each step but no response from the 8 channel board. Is there a 3.5 V 4 or 8 channel board or can I somehow get 5 v to the PI?
Thank you so much for this. Followed the instruction and using this now for an Aliuminum Can crusher project. I'll share the automation code once done. Thanks again.
Hey thanks to his video I've got a crazy idea to build a car computer / infotainment thing for my 2011 Jeep JK. Much like the Alpine X109-WRA. So I got a Raspberry Pi 3 B I think it's the plus and this same relay board within an acrylic. Now my question is I want to run everything through a touchscreen and make auxiliary switches through the touch screen for off road lights, lockers, winch, etc. I've got a fuze box to run the 12v from my Jeep to each really through a 30A fuze and a ground bus for all the grounds. My biggest issue is the software. I really like the Blynk app but since my Pi has arrived in the mail yet I'm worried it won't work on the Pi unless connected to the internet. Any ideas that I can use for the touchscreen switches?
Hi Pete, I like the video and am wanting to do something along these lines. What I want to do is set up a relay to switch from an external power source (the grid or battery bank) to an internal one (ThermoVoltaic cell bank within the heating unit) when the internal source reaches the proper voltage for the DC motor. Do you or anyone else have any thoughts or advice?
I'm currently undertaking a project in which we have to use a raspberry pi to control some pumps and also a couple of rotary/ linear actuators. Is this the sort of route we should be going down to enable us to do this, or would it be better to use transistors? (I have no experience in electronics so this is all very new to me!). Thanks for any help.
I have questions, I want to program an LED lightshow to music (not pixles, just regular 12 volt LEDs) how much is the output of the replays, it can’t be anymore than 12v or it will fry my custom made LED strand. I wired a bunch of 12v single LEDs together to make a strand. If this is more power than I need, where can I find a board that I can use LEDs on and program it with my raspberry pie?
So my question is how easy would it be to throw a light detecting diod that could control if a relay state is on or off. I want to setup a controll system with my aquaponics system and possibly use it to control a robotic arm kit to tend the plants.
Following this video Using Relays and Relay Boards with the Raspberry Pi we should use 3.3V for Vcc (GPIO pin 1) and 5V for JD-Vcc (GPIO pin2) to hadnle relay board better. Hope you will sometime update your great video with this info. Thanks.
I’m not that savvy on computers but i have been watching your videos and are wonderful. I just would like to no what is the best raspberry pi for doing a light show or what to install a program. Can you make a video on this of how to start and end on it. Thx
Thanks for this tutorial... When i try to connect the 8ch relay with Rpi, channel 8&3 are in HIGH and other channels are in LOW state: Why is this happening? also this following error occurs.. RuntimeWarning: A physical pull up resistor is fitted on this channel!
1) You should explain what Ground and VCC stands for (1:30). 2) Not sure whether having a delay in the output (but not in the actual action) should be thé reason not to pick a model B, unless it is power-usage linked (although, if you don't need all 8 ports, it's probably be less of a problem). PS: difference in pin lay-outs: raspi.tv/wp-content/uploads/2014/07/Raspberry-Pi-GPIO-pinouts.png
Dylan Manthei Q1) Yes. Q2) I don't know, that's outside of the scope of my knowledge. If you can get it down to 5V, I don't know why you couldn't - but I don't know for sure.
Hello, thanks for the great video. I bought a pi today and wanted to do what you are doing, but i have no idea how to set up my pi with a mac, like you did in the video (being able to run raspbian/control gpio pins from a mac). Im pretty sure i have all of the materials i need: SD card with raspbian, wifi dongle, ethernet cable, and of course the pi and a mac. I know its probably gonna be too long to explain over this, but do you know any articles that can show me how to set up a pi and use it like you did in this video? thanks so much
Really like this video. I added the coding to setup all 8 of my relays and they all work. I have two questions: 1. When the webpage initializes it takes two button presses to activate the relay. Would it be that there is NO initial state set to Low for all outputs? If so how can I fix it ? 2. How can I Add a function to a button to cycle on/off. I have a couple of garage doors that I want to control, so a single press of the button would be good. Thanks For any suggestions
+Ed Lentz Q1: Great question but I don't know. Have you tried a different browser? Q2: You probably want to watch my garage door vid: th-cam.com/video/p2abZ90-eU0/w-d-xo.html (basically you want to add a timer to the relay to have it trigger for .5secs or so)
+skiwithpete Wow quick reply! I tried Edge and it wouldn't work at all. I am using Chrome on both my laptop, phone (android) and a tablet and they all work the same. Firefox doesn't work at all, funny that Edge , and Firebox force me to login before they present the page. I don't get that in Chrome at all. I have seen your Garage video and I have that working, I woul dlike to incorporate it into the relay page, looks nicer :) I am pretty green on all this. I don't know how to change the buttons to run the .py scripts
+Ed Lentz Q1) I'm still sorry, and I still don't know. Hopefully someone else will read this and be able to provide insight. Q2) I don't quite understand yet. Are you saying that you've got an 8 channel relay and one of them will control a garage door? In that case, all you need to do is trigger the correct script with the button press.
+skiwithpete No worries on the Q1. On Q2, maybe I should just use the index.php from the garage door video, get the buttons to get bigger and line them up. I would just then need to remove the timing for the .py scripts for the other relay functions I wanted.
Hi, Thanks for the tutorial, I am thinking using this setup as part of a project. However I am a bit confused on which type of Raspbery pi to use. I would like to avoid the use of an additionnal power source for the relays. You mention that for this reason, only the type A should be used. Will the A+ or 2B (in the part list) that were not out at the time will work without "burning"? Thanks in advance
Thank you, I did set this up i am using B model however the lights come on as yours did but the relay never changes state it never closes although the light changes state and there is no noise for any of the relays, I bought 3 of these and all three do exactly the same thing
First, just make sure that they are optocoupler relays. If they have bulb type LEDs, then you might have the wrong type. If they are optocoupler try changing the high and lows in the script to see if that gets you different results.
Thanks for the video, very nice. I could use some help if you don't mind. The relay seems to be working just fine as expected, clicks and all. What I'm trying to do is light up a LED with the relay, but it is not lighting up. I have the - side connected to COM, and if I plug the + side in to either NO or NC, I get no light. The LED is good and tested by connecting it to a battery. Can you help with what I'm missing so that I can light up external LEDs?
Tom Huck Sounds like there's something wrong here. I show how to connect the Relay in this video: th-cam.com/video/WpM1aq4B8-A/w-d-xo.html at the 7:45 mark. If you're connected to COM and NC, the light should be on with no power to the Relay. If not there's something wrong. You can test it with a multimeter. What do the solders look like underneath the board?
Great video...excellent quality. In my RPi circuits I always use a secondary power supply even if what's needed is 5volt for the external board. I connect the grounds together and things work fine. I'll order the relay on amazon and give it a try with the model B using an Edimax Wifi dongle. I'll post back my results.
I want to use a similar set up for starting a car, I only need 3 to 4 relays, which will in turn activate 30~60 amp relays @ 12VDC, should I use an A board for this as well? I have been hesitant to buy any hardware cause I don't know anything about it, but my build is getting stale and I need to make a move before the year is up.
I followed this tutorial and used a raspberry pi B+, but my relay would not work. in the end i found that i had to use an external 5v power supply straight to the relay board vcc. and another for the pi.
I am trying to do the same and apparently RSpi 3 model b cannot power the same relay used on this video. Where did you find the power adapter for the relay? did you make on yourself or can you buy it of the shelf?
okay!! thanks. Can you help me out with this example, like to control an individual relay from a 8 channel relay using a mobile phone. Each relay has individual control on the phone, and also through switches connected to the pie. I'm totally new to Pie.
Hi, can i know the command you gave to test the relay, it will be a very helpful command to test the relay before starting the project Thank you in advance
Hi Thank you for the video. I was following along your video and I noticed that the GPIO pin only provides 3.3v when they are on HIGH so my 5V relay only blinks, but does not give a control and that click sound/ How did you manage to supply the relays 5V with GPIO outputs?
I have a 16 relay module that uses 12v 320ma, while powering the relay module I also have the relay module powering my raspberry pi 2. Its nice.. No noticeable lack of power to the pi since there is no dimming or shutting off of the red power led as an indicator.
About the bug on RP B when it hangs on the 6th switch, i i don't think its a power problem, its more like a architecture problem of the board. I'm using the RP B+ and this same problem happened to me . using the GPIO 10 and 9 together would cause the problem so i switched them to GPIO 13 and 26 and now i can open all the RELAYS
Great Video!!! One question. Can you use these scripts on any Raspberry pi model? I figured out a way to get around the power issue from a different video and was hoping I could still use these scripts. Thanks.
so i can just connect 120 volts to the common and to the 120 volts 10 amps lamp and it will light up ? do i need anything between the light and that relay ?
Few questions: Is the click from the Relay? Can the click be silenced or is that just an effect of the relay? Could you use more relays on the pins from the outside edge of the RPi? I have a B+ with the 40 pins be used? I'm guessing I'd need to use external power. Thanks!
Why did you not connect a resistor in line with the gpio pin? I have heard you can cause some serious problems by not putting in a resistor when using gpio pins. Thanks!
Great video I'm trying to get my kettle to turn on via my phone from my bed in the morning while i get dressed. Also I am a electrician so I don't mind messing with mains (hopefully won't burn out my board though) but I will say i'd cost more than a few dollars to check your work safety wise lol. Although yea, don't be stupid folks. keep out of your 120v/240v mains.
Try all the codes on model B and they work fine. I ran them using Python 3 so for print statement, I would to add parentheses like so print("xxxx"); semicolon should be removed from the codes as well. Your codes are for python 2. Don't see the strange thing you encouraged. By the way, there's no click sound on the relay...which is great. Thank you.
I am thinking of this video/technique to build an electric menorah that will go on and sundown, off at sunup, and display the correct lights. I doubt I'll get it done by Chanukah this year, but when/if it's done, I'll post a comment here.
My guess would be lack of power, you see the little yellow jumper on the relay board? With that jumper in, the pi is energizing the relay coils which takes up too much juice for the model B. If you remove that jumper and plug in a separate 5v power supply properly, it will power the relays while the pi only turns on the opto isolators or transistors.
skiwithpete yep, as whyvas says, it's a power-related problem. The relay coils will draw quite a bit of power form the 5v line (12v coil relays would draw less, but then you'd need to use two supplies - 12v and 5v. The combined current draw from your PSU of the Pi itself plus the relay coils supplied form the Pi 5v pin is way beyond what can be tolerated. That's whey the first few work, but the last don't. A simple way to test/prove this would be try with a Mod-B and activate the last 2 or 3 relays alone, they should work, but not when you want them all to switch. In a perfect world, you would use a good 5V 1A or 2A PSU for the RasPi and another 5V PSU for the relay board/s. That's 1A or 2A real measured output, not what it claims on the label ;) That way the coil of the relay doesn't load the Pi power rails in any way. The relays may, if you are lucky, have a coil current rating on them, in mA, or a resistance (from which you can work out the coil current using Ohm's Law) - or you may have to look it up from the relay model code. They will also have the switch-side ratings on there too, probably 10A/120v and 7A/250v or similar, but you want the *coil* rating at 5Volts. 5Volt relays tend to be heavy on coil current (compared to 12Volt or 24Volt relays, Ohm's Law again) , some draw 125 or 150mA each when the coil is energised. Multiply the coil current rating by 8 (8 relays), then add some extra for the LEDs and Optocouplers on the board (I'd go for 100mA extra for them as a very,very safe estimate) and that's the current rating you need from the relay-board 5V PSU. Personally, I'd just use another 2A PSU for the relays, to be on the safe side and for an easy life, but that may be overkill. You might be lucky and get away with a 1A one, a lot depends on the relay rating/quality (*) The power supply "rails" as we call them are critical to any circuit's reliability, a saggy rail means trouble sooner or later. In your case, you hit it early on. Low-current coil relays, or latching ones, cost much, much more than standard ones. Common ranges for smaller 5v mains-rated relays are 36 Ohms up to 208 Ohms, at 5Volts, which gives a coil current of 138mA and 24mA respectively, so it can vary a lot depending on the relay: I (Amperes) = Volts / Resistance (Ohms) I =5 / 36 swapping that around.... 5 / 36 =0.138A (that's milliAmperes) approx same for the 208 ohm coil example: 5 / 208 = 0.024 A (that's 24 milliAmps) approx Asking the Pi to supply more than 1.11 Amps (138mA x 8 relays) plus some extra for the LEDs and optocouplers is going to cause a problem :)
Nice Video. One question, do I need to use breadboard and resistors in order for this to work? Or can I just plug straight from RPI to the relay board like you did?
Where does 8 channel relay come in handy? I’m just trying to understand relay part and where can you apply this in project? Where to? Can someone provide some scenerios?
Hey there, nice video really made me understand how the relay board works but I wanted to ask something. So what happens if you "plug" something into the relay (not the pins, I mean the other way around where you can plug wires) can you explain how can I control those?
I've already seen this one (great videos btw really helped me) but I'm talking about the software side of controlling. Like if I connect a light bulb for example, how will I be able to control it through my pi?
Thanks for the tutorial. I dit it with an Rpi model B rev 2 and it did juste fine. May be the problem you described is a software bug resolved in the latest version of the OS.
this is amazing ive just iscover raspberry pi and your job is excellent i need more imformations about the programming of this because i cant understand how you test it if you can give me some explanations pleaseee!!!And something else i need to put a ruspberry pi into me garage because the gear that contact with the old controler is damaged and i want to replay with this how can i do this!!!
Hey you should check out these two vids as they use relays and are complete projects: th-cam.com/video/WpM1aq4B8-A/w-d-xo.html and th-cam.com/video/p2abZ90-eU0/w-d-xo.html They'll probably help to give you a sense of what the relays do.
good job , very interesting and informative - suggest: you could use built in quicktime to record your laptop screen for an improved experience - also: how can we know / monitor the power draw issue more definitively (measure) ? A vs B vs B+ ?
great video. Do you need external power supply to control the relay board ? or just the power from Raspberry (5v) and will this work with the new raspberry pi 2? thanks
I am trying this for Christmas lights. I have a raspberry Pi model B+. Did you ever figure out what was happening with the ssh freezing? I haven't gotten my relay board yet so I cannot comment if it has happened or not. I am looking to get an external power source for my relay board however. Also, does it matter what pins I connect the relay board to?
I have calorifier in my garage... Can I use relay as a switch for it, or do I need any extra components? I'm in Europe so we use 220V, if that makes any difference I should mention it.
Very very nice video!!! But I have a question.. How can I place a text on the PHP file indicating the status of the relay?? Like, if I switch the button ON, a text or label will say " THE relay 1 IS ON".. And since I am using 8-channel relay, I would like to have an individual indicator message for the status of each relay.. I hope you could help me... Thank you in advance!!!
I greatly appreciate what you've put together here, it's helping me a lot. I've got all of the relays working my question is that I'm wanting to run an RS-360SH pump that supports 3v-12v power and I'm not certain on how to connect the pump to the relay. I've looked through many of your videos and I didn't seem to find one that shows connecting devices to the relay. Can I run the pump off of the raspberry pi or does it need a separate power supply? Thanks for your help!
Chandler Gray My 1-relay video probably best shows the answer. th-cam.com/video/3u45htuQeag/w-d-xo.html Basically you want to cut one of the wires from the power to the pump and send it through the relay.
skiwithpete That I what I thought but I wasn't sure if I needed to externally power the pump or if I could use one of the 5v leads & ground from the Raspberry Pi to power it. Thanks for the fast response as well!
skiwithpete One other thing I noticed in your Automated Lighting control video is that you have loops in & out between each relay. Pardon my ignorance, but if I were to have several pumps powered, how would I connect the relays?
Chandler Gray It's hard to describe without showing you, but "like this" th-cam.com/video/xc1daIb1LVc/w-d-xo.html you see how one wire connects all of the "ins" with those little loops? Then the outs go to each individual device.
Chandler Gray No, that would be too much draw on the pi. Try splitting the power from the source before it goes into the Pi. That way you could have one supply (say 5V5A) and split it so the Pi draws 2A and the pumps draw 3A. That's something I do in my th-cam.com/video/17-8kzAiuCQ/w-d-xo.html
I have a new raspberry pi 2 and looking to do christmas lights with music controlling it . what programs do i need to install on my sd card to get this started .
Awesome video walk-through, thank you! I didn't realize relay boards were this affordable. Q1) If I want to use the B+, can I connect all the GPIO and then provide power externally using the 5v/GND pins and a power supply? Q2) If the first answer is yes, can I use a voltage divider to drop my 24v supply down to 5v? In other words, will the required current be too high for small resistors (
Great video, this really helped me understand Raspberry Pi GPIO so much more. I'm currently working this video through and trying to get it to automate some lights. Working well so far! but my in4 on my relay isn't functioning. So I hope it's not one of my pins, I've changed the wire and that had no effect. Going to have to try it on a different GPIO pin.. :)
Can you use a raspberry pi to run all the functions in a car? eg: monitor engine and all sensors, control fuel, as well as all dash instruments... I don't know all that a modern car computer controls, was just wandering if the Raspberry Pi could do all that?
read the functions of a car or run the functions? Read - look up the ODBII or ODB2. Run - well you'll need to start with realtime kernels because some functions and sensors on a car needs capabilities beyond the responsive lagtime of an off the shelf Linux OS. And, this is way way wayyyyyy beyond my knowledge of Car CPUs and all of their functions. But, interesting question. Reply back as you dig into this.
8 ปีที่แล้ว
niiiice tutorial. How long those jumper cables from the relay to the GPIO can be to this to continue working fine?
Hey, man I am really confused about how the loop works. I made exactly as yours except I want it to run a test sequence such as turning all on/ off one at time. After the test I like to have 4 out of the 8 turning on 30 sec off 30s one relay at time. The last 4 relays on for 50s and off for 80s. All 8 is running in a loop after the initial test sequence. Can you help me out on this?
Watching and loving this in 2019
1 week later I have my parts and the free time, it works! You're awesome man!!! I'm a full time software engineer, but I've never messed with this stuff before. So cool!
What pi did you end up using? I’m in uk and can’t find the exact one that’s in the video- I’m also new to the pi so don’t know the difference between the models!
@@i_Tubs have you found what you were looking for? I am using the pi Model B rev 2 and i did have the issue acouple of years ago, that swpete was talking about, but revisiting this, it just simply worked... okay, after adjusting the GPIO numbers in the list. as long as you know what pi you are ussing you can search the 'net for pin/gpio layout. This also worked for me using raspberry pi 3
Stephen Viner yes thanks Stephen. In the end I just went for the 4gb pi 4, for the extra £20 or so I thought it would be worth to go for the newest and highest spec one! Got it controlling my Christmas lights at the moment!
try 2020 :P
I really love how you explain this everything such depth, all while sounding very non-monotone.
Keep doing what you're doing!
Watching this in 2020! :) Did my first use of GPIO with a spare RPi 2 v1.1 and your same 8 relay module. Pinout was the same. Worked flawlessly with your script. My board is attached to cabled Ethernet not WiFi. Thank you very much.
Awesome. Thanks for the comment!
Hi I have just hooked up the Raspberry pi 3 to the 8 channel relay board exactly how it is in this video , however i had an intermittent problem with channel 3, this was easily solved by moving the wire for GPIO pin 4 to GPIO pin 5 and Edited the code at the start of the script to output to GPIO5 pin instead, problem solved. great Video clear instructions and got to the point without beating about the bush.
Thanks!
James are you using the same relay? I cant get it to work and its suggested that i get an external power source for the relay. I am using RSpi 3 model b.
You sound like Christian Slater. I found this comforting and reassuring. Great video
Very simple but effective demo. I'm a network engineer by trade and like many I have a test lab at home full of kit I can connect to remotely. Downside is leaving it all on so it's accessible can burn something like 650-700w. The plan is to borrow some of the principals and code you kindly provided to be able to connect remotely to the Pi and power on only the equipment I need, only when I need it. Hopefully saving me a heap on my energy bills!
It should also be a fair bit cheaper and more fun than buying a proper network managed PDU off the shelf :)
This seems to be the most friendly community i ever saw on youtube.
This is just one person's opinion, but I think that the general profile of people who watch these videos is that of someone who puts themselves to work and produce stuff, people on the internet who just want to be entretained by YT videos end up not having fun, being bored and frustrated which makes them angry and toxic.
Top tutorial which has just resulted in a Pi, Relay, Asterisk mashup to control gate opening & closing via SIP. Thank you!
show us a vid when you get a minute to film it.
Just noticed that the relay supports two power supplies - one from the PI and the JCC being the 5V for the relays. These can operate independently as from the internal diagram, the two parts (input control and relay control) are connected via a photo diode .
As each relay requires 20mA, then it would seem better to use a separate power supply. To change, remove the jumper. Connect the PI power supply using the GND and VCC on the jumpers next to the inputs, and use the other GND,JVCC to connect power for the relays
I DISCOVERED your channel JUST&ONLY NOW!!! and I LOOOOOOOVE IT!!! YOU ARE MY SAVIOR!!!!BLESS YOU WHOEVER YOU ARE!!BLESS YOU BLESS YOU BLESS YOU BLESS YOU BLESS YOU!!!
Hi matey update is, the 8 channel relays I got are faulty. I since brought 4 channel relays from another ebay seller and its all working great! Thanks for your help!
999monkeymonkey Cool, glad you got it sorted. I just posted a new 4-channel tutorial this morning here: th-cam.com/video/OQyntQLazMU/w-d-xo.html
Thank you so much for the tutorial videos. It took me a few days to figure it out, but finally, everything worked just like your video. I had to edit the scripts a little to update the print commands, but then everything came to life. Please post more - we appreciate them, and the work you put in.
Hi, I think the problem with the delay in minute 9:30 is a thing that use to happen to me when I was programming applications using C in linux. Many devices use buffers for operation. The program screen output is called stdout in C and if you don't free the buffer, it will remain stuck some times until the program ends.
So the solution is to flush the bufer tight after you need to:
printf("seven"); // the C instruction for printing seven on the terminal
fflush(stdout); // the instruction to force to free the screen buffer
I guess it must work the same way on other programming languages.
Regards
+Andres Pinilla Yes, this is the way to go. When we want a thing to occur in almost realtime, then we have to do like that. In one of my projects long ago, I had to read keypresses and avoid multiple presses; I had used fflush().
Thanks for sharing.
s
I just built my relay box 8 channels similar to how you have yours set up, mine is a box looking thing but non the less functions just like your does. However I do not get the same problem as you on the test script countdown the very first one you run, it lags out at 7 8 and yours but on mine it does not do that at all, Even with all WiFi Bluetooth and HDMI with Ethernet didn't make it trip like that I'm not sure why your is doing that. My model is the pi 3 b+. Thank you so much for this video it worked wonders for my build, I built a controllable 8 channel wall plugs 4 of them but able to control individually by snipping the positive connecting piece on the plug thus I can control 8 plugs. I'm using mine for this years Christmas lights show. Yes I went with mains on this project because of what I wanted to do, I know everyone says stay away, but your good if you have the right equipment, a gfci plug goes a long long way to test these things and common sense is the best form of safety. Also the pi supply's all the power to the relay board on my setup, no additional power source needed, I also using python coding to control so that may play a factor idk I'm knew to the pi world and loving it, not knew to how pc's works and what not but knew to tinkering with it and controlling it the way I want it to be controlled is awesome
I build one of 30 years ago using a VIC-20 and a hand-build 4-relay board. Programmed it with BASIC.
Thanks man! Saw your video, immediately ordered the parts, just used wget on the Pi over SSH to get your scripts and it's all working. Brilliant!
+Luke Alderton :) Thanks. Let me know if you make a vid for your project and I'll link it here.
+skiwithpete Will do! I just hooked up the lamp on my desk. At first I was a bit hesitant to use the mains electricity but it works brilliantly. :D
The question about why the output stopped displaying when using the Model B may have been rhetorical, but if not, I'd guess that there wasn't enough current to run the relays and the wi-fi adaptor, so when you operate enought relays, the wifi stops working. The code finishes, the wi-fi comes back on and the laptop them displays the remaining counts 7, 8, 9. My suggestion would be to give the relay board its own 5V supply.
A quick way to test this theory would be to have a continuous ping going to the device IP - i.e. "ping 192.168.0.2 -t" in CMD Windows, if the pings drop "Request timed out", then you'd know communication to the Pi over Wifi was stopped.
Thanks for the video.. used it as my lockdown project for get my reef pi up and running.👍🏽
Dude, this is awesome! I have no programming experience, but the idea of programming something for automation is awesome. I would like to get a raspberry pi to learn how have it water plants at a certain time/length of time as a fun, side project. Great work! :)
The code is downloadable in the about section
Thanks a ton for all the videos about the RaspberryPi & 8ch relay!
Im planning on doing the same in my rather small garden, since i dont have any lights atm.
Keep up the great work man! :)
Awesome video love it !!!! Question im trying to connect a relay switch with Bluetooth to turn on a light by Bluetooth from a vibration sensor?
So when the vibration sensor goes off it turns on the light. Thank you 😊
I must say your videos are very impressive. The tutorials are great and I love the way you put in the links. Very nice.
Randy Rasmussen Thanks, that's very kind of you.
Thank you for the tutorial. I am resurrecting a 5 loop guitar effects rack that I built in the late 80's. I am dropping one of my effects and focusing on using four relays for clean signal switching and the other four for powering LEDs at the foot controlled switch box. I have been told that I can simply apply digital on and off signals to the relay triggers. However, it would be better if four input switches could enable a more complex array of effects e.g. 1=comp, 2 = comp+dist, 3 = dig delay, 4 = octaver + dig delay. My question, yet unanswered, is how do I get my dry closures from my foot switches inputted into the RasPi or other?
Bravo! It worked with my Raspberry pi 4 b. in conjunction with Mu 1.0.2. Finally i made it do something.
Power the relays externally. On the set I have (mine are made by Sainz but they are all the same), the JD-Vcc is 5VDC, and the Vcc is 3.3VDC. Power the relays externally and you won't draw down the power buses on the Pi. I have run banks of 8 relays this way with no issues.
Personally I like to use: from time import sleep
That way, you only need to enter: sleep(20) , rather then time.sleep(20)
Saves on code size.
Nice job explaining clearly! I setup my new PI and I think it doesn't have enuf power as the older models do. I get the full display on the screen of each step but no response from the 8 channel board. Is there a 3.5 V 4 or 8 channel board or can I somehow get 5 v to the PI?
Weird delay is from the Wi-Fi which was common back then. It wasn't fixed until *Pi 3 B* - Watched Dec. 2022
Thank you so much for this. Followed the instruction and using this now for an Aliuminum Can crusher project. I'll share the automation code once done. Thanks again.
Hey thanks to his video I've got a crazy idea to build a car computer / infotainment thing for my 2011 Jeep JK. Much like the Alpine X109-WRA. So I got a Raspberry Pi 3 B I think it's the plus and this same relay board within an acrylic. Now my question is I want to run everything through a touchscreen and make auxiliary switches through the touch screen for off road lights, lockers, winch, etc. I've got a fuze box to run the 12v from my Jeep to each really through a 30A fuze and a ground bus for all the grounds. My biggest issue is the software. I really like the Blynk app but since my Pi has arrived in the mail yet I'm worried it won't work on the Pi unless connected to the internet. Any ideas that I can use for the touchscreen switches?
Hi Pete, I like the video and am wanting to do something along these lines. What I want to do is set up a relay to switch from an external power source (the grid or battery bank) to an internal one (ThermoVoltaic cell bank within the heating unit) when the internal source reaches the proper voltage for the DC motor. Do you or anyone else have any thoughts or advice?
What a wonderful human u are. Respekt Bro
Watching and loving this in 2024
I'm currently undertaking a project in which we have to use a raspberry pi to control some pumps and also a couple of rotary/ linear actuators. Is this the sort of route we should be going down to enable us to do this, or would it be better to use transistors? (I have no experience in electronics so this is all very new to me!). Thanks for any help.
I have questions, I want to program an LED lightshow to music (not pixles, just regular 12 volt LEDs) how much is the output of the replays, it can’t be anymore than 12v or it will fry my custom made LED strand. I wired a bunch of 12v single LEDs together to make a strand. If this is more power than I need, where can I find a board that I can use LEDs on and program it with my raspberry pie?
So my question is how easy would it be to throw a light detecting diod that could control if a relay state is on or off. I want to setup a controll system with my aquaponics system and possibly use it to control a robotic arm kit to tend the plants.
This is a great video. After I copy/paste the script what is the cmds to run them? I am new to python
On pc, it'll be "py -3" + filename.py It depends on specific versions, os etc, but should be similar to it.
Following this video Using Relays and Relay Boards with the Raspberry Pi we should use 3.3V for Vcc (GPIO pin 1) and 5V for JD-Vcc (GPIO pin2) to hadnle relay board better. Hope you will sometime update your great video with this info. Thanks.
I have tried this method with the board shown in this video - and it simply does not work. Sorry.
Yep, I tried 3.3V with with B+ model and also it does not work. So only 5V and jumper on Vcc-JDVcc
Great posting, I love your pull to generate community from this video.
thanks for posting. it works
I’m not that savvy on computers but i have been watching your videos and are wonderful. I just would like to no what is the best raspberry pi for doing a light show or what to install a program. Can you make a video on this of how to start and end on it. Thx
You can remove the jumper and power the relay on jd-vcc with a seperate power supply!
Then you could do away with the VCC and the GND to the Pi , Correct ?
Fantastic video! Really appreciate the time you've put into this. Looking forward into delving into these projects!
Thanks! Hope you'll subscribe!
Thanks for this tutorial...
When i try to connect the 8ch relay with Rpi, channel 8&3 are in HIGH and other channels are in LOW state: Why is this happening?
also this following error occurs..
RuntimeWarning: A physical pull up resistor is fitted on this channel!
1) You should explain what Ground and VCC stands for (1:30).
2) Not sure whether having a delay in the output (but not in the actual action) should be thé reason not to pick a model B, unless it is power-usage linked (although, if you don't need all 8 ports, it's probably be less of a problem).
PS: difference in pin lay-outs: raspi.tv/wp-content/uploads/2014/07/Raspberry-Pi-GPIO-pinouts.png
Dylan Manthei Q1) Yes. Q2) I don't know, that's outside of the scope of my knowledge. If you can get it down to 5V, I don't know why you couldn't - but I don't know for sure.
Hello, thanks for the great video.
I bought a pi today and wanted to do what you are doing, but i have no idea how to set up my pi with a mac, like you did in the video (being able to run raspbian/control gpio pins from a mac). Im pretty sure i have all of the materials i need: SD card with raspbian, wifi dongle, ethernet cable, and of course the pi and a mac. I know its probably gonna be too long to explain over this, but do you know any articles that can show me how to set up a pi and use it like you did in this video? thanks so much
Does this offer the same protection as a programmable logic controller? It would be cool to use this to start a few horsepower induction motors.
Nice demo, why not use external power with model b, or newer models with relay card
Really like this video. I added the coding to setup all 8 of my relays and they all work. I have two questions:
1. When the webpage initializes it takes two button presses to activate the relay. Would it be that there is NO initial state set to Low for all outputs? If so how can I fix it ?
2. How can I Add a function to a button to cycle on/off. I have a couple of garage doors that I want to control, so a single press of the button would be good.
Thanks For any suggestions
+Ed Lentz Q1: Great question but I don't know. Have you tried a different browser? Q2: You probably want to watch my garage door vid: th-cam.com/video/p2abZ90-eU0/w-d-xo.html (basically you want to add a timer to the relay to have it trigger for .5secs or so)
+skiwithpete Wow quick reply! I tried Edge and it wouldn't work at all. I am using Chrome on both my laptop, phone (android) and a tablet and they all work the same. Firefox doesn't work at all, funny that Edge , and Firebox force me to login before they present the page. I don't get that in Chrome at all.
I have seen your Garage video and I have that working, I woul dlike to incorporate it into the relay page, looks nicer :) I am pretty green on all this. I don't know how to change the buttons to run the .py scripts
+Ed Lentz Q1) I'm still sorry, and I still don't know. Hopefully someone else will read this and be able to provide insight.
Q2) I don't quite understand yet. Are you saying that you've got an 8 channel relay and one of them will control a garage door? In that case, all you need to do is trigger the correct script with the button press.
+skiwithpete No worries on the Q1. On Q2, maybe I should just use the index.php from the garage door video, get the buttons to get bigger and line them up. I would just then need to remove the timing for the .py scripts for the other relay functions I wanted.
Hi,
Thanks for the tutorial, I am thinking using this setup as part of a project.
However I am a bit confused on which type of Raspbery pi to use. I would like to avoid the use of an additionnal power source for the relays. You mention that for this reason, only the type A should be used. Will the A+ or 2B (in the part list) that were not out at the time will work without "burning"?
Thanks in advance
Louis Bradier They'll both work just fine. Cheers, P
Thank you, I did set this up i am using B model however the lights come on as yours did but the relay never changes state it never closes although the light changes state and there is no noise for any of the relays,
I bought 3 of these and all three do exactly the same thing
First, just make sure that they are optocoupler relays. If they have bulb type LEDs, then you might have the wrong type. If they are optocoupler try changing the high and lows in the script to see if that gets you different results.
Thanks for the video, very nice. I could use some help if you don't mind. The relay seems to be working just fine as expected, clicks and all. What I'm trying to do is light up a LED with the relay, but it is not lighting up. I have the - side connected to COM, and if I plug the + side in to either NO or NC, I get no light. The LED is good and tested by connecting it to a battery. Can you help with what I'm missing so that I can light up external LEDs?
Tom Huck Sounds like there's something wrong here. I show how to connect the Relay in this video: th-cam.com/video/WpM1aq4B8-A/w-d-xo.html at the 7:45 mark. If you're connected to COM and NC, the light should be on with no power to the Relay. If not there's something wrong. You can test it with a multimeter. What do the solders look like underneath the board?
Very clear and easy to wrap my dumb head around. Thanks so much for doing this!
frozencons thanks for the kind words!
Thanks so much man! I had a slightly different setup but your video provide a good starting point.
Great video...excellent quality. In my RPi circuits I always use a secondary power supply even if what's needed is 5volt for the external board. I connect the grounds together and things work fine. I'll order the relay on amazon and give it a try with the model B using an Edimax Wifi dongle. I'll post back my results.
Results?
Still waiting on those results, please, post them up so I can move on with my life.
I want to use a similar set up for starting a car, I only need 3 to 4 relays, which will in turn activate 30~60 amp relays @ 12VDC, should I use an A board for this as well?
I have been hesitant to buy any hardware cause I don't know anything about it, but my build is getting stale and I need to make a move before the year is up.
I followed this tutorial and used a raspberry pi B+, but my relay would not work. in the end i found that i had to use an external 5v power supply straight to the relay board vcc. and another for the pi.
how do i make/find a external power supply
Just run a single power supply 5V that can handle both... that way you only take up 1 plug from the wall...
I am trying to do the same and apparently RSpi 3 model b cannot power the same relay used on this video. Where did you find the power adapter for the relay? did you make on yourself or can you buy it of the shelf?
Thank you, this made my day! Also I have modified your code I will put it up...
Guys I am having a hard time connecting my 1 channel relay (from Tongling) to a raspberry pi 4 model B. Does any know how to do it?
What about the whole 3.3v business when interfacing a 5v driven board? Doesn't the relay board pull up all inputs to 5v?
The Optocouplers on the Relay board allows the GPIO to output at 3.3V.
okay!! thanks. Can you help me out with this example, like to control an individual relay from a 8 channel relay using a mobile phone. Each relay has individual control on the phone, and also through switches connected to the pie. I'm totally new to Pie.
try this one: th-cam.com/video/OQyntQLazMU/w-d-xo.html
Hi, can i know the command you gave to test the relay, it will be a very helpful command to test the relay before starting the project
Thank you in advance
Hi
Thank you for the video.
I was following along your video and I noticed that the GPIO pin only provides 3.3v when they are on HIGH
so my 5V relay only blinks, but does not give a control and that click sound/
How did you manage to supply the relays 5V with GPIO outputs?
I have a 16 relay module that uses 12v 320ma, while powering the relay module I also have the relay module powering my raspberry pi 2. Its nice.. No noticeable lack of power to the pi since there is no dimming or shutting off of the red power led as an indicator.
+Valueless Dollar do you use Raspberry 2 PI model B ?
About the bug on RP B when it hangs on the 6th switch, i i don't think its a power problem, its more like a architecture problem of the board. I'm using the RP B+ and this same problem happened to me . using the GPIO 10 and 9 together would cause the problem so i switched them to GPIO 13 and 26 and now i can open all the RELAYS
Great Video!!! One question. Can you use these scripts on any Raspberry pi model? I figured out a way to get around the power issue from a different video and was hoping I could still use these scripts. Thanks.
Yes. But check your pins for your model. Scripts will work with adjusted pins.
I just used the scripts on a RP4, changed the pin #'s, and it worked like a champ!
Great effort skiwithpete
thanks Imran Saeed appreciate your patience.
so i can just connect 120 volts to the common and to the 120 volts 10 amps lamp and it will light up ? do i need anything between the light and that relay ?
Few questions:
Is the click from the Relay? Can the click be silenced or is that just an effect of the relay?
Could you use more relays on the pins from the outside edge of the RPi?
I have a B+ with the 40 pins be used? I'm guessing I'd need to use external power.
Thanks!
Why did you not connect a resistor in line with the gpio pin? I have heard you can cause some serious problems by not putting in a resistor when using gpio pins. Thanks!
You're thinking about wiring an led, this relay board probably has a built-in resistor.
Great video I'm trying to get my kettle to turn on via my phone from my bed in the morning while i get dressed. Also I am a electrician so I don't mind messing with mains (hopefully won't burn out my board though) but I will say i'd cost more than a few dollars to check your work safety wise lol. Although yea, don't be stupid folks. keep out of your 120v/240v mains.
+AnimosityGamers sounds like a cool project, and defo good advice. Let us know how you go.
Try all the codes on model B and they work fine. I ran them using Python 3 so for print statement, I would to add parentheses like so print("xxxx"); semicolon should be removed from the codes as well. Your codes are for python 2. Don't see the strange thing you encouraged. By the way, there's no click sound on the relay...which is great. Thank you.
I am thinking of this video/technique to build an electric menorah that will go on and sundown, off at sunup, and display the correct lights. I doubt I'll get it done by Chanukah this year, but when/if it's done, I'll post a comment here.
Cool, sounds like a fun one. Keep me posted.
Can I wire these relays with a residential circuit breaker to, say, control electric circuits in my house?
my lights work but i dont hear the clicking sounds. Im using the model b+ is it a power issue
My guess would be lack of power, you see the little yellow jumper on the relay board? With that jumper in, the pi is energizing the relay coils which takes up too much juice for the model B. If you remove that jumper and plug in a separate 5v power supply properly, it will power the relays while the pi only turns on the opto isolators or transistors.
It's a good idea. This might be the solution I've been looking for, for a 16 channel relay!
skiwithpete Simply remove the jumper and plug a separate power supply into the JD-VCC and GND.
skiwithpete yep, as whyvas says, it's a power-related problem. The relay coils will draw quite a bit of power form the 5v line (12v coil relays would draw less, but then you'd need to use two supplies - 12v and 5v.
The combined current draw from your PSU of the Pi itself plus the relay coils supplied form the Pi 5v pin is way beyond what can be tolerated. That's whey the first few work, but the last don't. A simple way to test/prove this would be try with a Mod-B and activate the last 2 or 3 relays alone, they should work, but not when you want them all to switch.
In a perfect world, you would use a good 5V 1A or 2A PSU for the RasPi and another 5V PSU for the relay board/s. That's 1A or 2A real measured output, not what it claims on the label ;)
That way the coil of the relay doesn't load the Pi power rails in any way. The relays may, if you are lucky, have a coil current rating on them, in mA, or a resistance (from which you can work out the coil current using Ohm's Law) - or you may have to look it up from the relay model code. They will also have the switch-side ratings on there too, probably 10A/120v and 7A/250v or similar, but you want the *coil* rating at 5Volts.
5Volt relays tend to be heavy on coil current (compared to 12Volt or 24Volt relays, Ohm's Law again) , some draw 125 or 150mA each when the coil is energised.
Multiply the coil current rating by 8 (8 relays), then add some extra for the LEDs and Optocouplers on the board (I'd go for 100mA extra for them as a very,very safe estimate) and that's the current rating you need from the relay-board 5V PSU.
Personally, I'd just use another 2A PSU for the relays, to be on the safe side and for an easy life, but that may be overkill. You might be lucky and get away with a 1A one, a lot depends on the relay rating/quality (*)
The power supply "rails" as we call them are critical to any circuit's reliability, a saggy rail means trouble sooner or later. In your case, you hit it early on.
Low-current coil relays, or latching ones, cost much, much more than standard ones. Common ranges for smaller 5v mains-rated relays are 36 Ohms up to 208 Ohms, at 5Volts, which gives a coil current of 138mA and 24mA respectively, so it can vary a lot depending on the relay:
I (Amperes) = Volts / Resistance (Ohms)
I =5 / 36
swapping that around....
5 / 36 =0.138A (that's milliAmperes) approx
same for the 208 ohm coil example:
5 / 208 = 0.024 A (that's 24 milliAmps) approx
Asking the Pi to supply more than 1.11 Amps (138mA x 8 relays) plus some extra for the LEDs and optocouplers is going to cause a problem :)
somebody check my working there ^ I'm tired lol
Nice Video. One question, do I need to use breadboard and resistors in order for this to work? Or can I just plug straight from RPI to the relay board like you did?
Pretty amazed you got this working... Those pins only output a few ma and at 3.3v...
jasonroxorz that's why you need to choose the Optocoupler Relays as 3.3V and just a few ma is all that is required to trip the switch.
Where does 8 channel relay come in handy? I’m just trying to understand relay part and where can you apply this in project? Where to? Can someone provide some scenerios?
Hey there, nice video really made me understand how the relay board works but I wanted to ask something. So what happens if you "plug" something into the relay (not the pins, I mean the other way around where you can plug wires) can you explain how can I control those?
This video will help you to understand: th-cam.com/video/3u45htuQeag/w-d-xo.html
I've already seen this one (great videos btw really helped me) but I'm talking about the software side of controlling. Like if I connect a light bulb for example, how will I be able to control it through my pi?
Good video! Where are you get the 8 channel relay? or did you make it?
Thanks for the tutorial. I dit it with an Rpi model B rev 2 and it did juste fine. May be the problem you described is a software bug resolved in the latest version of the OS.
Cool. Thanks for letting me know.
I had the problem with model B and I just started and got fresh OS
this is amazing ive just iscover raspberry pi and your job is excellent i need more imformations about the programming of this because i cant understand how you test it if you can give me some explanations pleaseee!!!And something else i need to put a ruspberry pi into me garage because the gear that contact with the old controler is damaged and i want to replay with this how can i do this!!!
Hey you should check out these two vids as they use relays and are complete projects: th-cam.com/video/WpM1aq4B8-A/w-d-xo.html and th-cam.com/video/p2abZ90-eU0/w-d-xo.html They'll probably help to give you a sense of what the relays do.
I wish to play a video on a series of video screens with a slight delay on successive screens. Is it possible on the RPi?
good job , very interesting and informative - suggest: you could use built in quicktime to record your laptop screen for an improved experience - also: how can we know / monitor the power draw issue more definitively (measure) ? A vs B vs B+ ?
Yes, you're right. I should get something to measure the power draw... I'll look into that.
great video. Do you need external power supply to control the relay board ? or just the power from Raspberry (5v) and will this work with the new raspberry pi 2?
thanks
I am trying this for Christmas lights. I have a raspberry Pi model B+. Did you ever figure out what was happening with the ssh freezing? I haven't gotten my relay board yet so I cannot comment if it has happened or not. I am looking to get an external power source for my relay board however.
Also, does it matter what pins I connect the relay board to?
I guess the relay is a switch? Can you control a something coming out of 120 V AC outlet?
Would I be able to wire the relay board to solenoids and run them on timers (as long as they were the same voltage)?
I really enjoy your videos. I plan on getting a raspberry pi. I want to build a sound activated light and pump fountain. any ideas or helpful thoughts
tye ron jasper
I have calorifier in my garage... Can I use relay as a switch for it, or do I need any extra components?
I'm in Europe so we use 220V, if that makes any difference I should mention it.
Very very nice video!!!
But I have a question..
How can I place a text on the PHP file indicating the status of the relay??
Like, if I switch the button ON, a text or label will say " THE relay 1 IS ON"..
And since I am using 8-channel relay, I would like to have an individual indicator message for the status of each relay..
I hope you could help me...
Thank you in advance!!!
Don't know the answer. Let me know how you decide to solve it.
Please explain more about the scripts.
I greatly appreciate what you've put together here, it's helping me a lot. I've got all of the relays working my question is that I'm wanting to run an RS-360SH pump that supports 3v-12v power and I'm not certain on how to connect the pump to the relay. I've looked through many of your videos and I didn't seem to find one that shows connecting devices to the relay. Can I run the pump off of the raspberry pi or does it need a separate power supply?
Thanks for your help!
Chandler Gray My 1-relay video probably best shows the answer. th-cam.com/video/3u45htuQeag/w-d-xo.html Basically you want to cut one of the wires from the power to the pump and send it through the relay.
skiwithpete
That I what I thought but I wasn't sure if I needed to externally power the pump or if I could use one of the 5v leads & ground from the Raspberry Pi to power it. Thanks for the fast response as well!
skiwithpete
One other thing I noticed in your Automated Lighting control video is that you have loops in & out between each relay. Pardon my ignorance, but if I were to have several pumps powered, how would I connect the relays?
Chandler Gray It's hard to describe without showing you, but "like this" th-cam.com/video/xc1daIb1LVc/w-d-xo.html you see how one wire connects all of the "ins" with those little loops? Then the outs go to each individual device.
Chandler Gray No, that would be too much draw on the pi. Try splitting the power from the source before it goes into the Pi. That way you could have one supply (say 5V5A) and split it so the Pi draws 2A and the pumps draw 3A. That's something I do in my th-cam.com/video/17-8kzAiuCQ/w-d-xo.html
I have a new raspberry pi 2 and looking to do christmas lights with music controlling it . what programs do i need to install on my sd card to get this started .
Awesome video walk-through, thank you! I didn't realize relay boards were this affordable.
Q1) If I want to use the B+, can I connect all the GPIO and then provide power externally using the 5v/GND pins and a power supply?
Q2) If the first answer is yes, can I use a voltage divider to drop my 24v supply down to 5v? In other words, will the required current be too high for small resistors (
Great video, this really helped me understand Raspberry Pi GPIO so much more. I'm currently working this video through and trying to get it to automate some lights. Working well so far! but my in4 on my relay isn't functioning. So I hope it's not one of my pins, I've changed the wire and that had no effect. Going to have to try it on a different GPIO pin.. :)
Abraham Gihawi Just tried a different GPIO pin, as well as a different wire, and it's definitely the relay that's faulty. :(
Can you use a raspberry pi to run all the functions in a car? eg: monitor engine and all sensors, control fuel, as well as all dash instruments...
I don't know all that a modern car computer controls, was just wandering if the Raspberry Pi could do all that?
read the functions of a car or run the functions? Read - look up the ODBII or ODB2. Run - well you'll need to start with realtime kernels because some functions and sensors on a car needs capabilities beyond the responsive lagtime of an off the shelf Linux OS. And, this is way way wayyyyyy beyond my knowledge of Car CPUs and all of their functions. But, interesting question. Reply back as you dig into this.
niiiice tutorial. How long those jumper cables from the relay to the GPIO can be to this to continue working fine?
Hey, man
I am really confused about how the loop works. I made exactly as yours except I want it to run a test sequence such as turning all on/ off one at time. After the test I like to have 4 out of the 8 turning on 30 sec off 30s one relay at time. The last 4 relays on for 50s and off for 80s. All 8 is running in a loop after the initial test sequence. Can you help me out on this?