Holy CRAP!! This is an AMAZING tutorial. I just spent the past 6 hours learning everything you explained in 10 minutes. Wish I had found this tutorial first, but I guess the past 6 hours weren't completely lost since I did end up learning something. But man....I mean really, this is just incredibly well done. Thanks! you rock!
Very well explained. Clear, concise and straightforward without losing the detail of the topic. To explain things like this takes real skill, great work.
I know you haven't uploaded in quite a few years, but your tutorials really helped me a lot when I was getting started with the Raspberry Pi controlling electronics
9:55 - THANK YOU. This is in fact the most important part of your video. Because how can any RPi or other project enrich your life, if it … well, _ends_ it? Safety first. Always.
Thank you for this super video! This helped me to get my 8-Relais Optocoppler running and I got the knowledge from your video how it is working and has to be connected. My 8 Kanal Channel 5V Relais Relay Converter Modul worked fine with VCC and JDVCC connected via the jumper! I'm looking forward for new videos as they are very interesting and good produced! Thanks for your time you spend here!
I've managed to get the board working this way: - using the jumper for JD-VCC and VCC - connecting the VCC pin of the input pin group to one of the 5V pin of GPIO - connecting the GND pin of the input pin group to one of the GND pin of GPIO - connecting the IN1 and IN2 pins to GPIO pins set as OUTPUT and initially set as HIGH
effin awesome.. covered alot of material but i appreciate the calculations and circuit explanations such as using beta value to calculate the necessary current limiting resistance
You certainly can do that, and in both cases you will need 1 GPIO pin. Either a GPIO pin on Vcc, with the control pin connected to ground, or Vcc attached to 3.3V and a GPIO pin connect to the control pin (like in the video). The only time an issue would arise would be when using more than one relay on the board. Because the two relay modules share Vcc, a GPIO pin on Vcc would affect both modules. Of course, if you're not using the board, your suggestion would work perfectly fine.
Yeah, a single transistor and a relay will do the job just fine. The optocoupler is there only for protection, and I made a point of discussing it as a large number of relay boards use it. Unless you're going to use a separate power supply to connect across the relay coil, you might as well not use the optocoupler as your bypassing the electrical isolation by connecting anything on the right side of the optocoupler to your Raspberry Pi.
Awesome explanation of what going on here, saved me a lot of reasearch effort. I wouldn't normally sub to such a channel, electronics is more like an 'video on demand' sort of thing for me, but your videos are top shelf.
You might be able to control the relay coil with 3.3 V (a gpio pin). On my board, one relay worked this way, and the other didn't. So it's definitely something you can test out with your own relay board, as relay modules are not all created equal. A transistor is also an excellent solution, and it's what I tend to connect my GPIO pins to. The only reason I didn't suggest them with the board is because I wanted to avoid using additional components.
An old video for sure, but rather than a current limiting resistor on the opto-isolator, one could simply use a current regulator. These are available with a fixed mA limit (with 2-pins in an SMT package), and can have a VMax of 220Volts (like a CL220K4: www.digikey.com/product-detail/en/microchip-technology/CL220K4-G/CL220K4-GCT-ND/4918704). This way it basically doesn't matter what voltage you put on the opto-LED circuit or the relay control side of the isolator (within common voltage ranges of course). Using a current regulator means your current is capped at the design current and you never have to go back in an recalculate/rework a constructed circuit once built. To drive the relay coil a MOSFET and a current regulator would again be more flexible. 60mA can be current regulated with monolithic current regulator parts (two 25mA and a 10mA in parallel gives you 60mA, so does three 20mA regulators in parallel). Using those regulators would then ensure that the coil only ever see the POWER it was designed for, and the relay would work with a supply of 5VDC up to the power rating of the current regulator. To protect the MOSFET, a zener would need to clamp the gate to under its maximum voltage, and a current regulator would need to limit both the current conducted by the opto-trans-out, and the zener. Since a MOSFET gate only needs to be charged with a voltage/current and not driven by a continuous current, this value can be very low (sub-milliamps) - which reduces the total circuit power draw. Remember, ten 6mA LEDs draws as much power as one 60mA relay coil.
Thanks, (8:34) Had problems with mine running at the 3.3v from the raspberry and switching 230VAC 2A. Changing the R1 (1kΩ) Resistor to a 510Ω one worked for me perfect!
Great video! I believe I'm using the same relay board as you, and only one of the relays would turn of if I connected Vcc to 3.3v. I'd measured the voltage across the coil and it was 2.7, so I guess that wasn't quite enough. All works well if I use Vcc = 5v. I assume that slight differences in the transistor or relays would affect this. Now the coil voltage is about 4.6, which works great.
This helped me a lot using the pre-built board, but for some reason did not quite work. I found that I had to send +5 to VCC and VCC-DJ, and that I did not need a ground. With +3.3 at VCC, the relay never got more than 3V across the magnet
Matt Brennan Hi, for me it didn´t work either, i have the model b rev2 rpbi and i guess the 3.3v gpio data is not giving much current. I see the led blink at the relay control and the relay is not giving output voltages when it should, also i´m not hearing the relay sound switching. Did you use the jumper to provide 5v to JD-Vcc and Vcc, and what do you mean by not needing ground. thanks
10 лет назад
good advice can you make another video showing best safe way to run ac through the relay as best you can as i dont mind danger but want things to stay working, maybe by using different relays and an inline fuse etc for example many thanks
If I wanted to make this into an "active high" relay, could I feed the 3.3V GPIO output to Vcc, 5V to JD-Vcc, and then tie GND to the GPIO input of the board? That way the optocoupler has 3.3V across it (and the resistor) when GPIO is HIGH and 0V when GPIO is LOW?
Wait I'm a bit confused. In the first circuit, the current goes from 5V -> GND and that makes sense to me. In the version with the board however, it goes from 3.3VDC -> GPIO pin. It seems to me like the current comes out from VCC and it comes out of the GPIO at the same time that it would be a problem. Does that not reverse the way that things work?
Very well explained. Sadly so stones there is a module designer who thought "JD-VCC?, Jumper?, Wait let's just hardwire that" arduinodiy.wordpress.com/2018/09/04/the-16-relay-module-and-the-raspberry-pi-not-an-ideal-marriage/ Just a remark, you suggest that one option is to desolxer the resistor and replace it with a seeker one. I am not sure that is the right choice: the voltage drop will remain the same, but now there will be a higher current owing. If any you should replace it with a higher value. In that case desoldering isn't necessary, just add one at the input lines. Having said that, I think with the 1k, the optocoupler and LED in series the 1.7 volt drop the current flowing will be practically zero
Gaven, im doing a project for a course in my college and i want to create a wireless door lock, what i had in mind is a relay, electromagnetic door lock and the raspberry pi connect all those together and i could build it, so am i missing anything or should i be using something much simpler design ?
The last part of the video. Telling to connect 5V Rpi to JD-VCC Pin6 Rpi to GND pin7 Rpi to IN1 pin1 Rpi to VCC Does this circuit will not damage anything? especially the raspberry? I'm confused because you introduced to us the using of Resistors,Diode,transistor and Optocoupler. So is it fine not to use those? just the direct connection from Rpi to Relay then? Need ASAP reply . This is for our thesis project
I could only get this to work by connecting Vcc to the 5v pin on the RPi and connecting Vcc to JD-Vcc using the jumper. When I connected Vcc to 3.3v rail, the red LED would light but the switch would not activate (there was no audible "click")
In the video you used a GPIO pin of the Raspberry Pi to control an optocoupler which in turn controlled a transistor which in turn powered the relay. Was the optocoupler really necessary? Couldn't you have just used a transistor and a relay? I didn't need an optocoupler to control a small relay with my arduino, just a transistor. Or is the optocoupler there because you don't want the GPIO pin to be destroyed by some kind of voltage spike?
Why is the optocoupler connected to the 5v power supply?? Couldn't it be connected to the GPIO out directly? The 3.3v generated by the GPIO pin can power the the optocoupler.
mains are some scary things to mess with 12 volt dc systems are as well but I been messing around with it and havent burned zaped or blew anything up with whats your thoughts on a 12 volt set up at around 220 ah drawing .750 ma @ 5 volts 24/7? its just a common led think its a bad ideah for light
i am fixing to purchase a rasberry pi, relay board, and touch screen. i want to make a 12v switch box with a touch screen. have any of yall already written a program for the interface? im in the process of trying to figure out python and figured if someone already wrote a program, it would save me a LOT of time
Hi. Could you explain more about the extra power requirements? Just to clarify, you need 2 power supplies, a USB powering the pi which sends some of the required power to the relay for the LED, and a second power supply connected directly to the relays outward face and the ground for the LED, right?
Also, is the point of using the relay to isolate the 9v power source so it doesn't interfere with the 5v arduino board and blow it up while maintaining control of the external object with the board?
A voltage source represents a "potential difference" in electric terms. So, the GND rail for each source is NOT an absolute 0 value, and also the independent GNDs will not be on the same level as each other. Instead of thinking of the + and - terminals as 5V and 0V, you can also think of them as +2.5V and -2.5V (i.e. the potential difference is still a 5V supply), or even +4V and -1V (it is still a 5V supply). There is no such thing as absolute 0V GND (the GND on different supplies will be different and hence represent a voltage potential difference even between independent GNDs). The power from the positive terminal from one voltage supply must return to the negative terminal of it's own supply, so this is why you need circuit isolation. If instead the entire circuit could be solely powered from the micro-controllers own power rails then there would be less need for isolation since you could instead limit current through the use of resistors, but in this case if you are controlling actuators and motors then the arduino cannot possibly supply the needed current (or voltage) required for those actuators to power the motors, and some components in a circuit just need more than 5V to work. You need voltage-source isolation in this situation.
Oh man, you fucking helped me :D I love you :) I didn't know that the GPIOs provide 3.3V and i also didn't know that the inputs need 5V to get triggered^^ So i have a few questions and i hope you could answer me some of them ;) 1. Why is a octocoupler used to trigger the transistor? I could just power the Transistor with a GPIO pin directly? 2. What are the cons of providing the Optocoupler with 3.3V if you just have GPIO with 3.3V outputs?
PaYtrIxHD The optocoupler acts like a switch, such that it is used to isolate the circuit so that it will prevent any damage to the Raspberry Pi when working with higher current and voltages. Therefore, it only activates at certain states. Since the Raspberry Pi has a low current output, it would be wise to use an optocoupler to keep things separated so as to not fry the Pi when messing with higher voltages/currents. Check out his optocoupler video where he goes more in-depth. Good stuff.
i use module relay when no load connected to the relay every thing well when it connected to 220ac it take a time and then the lcd display strange symbols the power of the relay and the lcd from arduino
Couldn't you have just powered the relay coil from the GPIO pin of the raspberry pi or connect a gpio pin to a transistor which controls the relay coil?
I am trying to use a Keyes 4 ch solid state relay It's a red circuit board with blue terminal. there are tons for sale on ebay. I can get the leds on the inputs tp go on and off with the Raspberrypi, but the relays themselves do not change state. I have connect them up using a 5 volts, a 22o ohm resistor and an led. The led will sometimes light up as it should, but then it stays on. Anyone know what I am doing wrong? Any help is appreciated.
hi could anyone help i would like to control a 4 channel relay with raspberry pi to turn on -off in sequence sometimes all together sometimes two at a time -one at a time and be able to alter time between them thanks
1:30 How do you know that the required current is about 60ma? I looked at the datasheet here: www.ghielectronics.com/downloads/man/20084141716341001RelayX1.pdf It seemed to be different than what you mentioned.
☠☠☠ Just remember folks the relays on that panel are NOT safe to use to switch MAINS VOLTAGES directly - the air-gap is not good enough (needs to be around at least 7 or 8 mm for 220-250V type voltages) i.e. the space between the bits of metal that would be connected to the Mains are not far enough from the bits of metal that are connected to the RPi and which you might touch... ☠☠☠
I don't agree with it. It's the only video, i found on youtube, where the function of an optokoppler-relais is explained! I think it's worth knowing, what you connect here instead of frying your pi!
Holy CRAP!! This is an AMAZING tutorial. I just spent the past 6 hours learning everything you explained in 10 minutes. Wish I had found this tutorial first, but I guess the past 6 hours weren't completely lost since I did end up learning something. But man....I mean really, this is just incredibly well done. Thanks! you rock!
Thank you, your videos are fantastic. You´re really a gifted person to teach electronics.
Very well explained. Clear, concise and straightforward without losing the detail of the topic. To explain things like this takes real skill, great work.
I know you haven't uploaded in quite a few years, but your tutorials really helped me a lot when I was getting started with the Raspberry Pi controlling electronics
Thanks so much for the video. I bought one from amazon and was scratching my head when it didn't work like I expected.
First of your videos I've watched. Excellent and accurate coverage. Wish more YT videos were as well organized and presented.
Best video on explaining the mechanism of a relay for projects working with Raspberry PI I have ever seen :)
9:55 - THANK YOU. This is in fact the most important part of your video. Because how can any RPi or other project enrich your life, if it … well, _ends_ it? Safety first. Always.
Just got my 8 relay board the other day. This video will help a bunch. Thanks.
Thank you for this super video! This helped me to get my 8-Relais Optocoppler running and I got the knowledge from your video how it is working and has to be connected. My 8 Kanal Channel 5V Relais Relay Converter Modul worked fine with VCC and JDVCC connected via the jumper! I'm looking forward for new videos as they are very interesting and good produced! Thanks for your time you spend here!
I've managed to get the board working this way:
- using the jumper for JD-VCC and VCC
- connecting the VCC pin of the input pin group to one of the 5V pin of GPIO
- connecting the GND pin of the input pin group to one of the GND pin of GPIO
- connecting the IN1 and IN2 pins to GPIO pins set as OUTPUT and initially set as HIGH
One of the best explained videos i have ever seen! I would shake your hand if I could! There's always something to learn from such people!
Thank you for this informative video. Helped me get up and running in no time.
effin awesome.. covered alot of material but i appreciate the calculations and circuit explanations such as using beta value to calculate the necessary current limiting resistance
You certainly can do that, and in both cases you will need 1 GPIO pin. Either a GPIO pin on Vcc, with the control pin connected to ground, or Vcc attached to 3.3V and a GPIO pin connect to the control pin (like in the video). The only time an issue would arise would be when using more than one relay on the board. Because the two relay modules share Vcc, a GPIO pin on Vcc would affect both modules. Of course, if you're not using the board, your suggestion would work perfectly fine.
Very good explanation!! Now I know how it works. Great man.
Yeah, a single transistor and a relay will do the job just fine. The optocoupler is there only for protection, and I made a point of discussing it as a large number of relay boards use it. Unless you're going to use a separate power supply to connect across the relay coil, you might as well not use the optocoupler as your bypassing the electrical isolation by connecting anything on the right side of the optocoupler to your Raspberry Pi.
Awesome explanation of what going on here, saved me a lot of reasearch effort. I wouldn't normally sub to such a channel, electronics is more like an 'video on demand' sort of thing for me, but your videos are top shelf.
Great video Gavo! Those prebuilt ones are handy as!
You might be able to control the relay coil with 3.3 V (a gpio pin). On my board, one relay worked this way, and the other didn't. So it's definitely something you can test out with your own relay board, as relay modules are not all created equal.
A transistor is also an excellent solution, and it's what I tend to connect my GPIO pins to. The only reason I didn't suggest them with the board is because I wanted to avoid using additional components.
Amazing. Some of the best tutorials out there.
Outstanding video. Thank you!
Excellent video! Really helpful. And Subscribed!
An old video for sure, but rather than a current limiting resistor on the opto-isolator, one could simply use a current regulator. These are available with a fixed mA limit (with 2-pins in an SMT package), and can have a VMax of 220Volts (like a CL220K4: www.digikey.com/product-detail/en/microchip-technology/CL220K4-G/CL220K4-GCT-ND/4918704). This way it basically doesn't matter what voltage you put on the opto-LED circuit or the relay control side of the isolator (within common voltage ranges of course). Using a current regulator means your current is capped at the design current and you never have to go back in an recalculate/rework a constructed circuit once built.
To drive the relay coil a MOSFET and a current regulator would again be more flexible. 60mA can be current regulated with monolithic current regulator parts (two 25mA and a 10mA in parallel gives you 60mA, so does three 20mA regulators in parallel). Using those regulators would then ensure that the coil only ever see the POWER it was designed for, and the relay would work with a supply of 5VDC up to the power rating of the current regulator. To protect the MOSFET, a zener would need to clamp the gate to under its maximum voltage, and a current regulator would need to limit both the current conducted by the opto-trans-out, and the zener. Since a MOSFET gate only needs to be charged with a voltage/current and not driven by a continuous current, this value can be very low (sub-milliamps) - which reduces the total circuit power draw. Remember, ten 6mA LEDs draws as much power as one 60mA relay coil.
Wonderful explanation !! I loved as graphics components and the electrical circuit . thank!!
Great video helped me a lot
Thank you So much sir it really solved a big Problem of Mine
Thanks alot
Really excellent descriptive video. Thank you
Excellent video! Really helpful.
Really good tutorial.
thanks a lot. very useful
Best video found! Thanks
Thanks for the detailed, well explained, informations !
Excellent video!
Excellent explanation,... Thank you from a newbie.
Simply amazing, thanks for your hard work
Thank you! By the way, you make really good and interesting videos on your channel!
Great video, I learned a lot.
Great tutorial, thank you!
Thanks,
(8:34) Had problems with mine running at the 3.3v from the raspberry and switching 230VAC 2A. Changing the R1 (1kΩ) Resistor to a 510Ω one worked for me perfect!
I switched it to 680 ohms. Some relays worked, some didn't. Might try 510.
Great video! I believe I'm using the same relay board as you, and only one of the relays would turn of if I connected Vcc to 3.3v. I'd measured the voltage across the coil and it was 2.7, so I guess that wasn't quite enough. All works well if I use Vcc = 5v. I assume that slight differences in the transistor or relays would affect this. Now the coil voltage is about 4.6, which works great.
Thanks! It helps me a lot!
Really useful video! Subscribed!
Great Video!! Thank you !
thanx for the superb tutorial..
Thank you for your information. I believed that my module relay can't use more.
Great video!
Helpful! Thanks a lot!
hey!! awesome project
finally!!! an explanation on how the 3.3 volts and the vcc works! thank you. curious, can I use another gpio pin as VCC?
Amazing explanation! You have a new sub :)
This helped me a lot using the pre-built board, but for some reason did not quite work. I found that I had to send +5 to VCC and VCC-DJ, and that I did not need a ground. With +3.3 at VCC, the relay never got more than 3V across the magnet
Matt Brennan Hi, for me it didn´t work either, i have the model b rev2 rpbi and i guess the 3.3v gpio data is not giving much current. I see the led blink at the relay control and the relay is not giving output voltages when it should, also i´m not hearing the relay sound switching. Did you use the jumper to provide 5v to JD-Vcc and Vcc, and what do you mean by not needing ground. thanks
good advice can you make another video showing best safe way to run ac through the relay as best you can as i dont mind danger but want things to stay working, maybe by using different relays and an inline fuse etc for example many thanks
tried that 3.5 volts not enough to activate it!
If I wanted to make this into an "active high" relay, could I feed the 3.3V GPIO output to Vcc, 5V to JD-Vcc, and then tie GND to the GPIO input of the board? That way the optocoupler has 3.3V across it (and the resistor) when GPIO is HIGH and 0V when GPIO is LOW?
For a beginner working with 12v devices, do you recommend transistors or relays, generally speaking? Thanks
Wait I'm a bit confused. In the first circuit, the current goes from 5V -> GND and that makes sense to me.
In the version with the board however, it goes from 3.3VDC -> GPIO pin. It seems to me like the current comes out from VCC and it comes out of the GPIO at the same time that it would be a problem. Does that not reverse the way that things work?
The current comes out of the difference of Vcc and GPIO. In the module version when the GPIO is LOW, it is actually sinking current
Thanks!
Very well explained. Sadly so stones there is a module designer who thought "JD-VCC?, Jumper?, Wait let's just hardwire that" arduinodiy.wordpress.com/2018/09/04/the-16-relay-module-and-the-raspberry-pi-not-an-ideal-marriage/
Just a remark, you suggest that one option is to desolxer the resistor and replace it with a seeker one. I am not sure that is the right choice: the voltage drop will remain the same, but now there will be a higher current owing. If any you should replace it with a higher value. In that case desoldering isn't necessary, just add one at the input lines. Having said that, I think with the 1k, the optocoupler and LED in series the 1.7 volt drop the current flowing will be practically zero
Gaven, im doing a project for a course in my college and i want to create a wireless door lock, what i had in mind is a relay, electromagnetic door lock and the raspberry pi connect all those together and i could build it, so am i missing anything or should i be using something much simpler design ?
The last part of the video. Telling to connect
5V Rpi to JD-VCC
Pin6 Rpi to GND
pin7 Rpi to IN1
pin1 Rpi to VCC
Does this circuit will not damage anything? especially the raspberry?
I'm confused because you introduced to us the using of Resistors,Diode,transistor and Optocoupler. So is it fine not to use those? just the direct connection from Rpi to Relay then?
Need ASAP reply . This is for our thesis project
Hi, i would like to know if the 24v rated relay modules could be triggered by 24v as signal or the 5v is a must as signal. Thank you.
Wouldn't it be simpler and more economical to find an optocoupler that requires
I could only get this to work by connecting Vcc to the 5v pin on the RPi and connecting Vcc to JD-Vcc using the jumper. When I connected Vcc to 3.3v rail, the red LED would light but the switch would not activate (there was no audible "click")
In the video you used a GPIO pin of the Raspberry Pi to control an optocoupler which in turn controlled a transistor which in turn powered the relay. Was the optocoupler really necessary? Couldn't you have just used a transistor and a relay? I didn't need an optocoupler to control a small relay with my arduino, just a transistor. Or is the optocoupler there because you don't want the GPIO pin to be destroyed by some kind of voltage spike?
What about if i use a small sensor with 5v. this relay is too big for small microcontrollers
Why is the optocoupler connected to the 5v power supply?? Couldn't it be connected to the GPIO out directly? The 3.3v generated by the GPIO pin can power the the optocoupler.
Why such complexity? What is the risk of Pi -> relay -> device? Sorry if I missed it, but I've seen other videos skip the optocoupler, diode etc. TIA
Howdy! What's the function of the JD-VCC jumper?
Great video and tutorial. Q: can the relay output 24v as your relay was outputting 9v for the LED.?
if u give 24v supply to the COM pin it will be transferred to the NO pin when the Switch is closed.
We have two plug-in relay boards for Raspberry Pi. What would it take for you to review them?
Mihai Beffa
Sequent Microsystems
mains are some scary things to mess with 12 volt dc systems are as well but I been messing around with it and havent burned zaped or blew anything up with whats your thoughts on a 12 volt set up at around 220 ah drawing .750 ma @ 5 volts 24/7? its just a common led think its a bad ideah for light
i am fixing to purchase a rasberry pi, relay board, and touch screen. i want to make a 12v switch box with a touch screen. have any of yall already written a program for the interface? im in the process of trying to figure out python and figured if someone already wrote a program, it would save me a LOT of time
Can we use a darlington array (ULN2003A) to simplify the circuit?
Why can't I control the power of a 230v AC with my raspberry pi 5v ?
The power just stays on even tho the relay is off, or on..
what happens to the raspberry if the optocoupler relay border is broken ?
Hi. Could you explain more about the extra power requirements? Just to clarify, you need 2 power supplies, a USB powering the pi which sends some of the required power to the relay for the LED, and a second power supply connected directly to the relays outward face and the ground for the LED, right?
Also, is the point of using the relay to isolate the 9v power source so it doesn't interfere with the 5v arduino board and blow it up while maintaining control of the external object with the board?
A voltage source represents a "potential difference" in electric terms. So, the GND rail for each source is NOT an absolute 0 value, and also the independent GNDs will not be on the same level as each other. Instead of thinking of the + and - terminals as 5V and 0V, you can also think of them as +2.5V and -2.5V (i.e. the potential difference is still a 5V supply), or even +4V and -1V (it is still a 5V supply). There is no such thing as absolute 0V GND (the GND on different supplies will be different and hence represent a voltage potential difference even between independent GNDs). The power from the positive terminal from one voltage supply must return to the negative terminal of it's own supply, so this is why you need circuit isolation. If instead the entire circuit could be solely powered from the micro-controllers own power rails then there would be less need for isolation since you could instead limit current through the use of resistors, but in this case if you are controlling actuators and motors then the arduino cannot possibly supply the needed current (or voltage) required for those actuators to power the motors, and some components in a circuit just need more than 5V to work. You need voltage-source isolation in this situation.
Oh man, you fucking helped me :D I love you :)
I didn't know that the GPIOs provide 3.3V and i also didn't know that the inputs need 5V to get triggered^^ So i have a few questions and i hope you could answer me some of them ;)
1. Why is a octocoupler used to trigger the transistor? I could just power the Transistor with a GPIO pin directly?
2. What are the cons of providing the Optocoupler with 3.3V if you just have GPIO with 3.3V outputs?
PaYtrIxHD The optocoupler acts like a switch, such that it is used to isolate the circuit so that it will prevent any damage to the Raspberry Pi when working with higher current and voltages. Therefore, it only activates at certain states. Since the Raspberry Pi has a low current output, it would be wise to use an optocoupler to keep things separated so as to not fry the Pi when messing with higher voltages/currents. Check out his optocoupler video where he goes more in-depth. Good stuff.
When you say high current, what do you mean? I want to use one of these to turn a mains light on and off.
i use module relay when no load connected to the relay every thing well when it connected to 220ac it take a time and then the lcd display strange symbols the power of the relay and the lcd from arduino
Does anybody know if is the second transistor on the right side of optocoupler needed ?
Hello ! Is there a link for the relay shield you use ?
Thank's in advance
how did you calculate 5.1k ohms for base lead?
Couldn't you have just powered the relay coil from the GPIO pin of the raspberry pi or connect a gpio pin to a transistor which controls the relay coil?
can i use this relay with the raspberry pi to power a 19" lcd monitor?
@8:35 could you add a resistor in parallel
Gaven, How i do to control several relay ? regards.
How do i deal with voltage spikes from the relay that are causing my micro controller to reset ?
The answer is in the video. You will need a diode in parallel to the relay.
9:56 ... lol ... wise to put in a disclaimer :)
could you please show so code in python for the prebuilt relays boards
can i request for a wiring diagram between pi 2 with relay 5 pin but not relay board? thanks
I am trying to use a Keyes 4 ch solid state relay It's a red circuit board with blue terminal. there are tons for sale on ebay. I can get the leds on the inputs tp go on and off with the Raspberrypi, but the relays themselves do not change state. I have connect them up using a 5 volts, a 22o ohm resistor and an led. The led will sometimes light up as it should, but then it stays on. Anyone know what I am doing wrong? Any help is appreciated.
Hey! Did U Solve This Troubleshooting Issue?? Just asking..I might be a help. ~*;p
hi could anyone help i would like to control a 4 channel relay with raspberry pi to turn on -off in sequence sometimes all together sometimes two at a time -one at a time and be able to alter time between them
thanks
1:30
How do you know that the required current is about 60ma?
I looked at the datasheet here:
www.ghielectronics.com/downloads/man/20084141716341001RelayX1.pdf
It seemed to be different than what you mentioned.
god bless
Where do you buy those relayboards?
On amazon :)
☠☠☠ Just remember folks the relays on that panel are NOT safe to use to switch MAINS VOLTAGES directly - the air-gap is not good enough (needs to be around at least 7 or 8 mm for 220-250V type voltages) i.e. the space between the bits of metal that would be connected to the Mains are not far enough from the bits of metal that are connected to the RPi and which you might touch... ☠☠☠
New videos?
I don't agree with it. It's the only video, i found on youtube, where the function of an optokoppler-relais is explained! I think it's worth knowing, what you connect here instead of frying your pi!
damnit. i just wanted to power a light controlled by the raspberry pi. damnit...
Do a picamera vid plz I'm a noob