Based on Ohms law the maximum current going through a 100 kOhm resistor at 24 V is: I = U / R = 24 V / 100 kOhm = 0,24 mA.
Your motor will never run if you put that huge resistor in there.
And a resistor has no knowledge on how much power it is able to dissipate and intelligently let more or less current pass. So it is the duty of the one designing the circuit to make sure it will be able to handle the typical power dissipation expected from the design. And probably include some safety margin for stuff the designer did not expect.
Current sense resistors should be chosen in a way, that the influence on the circuit is small and have a power rating so they won't burn down.
Now to sense 15 A, and don't influence the circuit much, the voltage drop should be lower than 1 V, probably a lot lower, like 150 mV or so.
So the resistor would have R = U / I = 150 mV / 15 A = 10 mOhm.
The power dissipation of that resistor would be P = U*I = 150 mV * 15 A = 2.25 W.
Measuring motor current might have some difficulties with induced noise and stuff, but I don't have any experience in that field. The phase currents might also be higher than the average you calculated there - but again not sure on that.
Well, there's certainly specific current-sensing ICs. In your case, I'd "simply" go with something like:
- Use a small (e.g. 0.5 Ω) series resistor between battery and your electronics.
- Amplify the voltage across that resistor with an instrumentation amplifier
- Log that voltage, e.g. using an ADC
Problems:
- low currents · low resistance = low voltage: Your measurement accuracy will be bad due to noise
- since microcontrollers wake up very fast and go to sleep equally fast, your ADC sampling rate necessarily needs to be very high.
But as a principle, that works, and is certainly viable (although designing a stable, low-noise, high-amplification instrumentation amplifier might be nontrivial; but: there's existing instr.amp ICs that make that a lot easier).
Luckily, your problem is rather common. So: Many, including Texas Instruments, have a portfolio of current sensing amplifiers, some of which integrate both aforementioned shunt resistor AND a digital interface. See TI's product listing.
In fact, these ICs are capable of measuring current and supply voltage at the same time – and that's great to actually measure drawn power, a measure far more relevant to battery life than raw drawn current, if there's nonlinear elements (that is, for example, MCUs).
The INA233, for example, can be connected to an external shunt (let's say, 0.3 Ω) and has a resolution of 2.5 µV per ADC step. That means, a single ADC step is I = U/R = 2.5 µV / 0.3 Ω = 8.333 µA in current.
I think that device also has an automatic sampling & averaging mode, so that you can easily get good approximations even under rapidly changing load.
Also, as I just found out: the thing has an "alert" level, so that you can wake up your measurement system whenever the current rises above a configurable threshold. Nice! That way, you only need to sample occasionally.
Best Answer
Yes, that's a good way of doing it, if the effect of the measurement resistors is indeed negligible. That could be a problem with low voltages: you want to have a resistance high enough to measure at least several tens of mV, but if that branch has only 100 mV between nodes then the resistor may affect the circuit's operation.
But often you don't need a shunt resistor, if you already have a resistor in the branch you can measure across that.
Note that for AC measurements the current you measure will always be in phase with the branch's voltage, and that may be quite different from the current's real phase. For instance, if you want to measure the current through a capacitor that will be 90° out of phase with the voltage, but what you measure across the resistor will have 0° phase shift.