# Alternative voltage/current reading

Source: https://forum.modalai.com/topic/29/alternative-voltage-current-reading
Category: Flight Core and Legacy VOXL (https://forum.modalai.com/category/9/flight-core-and-legacy-voxl)
Tags: voxl-flight
Posted: 2020-10-27 18:10:53 UTC by benjamin linne
Replies: 3 · Views: 1015

## benjamin linne · 2020-10-27 18:10:53 UTC

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_status` in the mavlink terminal. https://gitlab.com/voxl-public/documentation/-/issues/22

## Reply by modaltb (ModalAI staff) · 2020-10-27 23:42:32 UTC

Hi Benjamin,

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.

## Reply by benjamin linne · 2020-10-28 20:09:58 UTC

@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?

## Reply by modaltb (ModalAI staff) · 2020-10-29 19:12:39 UTC

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:
  https://github.com/PX4/PX4-Autopilot/tree/master/src/drivers/power_monitor/voxlpm

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!

More info:

https://docs.px4.io/master/en/config/battery.html
