Originally it runs on AC (110-220v). As I can see, there is AC/DC converter inside, with output 5V and 3.5A.
I have already installed UPS with output 5V (for my old switch).
I would like to remove (or disconnect) the original AC/DC converter ( PAIRUI ASD20-5) and to solder a dc connector for 5V where the output of the AC/DC is.
But it has also one input @ 20V
If only 5V would be needed then the direct 110/230 -> 5V converter could be used. Why to step down to 20 and then to 5? There is another 110/230V one installed.
I would check if it is possible to not remove the original AC/DC converter and add a couple (blocking) diodes to allow connecting your DC 5 V input in parallel to the output of the built-in converter.
In general, the external 5V may be connected to the output of the existing AC/DC converter. Powering both at the same time (connecting AC and providing external DC) is not a good idea, so care should be taken to avoid that.
I would be careful about the external DC path altogether. One concern is the voltage drop through the external wiring and the connector. This can easily generate a voltage drop that's enough to bring the internal circuitry out of the expected range. So, short, thick wire, preferably soldered connections, and clean/good quality connections.
The other concern is that the internal circuitry almost certainly relies somewhat on the capacitor internal to the AC/DC converter. If this is removed (and even otherwise) a capacitor should be added. I'd suggest at least 220uF.
Allow me to disagree.
You cannot say if connecting the 5V from the UPS to the output of the AC/DC converter may damage it or not.
At least on those Mikrotik devices that support more than one power source, a blocking diode is used and the one with higher voltage wins.
So you either insert a blocking diode or CUT the traces/connection (and only use the UPS power).
These converter blocks have a fairly standardized topology, and based on their function there are some restrictions around how they may be internally constructed. So in fact that's what I'm saying: back-feeding it with the nominal output voltage has no adverse consequences.
The diodes in the Mikrotik designs with multiple inputs are in a different part of the topology, which simply does not exist (not even internal to the ac/dc block) in this device.
You are right that it is prudent to install such blocking diodes whenever multiple dc sources are joined. In this case the 5V supply is used to further derive 3.3V from it. For these further regulators to lose regulation, only between 0.5-1V of voltage drop is required. A diode has a voltage drop of 0.7V (p-n Si junction) or 0.35-0.4V (Schottky junction), which leaves very little margin. The current consumed by the sorts of logic circuitry in a switch has large spikes, and the transient voltage drop on these diodes can increase significantly under these transients.
This is why, in this particular case, the diodes make things significantly worse. So if one wants to be prudent and decides to disconnect the existing supply, that is an actually safe decision. Including the diodes is far from prudent, and actually decreases the chance of things working out.
I don’t know how critical the 5V voltage is (it could be that the circuitry in the top right converts it to 3.3V for the critical parts of the circuit and the 5V is only for some LEDs or drivers), but note that the converter outputs 3.5A and so it is important not to lose a lot of voltage over serial resistance.
When your connecting wire from your UPS to the internals of the switch has a series resistance of only 0.2 ohms (this would be the sum of two wires, 2 or 4 connections), there is a voltage drop of 0.7 volts reducing the 5V to 4.3V. Not desirable.
5V is not a convenient voltage for such purposes. When you had 24V or even 12V available, you could replace the AC/DC converter with a DC/DC converter or even switchmode regulator which will regulate the voltage in the switch to 5V again, so the series resistance is not important.
There are 2 problems I can see with this - not necessarily insurmountable, but they do need assessing
The regulation point for 5V is presumably at the 5V terminals of the ac/dc convertor. For an external supply, the regulation point will be at the 5V supply source.
The dc grounding arrangements will be internal to the CSS318 and any external ground could cause problems
It is not only cable, there is also the connectors. I presume you want at least one, possibly two connectors.
Well I am not making it up, it is an established reason (also mentioned by @DuctView above, why you want the 5V regulator close to the circuit rather than in a distant box.
I can fully understand the advantage of a UPS providing DC voltage, but I would have chosen 24V or 12V as the voltage, not 5V. And then use a cheap switchmode module to bring it to the required voltage. The CSS318 is a bit of an outlyer, many MikroTik devices use 12-24V input voltage and do the same thing. Some even support 48V.
It's much more common to use 0.5mm2 wires. Yes, you can absolutely use thicker, especially for the part that is not directly attached to the PCB, but only psychopaths (like me) use them.
For normal connectors (not specifically high power DC) about 10 mOhm per contact can be assumed.
With PC internal PSU's, it's not rare to see loop resistances in the 50-100 mOhm range. (Yes, they do use the crappiest wire and connectors they can get away with.)
That's why Mikrotik (rightly) uses mostly 24V for this, and even when there is an internal PSU that is attached through a connector, 12V. This is a very sound and safe design decision. In this particular model, it seems like they could get away with not having an additional 5V converter, which makes this device probably the worst candidate for this sort of conversion.
If the OP is careful, I'm quite sure they can pull this off. It's just that there really isn't a whole lot of additional margin.
EDIT: By the way, this is why I dislike most things that are powered by 5V USB that use it as a power source to run on, and not as a charger.
I don’t have the switch, however the photos from ServeTheHome provide enough details to discern the important details.
First, the High Side:
The high side is protected by two fuses (The two red arrows → these are resistors with 0 Ohm value that act like fuses). The yellow demarcation line show the High Side sufficiently isolated from the rest of the board (This, and the use of a AC-DC converter that is sealed with epoxy allows Mikrotik to place the power supply on the main board in compliance with safety standards AND pass all certifications).
On the Low side there are 3 more fuses (these are also 0 Ohm resistors similar to what is seen on the High Side). This means that the Output of the AC-DC Converter (large black box) further converted by on-board DC-DC converters to provide different voltages to power the components like CPU, RAM and whatever else may require its own source. For the purpose of this mod, it is irrelevant what those voltages are. What you really need to know is that the output of the AC-DC converter is protected by the fuses, so (in case of defect in the switch circuitry) the main power source is protected.
The components located immediately next (to the right) to the output of the AC-DC converter are important because these components give some clues and help to find the best spot to connect up the external power source. The two barrels are electrolytic capacitors with the stripe showing the negative, or the ground (GND) terminal). The small black surface mount components is a diode with the marking “PEG” meaning we can locate its datasheet). It turns out this a is a TVS Diode (Transient Voltage Suppressing Diode). This is Unidirectional TVS SMDJ13A. The side with the stripe is cathode (left), and it is connected to the positive terminal of the +5V output of the AC/DC converter. The other component we are interested in is the grey round coil L105. with the marking “100” on top (This is an inductor with the value of 100uH).
Now, we have enough information to draw the schematic.
Since we have determined that the High Side is isolated, it is not of much interest, so we will focus on the Low Side to find the best place to connect the external power supply:
The 10 uH coil (Inductor L105) paired with the downstream capacitance acts as a low-pass filter to block high-frequency noise (EMI) from entering the circuit or prevent switching noise induced by the AC-DC converter from "polluting" the rest of the system. This coil also acts as "Inrush Current Limiter". It resists sudden changes in current, which helps soften the initial current spike when the you power up the device.
The SMDJ13A TVS Diode (Parallel/Shunt)
The SMDJ13A is a high-power Transient Voltage Suppressor. It is designed to "clamp" voltage spikes (Overvoltage Protection). Even though your rail is 5V it has a reverse standoff voltage of 13V. Its role in the 5V System is to protect the rest of the components if the AC-DC converter starts malfunctioning. Since it is unidirectional, it will also act as a forward-biased diode if the input polarity is reversed, potentially blowing a fuse to protect the rest of the board (Reverse Polarity Protection).
The Electrolytic Capacitors in parallel
Bulk Decoupling: They acts as a local store of energy to maintain a steady 5V DC level during transient load demands. While the inductor handles the high frequencies, these capacitors smooth out lower-frequency ripples.
Together with the 10µH inductor, the capacitors a Low-Pass Filter.
@lz1mak1, Now that you have the schematic I think it will be much easier to connect the external power supply.
If I were doing it I wouldn't even try to remove the AC-DC converter - the solder pins are far apart and it is very large component - removing it would take a heat gun an a solder wick and a lot of patience with the risk of ruining the board.
There exist a simpler solution without removing the AC-DC converter which will also allow a quick restoration to the original factory condition if you change your mind.