How-to guide: Pixhawk with 6S batteries (> 4S)


1. Introduction:

Pixhawk 3DR kit is delivered by default with a 4S maximum power module. For those wanting to use 5S or 6S or higher voltage batteries there is currently, to my best knowledge, no “how-to” guide for the Pixhawk board. I therefore decided to document it for others who might need it too.

For those who would like the same “how-to guide” for APM 2.x , here is a link I wrote a while ago:

Pixhawk comes standard with three (redundant) ways to powered it up:

1-USB : not used to fly obviously; just useful on the ground for connection on a ground station software.

2-The power module port accepting a maximum input voltage of 5.7volts (and will not get destroyed up to 20 Volts input)

3-The RC input pins. Will accept a maximum voltage of 5.7volts also (and is also protected up to 20 Volts)

This guide assumes a use of Pixhawk’s power module port which provides not only a way to power the board but also the pins to measure current and voltage values of the main battery.

This guide assumes a use of a 6S battery in combination with a Attopilot current & Voltage sensor board. This Attopilot “power module” replaces the 3DR 4S limited power module. The Attopilot board comes in three flavors: 45 amps, 90 amps or 180 amps.

3689573992?profile=originalThe choice of the right Attopilot board (45A, 90A or 180 A) will depend on your motor/props combination: take the Attopilot version that has the smallest amps capacity above your max multicopter current consumption. However we will introduce in this guide a way to use the 90 amps Attopilot board to measure up to 150 amps, still using Pixhawk’s power module port.


2. Attopilot description:

An Attopilot board provides three wire soldering pads to solder : a current measurement wire, a voltage measurement wire and a ground wire. See picture below:


Attopilot 90A support up to 50Volts for a maximum of 90A. However the resistor specifications exceed the 90A limitation which makes it possible to use it for measuring 150 amps (we will take this as a assumed max current as our example for the rest of the explanation).

The datasheet of Attopilot specifies that the Voltage measurement wire outputs an analog voltage of 63,69 milliVolt per Volt. Similarly the current measurement wire outputs an analog voltage of 36,60 milliVolt per Volt.

So for a 6S battery the maximum analog voltage values will be:

-For voltage measurement: [min 0V -  max 1.6V]

-For current measurement: [min 0V – max 3,3 V]


3. Pixhawk power port description (pinout):


Reusing the excellent pixhawk infographics published in the wiki, the image shows circled in yellow where the power port is on the pixhawk board.

The power port is a so-called DF13 connector with 6 pins.

The six pins of this connector are assigned in the following order, starting by the red wire on the leftmost pin:

Power Port Pinout Description:

  • 1- Vcc (5V input)
  • 2- Vcc (5V input)
  • 3- I (Battery current measurement analog voltage input)
  • 4- V (Battery voltage measurement analog voltage input)
  • 5- Ground
  • 6- Ground


4. Wiring Case 1 : to measure up to a maximum of 90 amps

The connections between Attopilot and Pixhawk are shown in the illustration below:


We have added an optional BEC in the illustration that would be connected to the Vcc and Ground wires of the power module. It is optional as Pixhawk could alternatively be powered via the RC inputs.

4. Wiring Case 2 : to measure up to a maximum of 150 amps

The connections between Attopilot and Pixhawk will integrate resistors to be able to measure up to 150 amps.

Indeed the ADC of this power port on Pixhawk has a range of 0-3.3V. This means that for the maximum true current of 150 amps, we want the current analog wire of Attopilot to output maximum 3.3Volts (as it is the case in case1 for 90 amps max without additional resistors).

Note : this part has been updated with a resistor scheme simplification (only one resistor to add in parallel rather than the originally classical R1, R2 resistors divider) thanks to a contribution of Bo, a diydrones member who analyzed in depth the Attopilot circuitry.

So we will build a small resistors divider on wire 3 (current measurement) & wire 5 or 6 (Ground) as follows:


The Attopilot current measurement output masks a circuit that contains an existing output resistor called Rl. According to the Attopilot datasheet, the following equation links to measured current I (called MeasuredCurrent in the equation), the output analog voltage for current measurement Vout, and an existing Rs resistor in Attopilot:


 What we want is to get Vout = 3,3 when Current =150 amps. To do this we will add a new external resisto (Rx) in parallel with the existing Attopilot Rl resistor, so that the new resulting Rl resistor (called Rl’) must be (knowing that Rs = 0.5Mohm as per Attopilot specs):


Therefore we can calculate the Rx resistor value we need to add in parallel as follows:


So, Rx must be ~ 110kohm to have a Vout at 3.3V when the measured current is 150 amps.

You can choose another max amp output (but I would not advise higher than 150 amps with the 90 amps Attopilot, otherwise use the 180 amps version instead) and calculate the resulting Rx resistor

As a result, when the current is 150amps, Vout will have value of 3.3Volts.


5. Mission planner / parameters configuration in battery monitor screen:

In the battery monitor parameters screen, you can manually select which current and voltage sensor you are using. In the present case, you will select the power module and modify the following parameters to make the mission planner voltage and current display match the real values (measured using a wattmeter for example). The explanation below is an extract from the Arducopter parameters list.

Battery monitoring (BATT_MONITOR)

Controls enabling monitoring of the battery’s voltage and current






Voltage Only


Voltage and Current

Battery Voltage sensing pin (BATT_VOLT_PIN)

Setting this to 0 ~ 13 will enable battery current sensing on pins A0 ~ A13. For the 3DR power brick on APM2.5 it should be set to 13. On the PX4 it should be set to 100. On the Pixhawk powered from the PM connector it should be set to 2.















Battery Current sensing pin (BATT_CURR_PIN)

Setting this to 0 ~ 13 will enable battery current sensing on pins A0 ~ A13. For the 3DR power brick on APM2.5 it should be set to 12. On the PX4 it should be set to 101. On the Pixhawk powered from the PM connector it should be set to 3.















Voltage Multiplier (BATT_VOLT_MULT)

Used to convert the voltage of the voltage sensing pin (BATT_VOLT_PIN) to the actual battery’s voltage (pin_voltage * VOLT_MULT). For the 3DR Power brick on APM2 or Pixhawk, this should be set to 10.1. For the Pixhawk with the 3DR 4in1 ESC this should be 12.02. For the PX4 using the PX4IO power supply this should be set to 1.

This is a parameter to adjust to match the real Voltage value with the displayed mission planner value.

Amps per volt (BATT_AMP_PERVOLT)

Number of amps that a 1V reading on the current sensor corresponds to. On the APM2 or Pixhawk using the 3DR Power brick this should be set to 17. For the Pixhawk with the 3DR 4in1 ESC this should be 17. Units: A/V.

This is a parameter to adjust to match the real Voltage value with the displayed mission planner value.

There you go! I hope this will help you configure your pixhawk with higher than 4S batteries.



E-mail me when people leave their comments –

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

Join diydrones


  • Developer
    @Colin: that is just a Voltage and Current sensor, not a power module with regulator. Its mislabeled on the RCTimer Store. Beware!
  • 3701706453?profile=original

    Looks like RCTimer has been watching.

  • well, you can do a resistor divider to one of the pins on the APM..... this is essentially what apm power module does.... the equation is in the post... or in the thread body. sorry cannot point out, I'm on the phone. 

  • I suppose. I still need to measure voltage. I could use the Attopilot 180 to measure voltage and a hall effect sensor to measure current. It seems like a waste though. We actually already have an Eagletree eLogger measuring current and voltage and logging it for later (also available as telemetry to our Futaba transmitter), but unfortunately Eagle Tree has only released APIs for Windows and our onboard computer is Linux based. Some people have used a Windows VM on Linux to solve the problem, but that's a little heavy weight for our little embedded computer. I'll keep noodling around for other possible solutions. 

  • check hall effect sensors discussed earlier in this thread

  • In our helicopter we are running between 600 and 720 watts using 2 6S LiPos. That means we are running at 45V but only pulling around 14.5A. Unfortunately none of the Attopilot sensors will handle those ranges. I would need to go to the 180 to get the voltage range I need but then would not have enough sensitivity at the low end to be measuring amps accurately. Any suggestions?

  • MR60

    Ok, Thx Emin for the explanation.

  • Huges;

    #With the version with 4 mm or 5.5 mm and 6mm gold plated plug, and also the version with the silicon cable, only the positive terminal of battery and controller are connect directly to the UniSens-E. For the negative pole there is a short silicone cable. This separate negative pole only needs to be connected to the negative pole of the battery when the speed controller is equipped with an opto-coupler. Then the UniSens-E is missing the ground reference needed for measurement. With BEC regulators, the cable should be insulated with shrink tubing and just remain free.

    The UniSens-E with a 5.5 mm or 6mm gold plated plug, and also the version with the silicon cable, does not have a plug on the single negative cable. Here a small connector should be attached with which the connection is made to the negative terminals of the battery. Well proven here is a 2 mm gold plated plug.#

  • also,not long ago it was possible to use graupner telemetry with px4(not Pixhawk)

    it was possible on APM2.X as well

    and also there is interesting conversation or maybe problem solved on Github

    all this is a bit beyond my knowledge or I am just lazy and would like step by step instructions

  • can use any of this RX/TX

    In accordance with our philosophy to support many systems, the UniSens-E also speaks the language of

    Jeti Duplex (EX),

    Multiplex M-Link

    Graupner/SJ HoTT

    Robbe/Futaba FASSTest S.BUS2



    measuring according to connectors

    3. Technical Data

    Current range: 140 A in both directions, ie – 140A to + 140 A

    Following durations are allowed:

    - 100 A unlimited

    - 120 A for 1 minute

    - 140 A for 20 seconds

    Depending on the plug-in system, but the limitations of the plug are much lower!

    Reasonable values are as follows:

    - MPX green (double contact) and XT60 Continuous: 50 A / 20 s: 70 A

    - 4 mm gold plated plug Continuous: 80 A / 20 s: 100 A

    - 5.5 mm gold plug Continuous: 120 A / 20 s: 150 A

    - 6.0 mm LMT gold plug Continuous: 120 A / 20 s: 150 A

    Voltage Range: 0 to 60 V

    Altitude range: 0 to 8000 m above sea level, automatically zeroed at switch on

    Receiver Voltage measurement: 3.8 V to 10 V

    Data Rate: 10 Hz

    Power supply: from receiver supply via the telemetry connection (from 3.8 V to maximum 10 V)

    Power consumption: 25 mA from the receiver supply

    External Connectors: 1 x connector for telemetry and power ("Link")

    1 x phase connection for the brushless rpm measurement

    1 x Servo signal input from the receiver

    COM port for UniDisplay, GPS logger or PC

    Dimensions: green MPX connector: 26 (38) x 29 x 9 mm Yellow XT60 connector: 26 (50) x 29 x 9 mm 4mm gold connectors: 26 (55) x 22 x 9 mm 5.5 mm gold connectors: 26 (44) x 22 x 11 mm

    6.0 mm LMT gold connectors: 26 (44) x 22 x 11 mm

    Weight: 10 g - 14 g without cable (depending on connection), cable 4g

    detail informations can be found in English translation of manual. yes,its similar to attopilot 180A

This reply was deleted.