Problems with PX4 current sensor.

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:

3691051784?profile=originalNow, 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:

3691051743?profile=original

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:

3691051923?profile=original

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?

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

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

    Regards

    Soren

This reply was deleted.

Activity