The Pi has always been kind of selective when it comes to the power supply. They usually recommend purchasing a 2.5A PSU. I'm using two microcontrollers in my project, an L432KC nucleo which claims to be an ultra-low power MCU, and a Raspberry. I chose this
AC-DC converter to power up my project. But it was a bad idea, since the board which has the converter is located 7 feet away from the Pi.
I used a 7 feet CAT5E Ethernet cable. The reason why I chose that cable is because I need 6 lines to communicate the main board with the Pi. I need 4 wires for RX and TX (differential), and 2 wires for VCC and GND. As the ethernet cable brings 8 wires, 2 are leftovers, which I connected to VCC and GND respectively. The serial communication works perfectly. But the power is not being effectively delivered. It turns out that the Pi throws the "Undervoltage detected" warning. When I measure the voltage going to the Pi, I get something between 4.95/4.98V, never 5V exactly. So, I'm losing voltage in the wiring. If I use the original Raspberry PSU (which also is like 7 feet length), everything is fine. The Pi uses a little HDMI screen, which increases the consumption. The idea is to power up the whole project with a unique power supply. So I chose the converter mentioned before to be 4A to leave a good margin for the Pi and for other minor loads which also need 5V. A better idea that I should've considered is to have 12V in the main board, and convert to 5V next to the Pi, that way I transport 12V instead of 5V, which could lead to minor losses.
I wanted a well structured cable, instead of having the six lines in the air. The PCBs in communication, both have ethernet female connectors, so I would have to change the design in order to use another type of cable. Also, note that although I'm using ethernet cable, the purpose of the cable is rather different. I've seen many devices using this type of cable for other purposes. If you have a better suggestion, let me know. Anyways, in the new design, I'm considering using 12V, and convert to 5V next to the Pi.