Power Estimates

One thing I couldn't find out about the motor we had bought was what it's power consumption was like. I have rigged up some parts of our 2022 PiWars robot on the Meccano chassis, that includes the Raspberry Pi and the power distribution board. One feature we hadn't used in the 2022 competition was the built in voltage/current monitoring IC on the power distribution board. It's a TI INA219 with a 10mΩ sense resistor (actually for power and cost reasons it's 4 40mΩ resistors in parallel). The INA219 is a complete current sense amplifier for high-side current monitoring and ADC built into a single I²C enabled chip. There are a few options for talking to this sense chip, but I used the pi-ina219 library. You need to tell the library what value the sense resistor is but that's about it. You can then read voltage, current and power.

1
2
3
4
5
6
7
8
9
import time
from ina219 import INA219

pi_ina = INA(0.01)
pi_ina.configure()

while(true):
    print(pi_ina.voltage(), pi_ina.current(), pi_ina.power())
    time.sleep(1)

My very simple script was run on the Pi via SSH whilst it was connected to the WiFi while I tried driving the prototype around using a conventional RC receiver. The power for everything was running through the power monitor chip so the base power consumption sits at around 4W which is the Raspberry Pi, this goes up to nearer 5W as I started to use the steering. Going to full throttle peaks the power at 80W! settling down to about 60W once the acceleration is done. The battery voltage drooped a little when accelerating but the battery is pretty full (nominal 11.1V for a 3S LiPo and it was reading about 12V).

A graph showing nearly constant 12V, current sitting at 500mA and peaking at 6A and power sitting at around 5W with peaks up to 80W
A really quick look at power consumption on the prototype chassis.

I plotted the couple of minutes of testing with GnuPlot to have a look. While the peaks are interesting the estimates of power usage are limited since I did so little driving. Based on an average power consumption of 60W while racing we'd have about 1 hour run time on our 5400mAh 3S LiPo pack.