4

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:

Resistor 2W

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.

JYelton
  • 32,302
  • 33
  • 134
  • 249
Varech
  • 275
  • 2
  • 6

1 Answers1

4

You sure can. Normally you amplify the voltage before measuring it though. The easiest location to measure is to put the resistor in the ground path so you can process the voltage across the resistor easily, but then this disrupts the ground connection which is bad. Putting it on the high-side means you need a diff-amp to produce a ground referenced signal.

DKNguyen
  • 54,733
  • 4
  • 67
  • 153
  • Would you recommand a particular opamp for that ? – Varech Dec 19 '19 at 18:23
  • 3
    Best read up around four-terminal sensing, too, if you want to do a proper job. – Dan Sheppard Dec 19 '19 at 19:25
  • 3
    @Varech It's a specialized task that is common enough that there are ICs specially made for the task so you don't need to use op-amps. The application requires high common mode voltages and good CMR which can be difficult to find in regular op-amps. The ICs are called things "high-side current sense diff amps" or something along those lines. – DKNguyen Dec 19 '19 at 19:32
  • 3
    There are chips especially for this, such as https://uk.rs-online.com/mobile/p/current-sensing-amplifiers/1784576/ ncs215r – David Molony Dec 19 '19 at 19:53
  • Ncs213r. Typing on my phone... – David Molony Dec 19 '19 at 20:03
  • @DavidMolony but the minimal gain is 50, with this shunt it would put 15V for 3A current, I guess it is designed for lower resistive shunts. I will try to catch a simple opamp. – Varech Dec 20 '19 at 14:03
  • @Varech Yes, 100mOhms is very high for a shunt, but required if you are measuring very low currents – DKNguyen Dec 20 '19 at 15:20
  • 2
    Sinking 0.9watts into a 15watt load just for current measurement is not really necessary. Either get a lower value shunt or use 3 of them in parallel to get 0.03ohm... – David Molony Dec 21 '19 at 17:32