I am using an L298N motor driver to control 2 motors, and I would like to measure the voltage/current/power of both motors simultaneously.
I can measure these values for an individual motor using an Adafruit INA219 sensor (circuit diagram shown below).
Is it possible to use a single INA219 sensor (or similar) to measure both motors simultaneously? If not, is there another straightforward solution for this?
Since you are using a controller that controls the motor speed by pulsing the current, you cannot directly measure the current because it only comes in short pulses. You would need an oscilloscope to see the pulses. You can not even measure the current into the controller for the same reason.
You can try putting the INA219 in the 12V input line to the L298N and see if it works well enough for your application. It will of course also measure the current used by the module itself as well. I do something similar with a different motor driver and current module for a DCC booster (digital power control for model trains) and it's surprisingly good at measuring the current.
Thanks for pointing this out; I was planning on measuring the average current over a period of time to account for this, not sure if it will work. The current reading on a power supply is quite stable.