Help with external power with 5v relay

Thread Starter

diggerdugger2022

Joined Feb 6, 2024
11
Hello I am trying not to blow myself up and looking for a bot of help while learning. I have a few 5v devices and 1 40w device I would like to power with an external power source. I have a 5v relay and some old laptop charges along with some PC power supplies. Is it possible to use these as external power sources for my projects? I am using a raspberry pi with a raspberry pico with some sensors and water pump along with led lights and a heat lamp that I would like to power. Any help is appreciated. thank you in advance.
 

ThePanMan

Joined Mar 13, 2020
793
Welcome to AAC.

Yes, it's easy enough. You have 5V control source to activate the relays. Each relay can control an individual device. But it's important to understand the type of voltage (AC or DC) and the amperage rating of the relay contacts.
 

Thread Starter

diggerdugger2022

Joined Feb 6, 2024
11
Sure, would need to add a 5 volt regulator for the Pico. What are the voltages required for the pump and heat lamp?

The pico is connected to the raspberry pi via usb so that power is taken care of. it is everything elese that will be connected to the 5v relay.

pump is 5v Current: 0.1 – 0.2A
lamp is 40 watts - ‎110 Volts
DHT22 sensor - connected to pico
one wire sensor - connected to pico
2 x 5v fans - connected to relay
 

Thread Starter

diggerdugger2022

Joined Feb 6, 2024
11
Welcome to AAC.

Yes, it's easy enough. You have 5V control source to activate the relays. Each relay can control an individual device. But it's important to understand the type of voltage (AC or DC) and the amperage rating of the relay contacts.
Thank you apprieciate it. Here is the relay I have

  • Equiped with high-current relay, AC250V 10A ; DC30V 10A
  • 5V 4-Channel Relay interface board, and each one needs 50-60mA Driver Current
 

Thread Starter

diggerdugger2022

Joined Feb 6, 2024
11
Thank you apprieciate it. Here is the relay I have

  • Equiped with high-current relay, AC250V 10A ; DC30V 10A
  • 5V 4-Channel Relay interface board, and each one needs 50-60mA Driver Current
what would be the safest external power source to use? and should i add fuses before the relay for protection?
 

ThePanMan

Joined Mar 13, 2020
793
Am not concerned with your choices of relays. Here's how you hook them up. Note, each "V Source" is for each voltage rating of whatever it is you're controlling. EVERYTHING could be powered from a single V Source. I only split them apart to show they don't have to be the same. The motor could be 120VAC or 12VDC. The lamp could be 120VAC, 12VDC or even some lower voltage. The heater could be 240VAC. As for the control voltage of the relays, they need to be whatever you're controlling them with. If with a PIC, probably 5VDC. The coil needs to be properly rated. Also, the relay contacts need to be rated for the appropriate type of voltage (AC or DC) AND rated to handle the current each device will draw.

The engineering is up to you. (ignore "midpoint". It's just where the pointer was when I took a screenshot)
1707244501049.png
Finally, notice V Source is connected to the NO contact. That way there's no voltage present on any other nodes when the relay is off. If you were to connect to the C then either the NO or NC will always be energized. No need to have a dangerous source hanging out there.
 

dl324

Joined Mar 30, 2015
16,918
I have a 5v relay and some old laptop charges along with some PC power supplies. Is it possible to use these as external power sources for my projects?
A PC power supply already has a 5V output.

If you want to use the laptop chargers for more portability, sum up the current you need from 5V and pick a voltage regulator that can handle it.

For low currents, a linear regulator like LM7805 would do. If you have to buy it, I'd suggest that you get LM317 that are adjustable from 1.25-37V. Buy enough to get a price break. You may also need a heat sink.

If you can wait several weeks, AliExpress has a lot of voltage regulator options. You can get a 3A buck (step-down switching) regulator for a dollar or so.
 

Reloadron

Joined Jan 15, 2015
7,517
along with some PC power supplies.
Yes, very easy. Just get one of these. Very convenient and is fused. Easy to mount with a few stand off insulators. Since you mention having PC power supplies. Here is another example of breakout board for an ATX PSU.

As to the relay module boards, some look to a low trigger and some to a high trigger while some use a jumper to select High or Low trigger to make a channel active so choose what you want or write code around what you have. :)

Ron
 
Last edited:

Jon Chandler

Joined Jun 12, 2008
1,051
5V 4-Channel Relay interface board, and each one needs 50-60mA Driver Current
Do you have a link to this board?

The Pico port pins are rated to source/sink 15mA maximum, with a total current of 50 mA maximum from all port pins.

Most relay boards have a buffer (a transistor or mosfet) so the port pins only have to supply a few mA. If yours doesn't have buffering, you'll need to add it.

Beyond that, the relay contacts are just a switch. Usually there are 3 terminals, COM (common), NO (normally open) and NC (normally closed). COM is connected to NC when the relay is not energized. COM is connected to NO when the relay is energized.

If the relays are going to switch line voltage, they should be mounted in an enclosure to prevent shock hazard.
 

Thread Starter

diggerdugger2022

Joined Feb 6, 2024
11
Do you have a link to this board?

The Pico port pins are rated to source/sink 15mA maximum, with a total current of 50 mA maximum from all port pins.

Most relay boards have a buffer (a transistor or mosfet) so the port pins only have to supply a few mA. If yours doesn't have buffering, you'll need to add it.

Beyond that, the relay contacts are just a switch. Usually there are 3 terminals, COM (common), NO (normally open) and NC (normally closed). COM is connected to NC when the relay is not energized. COM is connected to NO when the relay is energized.

If the relays are going to switch line voltage, they should be mounted in an enclosure to prevent shock hazard.
This is the board I am using
https://www.amazon.com/gp/aw/d/B00KTEN3TM?psc=1&ref=ppx_pop_mob_b_asin_image
 

Thread Starter

diggerdugger2022

Joined Feb 6, 2024
11
Am not concerned with your choices of relays. Here's how you hook them up. Note, each "V Source" is for each voltage rating of whatever it is you're controlling. EVERYTHING could be powered from a single V Source. I only split them apart to show they don't have to be the same. The motor could be 120VAC or 12VDC. The lamp could be 120VAC, 12VDC or even some lower voltage. The heater could be 240VAC. As for the control voltage of the relays, they need to be whatever you're controlling them with. If with a PIC, probably 5VDC. The coil needs to be properly rated. Also, the relay contacts need to be rated for the appropriate type of voltage (AC or DC) AND rated to handle the current each device will draw.

The engineering is up to you. (ignore "midpoint". It's just where the pointer was when I took a screenshot)
View attachment 314614
Finally, notice V Source is connected to the NO contact. That way there's no voltage present on any other nodes when the relay is off. If you were to connect to the C then either the NO or NC will always be energized. No need to have a dangerous source hanging out there.
This is perfect thank you and gives me a better understanding of what I want to do now. So one last question. if I was going to use 1 V Source, where does it get connected so that all of the devices can be powered from it. Ir do you recommned a dedicated V Source for each one? I have to also think of a disaster scenario. Say the pico dies and it is controlling the water pump and theh pump switches on or never switches off, it would filll up the terarrium and eventually burn out. I have to think of some sort of fail safe.
 

Jon Chandler

Joined Jun 12, 2008
1,051
This schematic is for a similar if not identical relay module. It's buffered with an opto-isolator so the port pins only require a few mA to active each relay. The relay COILS need 60mA to work (probably for 4 relays in total), so the 5 volt supply to the coils needs to be able to provide this current.

There is a jumper on the board (look at the top of the schematic) so that the coil supply voltage can come from the Arduino or a separate source.

Regarding power to the loads being switched: each set of relay contacts is separate from everything else on the board. You'll have to connect the COM terminals to the voltage source that powers the switched devices, one side of the device to an NO terminal, and the other side of the device back to the power supply.

SmartSelect_20240206_125455_X-plore.jpg
 

Thread Starter

diggerdugger2022

Joined Feb 6, 2024
11
Yes, very easy. Just get one of these. Very convenient and is fused. Easy to mount with a few stand off insulators. Since you mention having PC power supplies. Here is another example of breakout board for an ATX PSU.

As to the relay module boards, some look to a low trigger and some to a high trigger while some use a jumper to select High or Low trigger to make a channel active so choose what you want or write code around what you have. :)

Ron
I have a 20 PIn breakout board (The second one in your example) which does not have fuses. Is there a board I can buy or make to put in front of the one I have so I can fuse each line properly?
 

Reloadron

Joined Jan 15, 2015
7,517
Sure, a Google of "Fuse Block" should get you a dozen hits. Just choose your fuse style. :) Something like this could work, I like these as it's easy to snap some off and add some. There are also versions built around automotive fuses.

Ron
 
Top