There are special resistors for this purpose that are very low in resistance.
There are special resistors for this purpose that are very low in resistance.
The data acquisition is kinda a bitch if you want to measure accurately over long time, small IoT device can take microamps when idle and tens of even hundred+ mA when transmitting and that's 4-5 orders of magnitude of dynamic range and that's kinda hard to deal with accuracy
https://www.joulescope.com/ handles most of that edgecases but it's a pricy piece of kit if you just want to do some measurements and are not using it to make actual product.
Hell, that's actually very easy way to make ADC, just start counting, charge cap to pre-determined value then trigger counter stop. There are few improvements to that technique (like dual slope ADC, where you use reference voltage to discharge the cap to get the ratio between reference and input signal) but in general it can be very accurate way to measure.