I am planning on building a box with these components:
- Raspberry pi - Model 3
- Relay Module 4 Channel
- (Optional) 1.5" RGB 128x128 OLED Module Display
What I basically want to do, is remotely manage 4 power outlets that will have some electronics hooked up to them. As for software, I've written my own code for this (I coded a web server that basically has an authenication page and after successful login, navigates to the "control" page that lets you "ON/OFF" each relay).
More Information
All of these parts will be inside a 2U rackmount chassis. The system will be provided with power from 220VAC (I live in Greece so if you have other questions about what will power the system, search for the local power standars, don't really know what other info to provide).
The Problem
I want to know what kind of power supply I should use to power this system. I don't want to completely rely on the RPI to power everything because I had some bad experience with 8 module relays (not enough power to even boot the pi). This time I have 4 channel relay, but I plan on adding the display as well, and to cover future scenarios of adding some wifi dongle etc, I want everything that can be powered by the power supply to do so, and avoid straining the RPI.
Below, I've added an attachment of how I plan to connect each relay from the wall outlet (220VAC), and how to control it from the RPI. I've found a power supply that can convert 220VAC to 5VDC but I don't know what amperage to use. From my understanding, each device will take what it needs, but is that really so? I mean, can I just put a |220VAC to 5VDC, 40A, 200W| power supply?
I was thinking of using THIS ONE, a "5V 18A 90W MeanWell"
- Power: 90Watt
- Output Voltage: 5V DC
- Output Current: 18Amp
- Supply Voltage: 120...373V DC, 88...264V AC
- Protection: overload, short-circuit, voltage growth
- Number of Outputs: 1
- Mounting: for building in
- Efficiency: 86%
- Output connector: Screw Terminals
What I'm basically asking is: Is my poorly drawn system correct (image below)? Is the power supply connected correctly to the PI? Can I connect the relay to the 5V power supply directly? Can I connect the display to the power supply too (is not shown in the image)?
And if so, what Amperage should I use for the power supply? Should I ground everything together to the supply or the RPI?