Hello, I 'm trying to connect an Attopilot 90A current sensor to a PX4 board.

Reading the manuaI, I have found this page, where I read:

  • PIN = 101 A virtual analog input pin for a battery current sensor connected to the “current” pin next to the power connector on the PX4IO.
    • This pin can accept up to 3.3 volts.
    • WARNING: If voltages higher than 3.3 are used there is a risk of causing the PX4IO to malfunction, forcing the PX4FMU to reboot.
    • For use with a current sensor, a 0.1uF capacitor between this pin and ground will help reduce “noise”.

Now, taking a look next to the power connector of the PX4IO board (v1.3), I see an orphan pad, labelled ADC5/CURR squeezed between the power connector and the the 3 holes for SBUS OUT as shown below:

Now, a stupid question? What does the manual mean by "virtual port"? And why is this ghost pad not acknowledged elsewhere in the documentation? If you look at the PX4 board overview, this pad is visible in the photo of the top of the board but not mentioned in the schematic or pin assignments below.

Anyway, I soldered a straight male header to the pad and went to the Mission Planner and turned on a Voltage and Current measurement via the AttoPilot 90A on a PX4:

This led the MP to inform me that me my 3S battery had a voltage of 52.79 Volts and I was drawing 50 Amps with the pin I had just soldered unconnected to anything:

Unfortunately, both these numbers were wrong. I tried connecting the pin to a ground (touched it to the GND of the servo rail) or making a small voltage (1.8V) with a voltage divider on a breadboard and trying to read it. Nothing. The reading on the MP remained stuck to 50A (+/- an Amp or two) and seems completely independent of anything I do to the ADC5/CURR pad.

After some mucking around with the params, I realised I shouldn't use the Config/Tuning tab because selecting the AttoPilot 90A sensor through that, gives VOLT_DIVIDER a value of 15.7 which is wrong since I am reading the battery voltage through the PX4IO power pin and so, the value of VOLT_DIVIDER has to be 1 (the MP assumes we are using an APM and reading both voltage and current through the AttoPilot 90A, I only want to read the current).

So, going into the Param list and manually setting the correct pins (100 and 101 for sensing voltage and current) and setting VOLT_DIVIDER to 1, I can get a correct voltage displayed in MP. However, the current stays firmly stuck to around 50% and flatly refuses to budge no matter what I connect it to.

Does anyone know what I might be doing wrong?

Views: 1090

Reply to This

Replies to This Discussion

Hi, I made the same observations here ... that virtual port definitely is virtual = does not really exist, hmm ..



I see, so I take it you haven't managed to make it work either. I have googled everything I could think of to see if anyone has ever managed to connect a current sensor to a PX4 running Arduplane but can't find anything beyond the nebulous manual reference I have quoted in my first post. I guess there is no point asking at the ETH PX4 forums because, as far as I can tell, the code they use is not Arduplane (and anyway, the manual reference is for Arduplane so it means the APM code is bound to allow reading this pin, otherwise why would this manual reference exist).

Hi, actually that current sense pad is mentioned in the schematic. A1-A2.

This has got to be a simple software thing. Unfortunately I cannot get the PX4 firm to compile. It crashes because it cannot find some telemetry stuff for an RC system I don't have anyway hmm. Have you tried?

Are the ETH forums you mention open to the public? Where are they please?



The start page of the PX4 is here:


From there, you can navigate to the questions section:


and the user forum (google group):


I haven't tried the PX4 software and won't have time to try it for quite a while now. However, from what I can gather from the ETH site, there doesn't seem to be support for a current sensor in their software.

Reply to Discussion


© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service