I am currently trying to make a game console out of a Raspberry Pi 4 and a hard drive, with an Arduino to control boot, shutdown or reset, plus temperature.
I got a degree in engineering in electronics and embedded systems, however I could not practice my skills for a while (world is governed by code today) and would like to implement some features, such as current monitoring. As far as I know the best way to do that in my case is through a shunt on the 5V line, measure the voltage difference at the sides with an ADC and estimate it.
Would a resistor of 0.1Ω be ok for this? Such as one like this:
I found some limited to 2W, if we consider a current of 3A maximum, that's a voltage drop of 0.3V and power dissipated of 0.9W, I can compensate for the voltage drop so this is fine.
My calculation gives me a step of 5mV with the 10 bits ADC of Arduino, which would mean I can measure current with a 50mA resolution; not very precise but I just need to know if I am in the 200mA or 2A range while using it.
This project is just for fun and practicing, not something serious, so precision or safety is not a big concern.