Hi fede,
No, almost all standard AC to DC converters do not automatically limit and maintain their output current to the maximum current spec. The max current level specified in their respective datasheets is the most current a power supply is designed to support without exceeding its capabilities. They don’t have intelligence to maintain a max current, which would require linearly scaling back the output voltage to do so.
Instead, they employ protection mechanisms which will typically entail one of two methods:
-
Crowbar mode: The supply cuts off the output voltage until its input power is cycled (turned off and on again)
-
Hiccup mode: The supply repeatedly turns off and (briefly) on again until the overcurrent condition is no longer present
Therefore, whenever the supply sees a load significantly greater than its maximum rated load for more than a very short period, it will disrupt current flow by either turning off completely or by pulsing on and off repeatedly.
However, if you plan on connecting the output of your supply to two USB connectors, with the intention of powering one or two devices via USB cables, there are further considerations. Specifically, USB standards define how a device which is capable of drawing power via its USB input connector will behave. According to the USB specification, before it can draw more than 100mA, it must interrogate the nature of the USB power source.
If the power supply simply leaves D+ and D- disconnected, then a properly designed USB-powered device will only draw 500mA (or 900mA for some USB3.0 devices) regardless of how much current the supply is capable of supplying. According to USB specification “BC1.2”, if the power supply is designed with D+ and D- shorted together, then a USB-powered device will detect this when plugged in and it will be allowed (by BC1.2 specification) to draw up to 1.5A from the port.
Now applying this to your application, if you don’t short D+ and D- together, USB devices would automatically limit their current draw to 500mA from either port, so that should work, as the total draw would not exceed your 2A limit. However, even when only one device was plugged in, that device could still only draw up to 500mA.
To draw more than 500mA from either port, you would have to implement BC1.2 and short D+ and D-, which would then allow for up to 1.5A to be drawn on that port. So, if you shorted D+ and D- on one of the two ports, and left them open on the other, you could allow one device to draw up to 1.5A and the other to draw up to 500mA, which would keep the total power draw at, or below your maximum of 2A.