Raspberry Pi: 8 Channel Relay + External Power Supply Tutorial and Example

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

КОМЕНТАРІ • 105

  • @twoporciento
    @twoporciento 6 років тому +4

    Hi, I'm familiar with these setup and use relays with external supply before with arduino. My project uses PIC Microcontroller running at 3.3V and 4 channel relay. I connect with external power supply JD-VCC to external source and Ground to external ground. I Connected the VCC to 3.3V of the PIC microcontroller. However, the relay(input 4) sometimes runs strange like not enough voltage is drawn, turning off and on quickly. My question is that the gpio from raspi going to input of relay is 3.3V? and Does running 3.3V on VCC ok? Because power seems low.

  • @vladfriedman5445
    @vladfriedman5445 2 роки тому +1

    Great video, worked perfectly, except that I needed to connect the VCC pin to the 5V on the Raspberry pi B instead of the 3.3V.

    • @TechplantChannel
      @TechplantChannel  2 роки тому +1

      nice! was it due to the relays requirments. its been such a long time since i touched this stuff i forgot a lot about it I should really start doing more projects like this again. Good luck on your project!

  • @adamjaakik3644
    @adamjaakik3644 4 місяці тому

    vielen lieben Dank gut erklärt, sehr gut und sehr sehr interessant !

  • @aramroshani6197
    @aramroshani6197 2 роки тому

    Short but very useful video, thanks

  • @moritz-rissel
    @moritz-rissel 6 років тому +4

    Great video! I tried many things but this one got me in the right direction. very cool!

    • @hayafatima9844
      @hayafatima9844 Рік тому

      Cn you tell me will this relay work on raspberry pi 3 model b

  • @AJB2K3
    @AJB2K3 6 років тому +2

    ??????
    Why connect a seperate wire to VCC as that is connected to the I/O header (at least on mine.) the jumper is only their to connect Jc-VCC to Vcc to power the relays from the IO header.
    Ah, you didn't use the VCC and GND on the I/O header.

  • @siddharth4662
    @siddharth4662 3 роки тому +2

    why was the single cable plugged into the 3V supply pin of RPI?

    • @TechplantChannel
      @TechplantChannel  2 роки тому

      since this was like 3 years ago i forgot most of it, but if i remember correctly you still need to activate the relays with some power i honesly cant rememeber im sorry

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

    This is one very clear and very well made video

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

    I've had to watch this more than I'd like to admit.

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

      No worries. I watch tutorials a ton too!

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

      Techplant I’m a post grad at UA-cam University by now.

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

    What conditions decide, whether the power supply of the Raspberry is sufficient or a external power source has to be added?

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

      how much power is needed per relay, and how many relays do you want activated at the same time. I forget what these use but if its 500mw and you wanna power 8 at once you are looking at 4W which could be too much for the RPI. again these arent accurate numbers but the concept is the same

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

      Okay, got it. I also found a document saying one relay needs 450 mW. Thanks!

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

    Thanks
    Does the pi support all kinds of relays ?
    220v / 12v ...etc

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

    Hey Techplant, it was a informative video. I dont have a ground right next to the JD-Vcc pin, can I connect the ground of the 5V power source to the other ground pin which is along with IN1, IN2 pins? Kindly clarify. Thanks

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

    what if i have to use a 15-0-15 V at 300mA rating transformer connected to a IC L7805CV Voltage Regulator operating at 5V DC output?!
    i did this but it resulted in a humming sound when the relay was turned ON, and heating of the IC circuit.

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

    Thanks for the great video! Can you please tell me the purpose of the jumper wire? I know in the video you said it powers the internal relay switches, but don't the relays require 5V? Instead, you're using the jumper to connect to a 3V pin on the RPi (I'm sure I'm the one confused). Also, I am trying to use a 12V external power supply due to the small 12V dosing pumps I'm wanting to use for pH control in a hydroponic system. Can I substitute a 12V external power supply as used in your example? TIA for any help.

    • @RitchieTheBrit
      @RitchieTheBrit 2 роки тому

      The PSU is an external 5v, which powers the actual relays (via JDVCC pin). By removing the jumper block, it allows us to use a 3.3v signal to switch the relays and protect the pi from the 5v circuit.

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

    Very interesting, a really good followup video would be, if you showed how to make a touch screen GUI to activate each relay

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

      Im moving into a new place soon, right now ive been limited by my bedroom, and my channel name barely makes sense. But once i have a new house. The entire basement is getting automated using these, lights, water pumps, fans. its gunna be pretty crazy. But this is all going to be like 6 months out. so if you are willing to wait some really cool automation stuff will be comming

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

      @@TechplantChannel thats awesome! Congratulations!, you must be very excited, no worries I'll wait.

  • @jamesmcbride680
    @jamesmcbride680 2 роки тому +1

    Are you powering the pi through the relay board instead of powering the relay board through the pi, or are you using two power supplies?

  • @Felix-lr1xv
    @Felix-lr1xv 2 роки тому +1

    Does the py still need amperage for switching the relay with the external power supply?

    • @TechplantChannel
      @TechplantChannel  2 роки тому

      Yes it still uses a tiny bit to activate the relay but the relay is using thr psu

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

    Contrary to some, I actually enjoyed the music. What is the song?
    Oh yeah, and this helped a lot. Thank you

    • @TechplantChannel
      @TechplantChannel  3 роки тому

      At this point i have no idea. but it is one of the free songs youtube lets us use. sorry!

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

    Thanks for this video, helped me a lot! I have a 5V 3A power supply, can i use this single source for the RPi and the relay board as well?

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

      im not an expert on this question, but i bet you could split the psu off into two separate power plugs. and attach one to the pi and one to the relay.

    • @anonymoushubhaiya4743
      @anonymoushubhaiya4743 2 роки тому +1

      no need to supply relay board if you are using 5v 3A power supply you can use power relay from pi gpio. relay operation drop current around 600ma so if you are using 5v 2a power supply for your pi then you need external power supply. I hope you understand

  • @viswanathnimmagadda2183
    @viswanathnimmagadda2183 11 місяців тому

    I dont have a JD-VCC on my board, where can I connect the power supply?

  • @csc3538
    @csc3538 3 роки тому

    Just seeing this today, 3 years after you posted it 😄
    I have a question: is the trigger a low signal for this kind of boards?
    Thank you, very nice and clear video.

  • @mohitkundu6909
    @mohitkundu6909 6 років тому +1

    i have a 8 channel board which don't have a JD-VCC pins it has only 10 pins . this board dont have another 3 pins how do i give power supply to all 8 channel .

    • @TechplantChannel
      @TechplantChannel  6 років тому +1

      can you link me the model, im not an expert so id have to see and do some research

    • @mohitkundu6909
      @mohitkundu6909 6 років тому

      @@TechplantChannel brother this module don't have the right and same picture online, i bought it from amazon but i can send its pic on your email or whatsapp if you wish .

    • @TechplantChannel
      @TechplantChannel  6 років тому +1

      upload it to imgur and link it here!

    • @mohitkundu6909
      @mohitkundu6909 6 років тому

      @@TechplantChannel i make a Google Drive Link here it is - drive.google.com/file/d/17BC80SY1wBHM-3qSKZnWlmc1kXxSOUR_/view?usp=drivesdk

  • @humbertoramos9172
    @humbertoramos9172 7 років тому

    Hi, how did you make that power supply? Can I use one of the ribbon cables with a charger to make one myself?

  • @raeliean
    @raeliean 3 роки тому +2

    Good video. The music is VERY distracting and makes it super hard to hear.

    • @TechplantChannel
      @TechplantChannel  3 роки тому

      Sorry about that this was one of my first videos when i just started so i was a rookie!

  • @pedroesteves9582
    @pedroesteves9582 6 років тому +1

    Your solution may work, what doesn't mean it's perfect: you forgot to connect the ground(s) between the Pi and the relay board.

    • @TechplantChannel
      @TechplantChannel  6 років тому

      Do you need too?

    • @notepid
      @notepid 6 років тому +1

      Technically you don't need to when you use the same power supply for both the RPI and the supply for the relays as the grounding in your building will be more or less the same. However, it is good practice to make sure the grounding, or zero level, of your signals are the same to avoid ground loops

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

      Can you specify if you mean it's better to connect the GND of the RBP with the GND next to IN1 or the GND next to VCC and JD-VCC of the external power?

  • @radityawaliulu
    @radityawaliulu 3 роки тому

    could you make video explain wiring relay 8 ch in Raspbery 3 B+

  • @Ryan-nd3zh
    @Ryan-nd3zh Рік тому

    Can the 8 relay script be used with Venus os?

  • @jitendravishwakarma1523
    @jitendravishwakarma1523 6 років тому

    Can i use 12volt relay board with 12volts external supply on raspberry

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

    It's hard to hear the narrator with all of the noise in the background.

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

      sorry, this was one of my first videos ive ever made so i made some rookie mistakes

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

    Great video; thanks! Can you point me to tutorial info that shows how to actually command those relays?

  • @thereal.mohammad
    @thereal.mohammad 4 роки тому

    Which software should I use for the 8 channel relay????

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

      That depends what you want to do with the relay board.

  • @FrancescoFiorentino
    @FrancescoFiorentino 7 років тому

    Where can I buy an external power supply like that one? And/or how can I build it?

    • @TechplantChannel
      @TechplantChannel  7 років тому +1

      I get my wall warts/power supplies from thrift stores because they are dirt cheap there. Just look on the label at the output and make sure it says 5v, and has at least .7A rating. If you cant find one, amazon.com offers them for 6-10USD.

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

    How's the Pi getting ground???

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

      Its in a box now doing nothing. but im moving soon and im gunna make some elaborate plant setups that will use this!

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

      @@TechplantChannel I'm working on a industrial bottle filling machine with raspberry pi 3 b+

  • @pongpolc.8696
    @pongpolc.8696 6 років тому

    Dear friend ,thank you for your youtube. I already did it but i have some problem for quit. how can I turn off project. when I run project on terminal , i try to close by using ctrl z. The result is stop but when I close terminal window , the project run again. please advise. many thanks in advance

    • @TechplantChannel
      @TechplantChannel  6 років тому

      Im not really sure why its doing that, how are you running the script? try CTRL C

  • @iggyblack
    @iggyblack 7 років тому

    Great video my dude

  • @SaeedAhmed-ix8nm
    @SaeedAhmed-ix8nm 6 років тому +1

    I am your student and following your tutorials and i also edit your code.
    But now i am facing the problem can you please help me.
    I am using the above configration to turn on and turn off the load as you did in the video. i want to read or sense the pins if they or low every 5 seconds and to print the output in .txt or .csv file. for one pin i have attached the code and it working fine but how i can expand to all 8 channels. please help me
    python code:
    import time
    from time import sleep # Allows us to call the sleep function to slow down our loop
    import RPi.GPIO as GPIO # Allows us to call our GPIO pins and names it just GPIO
    GPIO.setmode(GPIO.BCM) # Set's GPIO pins to BCM GPIO numbering
    INPUT_PIN = 26 # Write GPIO pin number.
    GPIO.setup(INPUT_PIN, GPIO.IN) # Set our input pin to be an input
    # Start a loop that never ends
    while True:
    if (GPIO.input(INPUT_PIN) == True):
    # load is turned off.
    print (time.strftime ("%Y/%m/%d , %H:%M:%S"),"0")
    else:
    #now 20 watt load is turned ON!.
    print(time.strftime ("%Y/%m/%d , %H:%M:%S"),"20")
    sleep(10); # Sleep for 10 seconds.
    and i want to save all the data in a .csv or .txt file with time stamp at the start and other 8 columns for pins status that are connected with relay.
    my output should look like
    06/01/2018,18:54:00,1,0,1,1,1,0,0,0
    06/01/2018,18:54:05,1,0,1,1,1,0,0,0
    06/01/2018,18:54:10,1,0,1,1,1,0,0,0
    06/01/2018,18:54:15,1,0,1,1,1,0,0,0
    06/01/2018,18:54:20,0,0,0,0,0,0,0,0
    please help me

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

    What happen to the relay board when is connected to the raspi and then you turn the raspi on? Does the relays switching during the boot time? Would like to know because that is a very very important point to be able to make meaningful projects.

  • @quaziz
    @quaziz 6 років тому

    Could one have a 5V 2A adapter? Or is 2A to much?

    • @quaziz
      @quaziz 6 років тому

      Also, on the relay, there is 3 connectors for each relay. Plus, minus, but the third? And which one is plus and which one is minus and so forth. Thanks

    • @TechplantChannel
      @TechplantChannel  6 років тому

      It should be fine as the relay will pull what it needs. The important number to not deviate from is the 5v.

    • @TechplantChannel
      @TechplantChannel  6 років тому

      I will try and get up a video explaining that

    • @quaziz
      @quaziz 6 років тому

      Thank! :)

    • @tdoe1232
      @tdoe1232 6 років тому

      1. When considering a power supply, the most important thing to consider is that it can supply *at least* enough current for any load. So, for example, if you have a device that draws 1 ampere, the power supply should be rated for at least 1 ampere. You can also use a power supply rated for 100 amperes, because a load will only draw what it needs. (Search "ohm's law" and you'll notice voltage and resistance is what dictates current draw)
      2. Relay has 3 terminals: The center terminal will connect to one of the outside terminals depending on if its on or off. So, for example, if a relay's left-and-middle terminal are connected when its off, the right-and-middle will be connected when you turn it on. Refer to this picture for more info:
      www.learningaboutelectronics.com/images/SPDT-relay-diagram.png
      As you can see, the "COM" pin is normally connected to "NC" but if you power the coil, COM will instead connect to "NO." Hope that helps.

  • @guruslakkimar12
    @guruslakkimar12 6 років тому

    why use a raspberry pi when you can install the app on the mobile phone ?? the pi is not as stable either as i have been using it..... hangs a lot ....

  • @POOP-qm9hk
    @POOP-qm9hk 4 роки тому +1

    Will he reply to a person commenting on a 3 year old video?

  • @ShamanRing
    @ShamanRing 6 років тому

    Is that adapter going to power all the relays?

    • @TechplantChannel
      @TechplantChannel  6 років тому

      It provides them power to turn on and off, but it will not power devices that are connected to each relay.

    • @ShamanRing
      @ShamanRing 6 років тому

      I see. then what is the purpose of the adapter? I see two power sources going into the relay board. one from raspberry pi, one from the wall. Shouldn't one of them power devices connect to a relay?

    • @TechplantChannel
      @TechplantChannel  6 років тому

      it takes about .7 amps to power all 8 relays at a time, so the adapter takes the brunt of the load away from the rpi. otherwise your rpi will struggle to run well during high load.

    • @ShamanRing
      @ShamanRing 6 років тому

      That makes sense. Any video you could provide me with to power the actual relays? I will essentially connect my relay to the wall outlet and power stuff with it.

    • @waydecurzon3551
      @waydecurzon3551 6 років тому

      The .7amp 5v is in fact what powers the actual relays. The relays are essentially a switch that will provide or cut power to what ever is hooked up to them. Think of it as a light switch! Hope this helped

  • @wsswetghg8791
    @wsswetghg8791 7 років тому

    are relays bistable or monostable?

    • @TechplantChannel
      @TechplantChannel  7 років тому

      Im not really sure, here is the data sheet for the relays on this board - pub.ucpros.com/download/27115-Songle-Relay-Datasheet.pdf?osCsid=tqkrkpgfau5ki5j03e5lmk89b5

  • @jairmercado8595
    @jairmercado8595 7 років тому

    can you use a 7.5 v power supply?

    • @TechplantChannel
      @TechplantChannel  7 років тому

      It depends on the 8 channel relay and if the voltage regulator can handle that large of a difference. What relay do you own?

    • @wsswetghg8791
      @wsswetghg8791 7 років тому

      do relays "remember" positions when ppowered off, or do they fall back into "default"?

    • @TechplantChannel
      @TechplantChannel  7 років тому

      they fall back into default.

  • @ApplySkills
    @ApplySkills 7 років тому +2

    how do i make the 5v 0.7A power supply. Please help my life is on the line

    • @TechplantChannel
      @TechplantChannel  7 років тому

      how soon do you need a video?

    • @ApplySkills
      @ApplySkills 7 років тому +2

      idk but the disease is catching up to me i dont have alot of time. plz make video or i die

    • @TechplantChannel
      @TechplantChannel  7 років тому +2

      Sentimental value ok I'll try tomorrow

  • @robertd6826
    @robertd6826 6 років тому +7

    Do we really need the music? ?

  • @gold-junge91
    @gold-junge91 6 років тому

    Not work

  • @ktbristol1540
    @ktbristol1540 2 роки тому +1

    hi

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

    Would have been a great video but the music was too annoying. Could not watch the entire vid.