Ragnarok2012
Posts: 5
Joined: Tue Jun 02, 2020 4:13 pm

Powering Multiple Components

Thu Jun 04, 2020 10:43 pm

I'm working on a project for work that involves controlling a bunch (minimum 6) of solenoid locks with a Pi 4. So far, the setup is as follows:
  • Powering the Pi via stock usb-c
  • Controlling a shift register (with the future intent of chaining multiple) to get the output signals for
  • An 8-module 5V low-trigger relay which is powered separately to maintain isolation from the Pi.
  • All of which to toggle 6 solenoid locks that require 12V at 600mA.
So far, I've not run into any issues that I haven't been able to fix with either additional man-hours or new equipment. However, as you may have noticed, this setup has me utilizing 3 separate power sources. With that being the case, my question is 4-fold:
  1. Is it safe (for the Pi) for all powered systems to be derived from a single 12V source with one (or two) buck converters handling the 5V requirements?
  2. If I were to use this system, would it be safer (again, for the Pi) to have the 12V line split and use a single buck converter for each 5V component or to have a single buck converter and split the resulting 5V line between the two loads?
  3. Does the Pi even need to be isolated from the relay with these kinds of power demands?
  4. Given my own lack of electrical engineering knowledge, I feel I should ask if I'm missing a more obvious solution?
In case it helps, this is intended to be an always-on, headless system with very infrequent power-down cycles so a fair bit of wear may be expected.

Edit: Re-organized the setup description and questions for better readability and clarity.
Edit2: I realize I'd accidentally double-posted without seeing the required moderator approval. Updated to reflect the better formatting of the second post since this one had traction. Sorry for the first-time forum faux pas.
Edit3: Changed the thread title to better reflect the question. Sorry for the excessive edits, and sorry if any of this is against the forum rules/etiquette.
Last edited by Ragnarok2012 on Fri Jun 05, 2020 4:17 pm, edited 3 times in total.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13009
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Relay Setup

Fri Jun 05, 2020 12:34 am

maybe reading this will help.
viewtopic.php?f=91&t=83372&p=1225448#p1225448

Ragnarok2012
Posts: 5
Joined: Tue Jun 02, 2020 4:13 pm

Re: Relay Setup

Fri Jun 05, 2020 3:02 pm

I appreciate the pointer to the sticky - I hadn't fully read through the first post the first time since my board was working as intended, but it still had some interesting points to make. Namely being that it says hooking the VCC to 3.3v shouldn't be enough to drive the output of the opto-isolator (with its JD-VCC powered at 5v), and yet it seems to without issue.

Regardless of my professional curiosity towards the working system that theoretically shouldn't, it would appear that my question regarding my assumed requirement for isolation of the pi from the rest of the system is true. But that still leaves the other two.

boyoh
Posts: 1468
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: Relay Setup

Fri Jun 05, 2020 3:40 pm

It would be much easier to answer your post if we know what your knowledge of Digital electronics is Do you work in a electrical
electronics environment . Your question evolves understanding how to interface with the Raspberry Pi Inputs and out puts ,this
is a must if you want to do some design projects with the Raspberry Pi A good understanding of digital voltage levels is needed

Regards BoyOh
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

Ragnarok2012
Posts: 5
Joined: Tue Jun 02, 2020 4:13 pm

Re: Relay Setup

Fri Jun 05, 2020 3:47 pm

My knowledge of electronics is extremely limited. I only ever took one semester of electrical engineering courses in college, and don't remember most of it. Although I've picked up quite a bit, and remembered quite a bit, from this project it would be safest to assume I know next to nothing on the subject.

boyoh
Posts: 1468
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: Powering Multiple Components

Sat Jun 06, 2020 4:14 pm

At least you are honest about your knowledge of electronics . this makes it much easier to give you some advice. The first thing

is I think this project is a bit out of reach for you,, until you have more understanding of how the Pi controls things.

My advice is don't use the Pi as a high current power supply for your projects, use the out put signals to switch buffer stages
This can be don using opto isolators / transistors /relays , there are a number of ways you can use, from a separate power supple at a
voltage and current to suit your project , keep good isolation between different voltage levels. Research how the the Pi GPIOs work
and how to inter face with them. I suggest some breadboard work on the basics will be very helpful.



You are given the option of setting the GPIO I/P
To a impedance level that the processor can
Respond to. In its high impedance state floating
It will not sink or source a working level signal
This being a logic level 0 low or 1 high, So you
MUST set it to a working impedance level by
Setting the internal resistance 50k or using a
External resister of 10k . If you want it to respond
To a logic 1 high you connect it to the 0v rail
If you want it to respond to a logic 0 low you
Connect it to the 3.3v rail
One point is if you have the pull-up resistor
To low a value this will set the IN/Put impedance
To low , Ok for noise suppression ,but will degrade
The low input signal, ( Impedance = Resistance )

Regards BoyOh
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

Ragnarok2012
Posts: 5
Joined: Tue Jun 02, 2020 4:13 pm

Re: Powering Multiple Components

Sat Jun 06, 2020 7:08 pm

I'm actually not powering anything via the Pi - just using the GPIO output signals to toggle the relay modules. I may have written my original post poorly, so I've made some substantial changes to the content and organization of it.

To summarize: my control over the system is working without any problems, but its current setup involves 3 separate power supplies for the solenoid locks, the relay module, and the Pi. I'm mainly looking for advice on how best to combine them into a single source, reduce the voltage, and provide whatever protection I need to the Pi's input to keep it from frying like my first one.

I've looked at a few sources, and it looks like just a single 12v source connecting to a 12v to 5v buck converter should be sufficient to power both the Pi and the relays, and I'm curious what kind of other protections I need on the Pi. Someone in another thread mentioned the use of a simple voltage regulator to even out any noise the relays may create in the line.

User avatar
davidcoton
Posts: 4909
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: Powering Multiple Components

Sat Jun 06, 2020 7:53 pm

Ragnarok2012 wrote:
  1. Is it safe (for the Pi) for all powered systems to be derived from a single 12V source with one (or two) buck converters handling the 5V requirements?
  2. If I were to use this system, would it be safer (again, for the Pi) to have the 12V line split and use a single buck converter for each 5V component or to have a single buck converter and split the resulting 5V line between the two loads?
  3. Does the Pi even need to be isolated from the relay with these kinds of power demands?
  4. Given my own lack of electrical engineering knowledge, I feel I should ask if I'm missing a more obvious solution?
Some of these answers overlap, I have avoided repeating stuff so you need to read all four to get a full picture.
  1. Yes.
  2. There are two issues here.
    1. Does the Pi 5V need isolation from the relay coil 5v? Probably not, the Pi is not particularly fussy about its 5V supply, since almost everything on board runs through further regulators. The exceptions that might cause problems are HDMI and USB peripherals.
    2. Does the Pi need overcurrent protection? Using two converters, appropriately rated, no. The on-board protection can cope with a supply limited to 3A or so. If you use a single converter capable of 4A or more, you might want to feed the Pi through a polyfuse with 3A carry current rating. This will help protect the Pi's internal protection (TVS diode) from having to carry high fault currents for too long, which usually results in the diode failing short-circuit, thus protecting the Pi but requiring a replacement diode (SMT soldering required).
  3. No, as long as the relay module has inverse parallel diodes on the relay coils to stop problems from back EMF.
  4. No, unless you want to investigate non-relay based switching of the solenoids, for example using FETs. Assuming the solenoids might not be immediately adjacent to the Pi, I would think that relays are the appropriate (rugged) solution.
Signature retired

Ragnarok2012
Posts: 5
Joined: Tue Jun 02, 2020 4:13 pm

Re: Powering Multiple Components

Sat Jun 06, 2020 11:24 pm

davidcoton wrote:
Sat Jun 06, 2020 7:53 pm
Ragnarok2012 wrote:
  1. Is it safe (for the Pi) for all powered systems to be derived from a single 12V source with one (or two) buck converters handling the 5V requirements?
  2. If I were to use this system, would it be safer (again, for the Pi) to have the 12V line split and use a single buck converter for each 5V component or to have a single buck converter and split the resulting 5V line between the two loads?
  3. Does the Pi even need to be isolated from the relay with these kinds of power demands?
  4. Given my own lack of electrical engineering knowledge, I feel I should ask if I'm missing a more obvious solution?
Some of these answers overlap, I have avoided repeating stuff so you need to read all four to get a full picture.
  1. Yes.
  2. There are two issues here.
    1. Does the Pi 5V need isolation from the relay coil 5v? Probably not, the Pi is not particularly fussy about its 5V supply, since almost everything on board runs through further regulators. The exceptions that might cause problems are HDMI and USB peripherals.
    2. Does the Pi need overcurrent protection? Using two converters, appropriately rated, no. The on-board protection can cope with a supply limited to 3A or so. If you use a single converter capable of 4A or more, you might want to feed the Pi through a polyfuse with 3A carry current rating. This will help protect the Pi's internal protection (TVS diode) from having to carry high fault currents for too long, which usually results in the diode failing short-circuit, thus protecting the Pi but requiring a replacement diode (SMT soldering required).
  3. No, as long as the relay module has inverse parallel diodes on the relay coils to stop problems from back EMF.
  4. No, unless you want to investigate non-relay based switching of the solenoids, for example using FETs. Assuming the solenoids might not be immediately adjacent to the Pi, I would think that relays are the appropriate (rugged) solution.
Thank you very much for the response! I think I understand what would be sufficient, but just to confirm;
  1. Use a 12v source with an appropriate amperage capacity to handle all of my systems.
  2. Split the line, powering the 12v solenoids directly from the source and feeding the other into one 12v to 5v buck converter.
  3. Split the 5v out of the converter, powering the relay with no additional protection.
  4. Run the Pi's source through a 3A polyfuse (if the converter can output over 4A).
I'd sketch up a drawing of the circuit to confirm, but that'll take a bit. I'll try to put one together when I get back to work on monday.

User avatar
davidcoton
Posts: 4909
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: Powering Multiple Components

Sun Jun 07, 2020 10:11 am

Ragnarok2012 wrote:
Sat Jun 06, 2020 11:24 pm
Thank you very much for the response! I think I understand what would be sufficient, but just to confirm...
Yes, you've got it. 8-) :geek:
Signature retired

Return to “Beginners”