Hi there,
this question might have been asked more than you can ear in the past decade. Perhaps because there is no "final" or optimal solution for it.
What is the best way to measure current and voltage from a complex power tree in an embedded system ?
The requirements: small, low cost and able to measure from 1mA u to 5A with lowest error possible :-)
Consider the below power tree. It provide two 5V @ 4A, one 5V @4A and two 3.3V @3A. My system actually as a few more DC-DC and power rails to monitor this is just half of it.

This power outputs, power different peripherals and devices in the all system. Since every thing is battery powered a detailed power measuring from all the ouptus would be required( and this from the 1mA up to the maximum the DC-DC converter can provide).
Yeah sure you might say. Measure from lowest power mode, from mA into 3A or 6 A is a huge window to cover for a power monitor system.
My Solution (and here I would love to ear your input) was to use a INA4290A4 (Gain 200 1/1V) for the current sensing and a traditional Resistor voltage divider for the voltage.
In the end, both sensed voltages are multiplexed with and analog 4:1 MUX (TMUX1209RSVR) tha is connected to a MCU ADC(yes that might not be the best solution but there are some layout constraints at the moment. Perhaps here would be better to use an ADC close to the MUX output( in order to reduce the noise measurements).
Current sense, with INA4290A4 and shut resistor

Voltage Sense, with traditional resistor voltage divider

Analog Multiplexer
2x 4:1 Mux for voltage and current.

I was also looking into AIO IC solutions like the INA219 or INA3221 that integrate all the above steps in one IC. Which would be my number one choice(even if would cost a little more in the end) but these look like they have a rather high RSS error( at least from what I saw, correct me if I am wrong).
So what solution would you recommend the above One(Current Sense Amp + MUX + ADC) or a AIO IC like the INA219 ?
Please remenber I need to measure between 8 to 10 power sources in the same PCB ( 4x 3.3V max 3A and 4x 5V max 6A) with good accuracy(of course ) and space constrainted.
Regards,
Pedro