Alternative voltage/current reading
Hi, on the voxl-flight is it possible to input voltage and current readings to an ADC onboard, or is the power module I2C bus the only method for PX4 to read voltage and current? I would like to add these capabilities to my UAV, but the modalai powermodule doesn't meet my requirements. I posted an issue on gitlab a while back to possibly use the readings from our DSHOT telemetry enabled escs which outputs voltage and current visible in the ulogs and
listener esc_statusin the mavlink terminal. https://gitlab.com/voxl-public/documentation/-/issues/22
The architecture as it stands only interfaces via I2C to the power module included in the kit. There are no ADCs exposed out to pins that could be used.
If you are up to write your own driver, it would likely be possible to subscribe to that topic and then publish as a battery message, but this isn't something we have out of box support for.
@modaltb It looks like the esc_status data should be available in mavlink. See https://mavlink.io/en/messages/common.html#ESC_STATUS. How can I test if I can use this?
I think it's going to be a coding effort on your end to get this going. It's not something that's used out of the box (e.g. route ESC voltage as a battery voltage).
My only experience has been when we created our power module driver, here:
On the top of my head, you could modify the driver above, instead of querying I2C to our power module, you could just subscribe to your ESC messages in there, and covert that to a power monitor message perhaps!