# DroneCAN Power Module Setup

## CAN Termination Resistor Software Toggle

{% embed url="<https://docs.holybro.com/can-termination-resistance-software-toggle>" fullWidth="false" %}

## Parameter Setup

### Ardupilot

* Connect the Power Module CAN connector to the Flight Controller's CAN1 Port
* &#x20;Change the following parameters:
  * CAN\_P1\_DRIVER=1
  * CAN\_SLCAN\_CPORT=1
  * BATT\_MONITOR=8
  * BATT\_OPTIONS=1
  * Unplug the Power and Restart the Flight Controller

**Optional:** Right-click on MissionPlanner -> User Items -> Check battery temp to display the temperature on the interface.\
![](https://2367252986-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLIgtGDAvVGkCKGOJb1bR%2Fuploads%2Fw8lHT8ueLIBZJAu4b9KZ%2Fimage.png?alt=media\&token=59ea22c8-affc-4d36-8840-a49bd649681d)

### PX4

{% hint style="info" %}
The CAN Power module is supported in version 1.14.0 and newer.
{% endhint %}

* Connect the Power Module CAN connector to Flight Controller's CAN1 Port
* Change the following parameters:
  * UAVCAN\_ENABLE = 2（Default for most FW）
  * UAVCAN\_SUB\_BAT = 2 (filter)
  * BAT1\_SOURCE = External
  * Unplug Power and Restart Flight Controller

You should now see the voltage and current consumed

<figure><img src="https://2367252986-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLIgtGDAvVGkCKGOJb1bR%2Fuploads%2FtOhNlTCvxIilItfXxiIp%2Fimage.png?alt=media&#x26;token=07ef4930-a0f2-4781-b0c7-0180565d6065" alt=""><figcaption></figcaption></figure>

## Calibration

According to the factory default settings, the PM current and voltage detection accuracy is about 5%, which can be improved by fine-tuning the PM parameters.

* Connect the PM to the CAN1 port of the Ardupilot firmware flight controller
* Go to MissionPlanner->SETUP->Optional Hardware->DroneCAN/UAVCAN page, click MAVlink-CAN1, Parameters

<figure><img src="https://2367252986-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLIgtGDAvVGkCKGOJb1bR%2Fuploads%2FcVyJZ7LLxzmZ1dC1pVlx%2Fimage.png?alt=media&#x26;token=719983d8-fd45-402c-a174-ab7095178a4a" alt=""><figcaption></figcaption></figure>

* Adjust the parameters in the following interface
  * BAT\_AMP\_PERVLT parameter
  * BAT\_VOLT\_MULT parameter

<figure><img src="https://2367252986-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLIgtGDAvVGkCKGOJb1bR%2Fuploads%2F19DXKD5Q3EC6DMhPovRP%2Fimage.png?alt=media&#x26;token=9672b497-f78d-44b0-8e48-93588b359414" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If the Voltage/current displayed on MissionPlanner is greater than the value displayed on the regulated power supply, adjust the value down. Otherwise, adjust it up
{% endhint %}

* Click Write Params
* Click Commit Params
* Return to the MissionPlanner DATA page to see if the voltage and current are accurate. If not, repeat above

## CAN MCU Firmware Upgrade

In Mission Planner - DroneCAN/UAVCAN page, select the ID f405\_HolybroPMU, click menu, select Update, and update the firmware online.

{% hint style="info" %}
Please update Mission Planner to the version indicated below(1.3.74) or higher. &#x20;
{% endhint %}

After clicking “Update,” it will ask whether to search for an update from the Internet. Click “Yes”. (Automatically searches for upgrades to the latest stable version firmware).

If you have downloaded the firmware on your local computer, click “No”. (Update local firmware).

<figure><img src="https://2367252986-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLIgtGDAvVGkCKGOJb1bR%2Fuploads%2FSH4pps4LQ0LCYhs9Uca9%2Fimage.png?alt=media&#x26;token=f7cbdc3c-f9ab-4722-a5a1-45d76f912002" alt=""><figcaption></figcaption></figure>

If you have downloaded the firmware on your local computer, click “No” and select the firmware file from your local drive.

<figure><img src="https://2367252986-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLIgtGDAvVGkCKGOJb1bR%2Fuploads%2F7GmczMBr1EuJCkAe61IG%2Fimage.png?alt=media&#x26;token=d15a112b-354e-4f0a-9980-10b957fc1635" alt=""><figcaption></figcaption></figure>

Check the firmware version after the has beenupgrade. After the upgrade, check whether the version is successfully upgraded.

<figure><img src="https://2367252986-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLIgtGDAvVGkCKGOJb1bR%2Fuploads%2Fq7Xj54NMxDFm9oFmcuWz%2Fimage.png?alt=media&#x26;token=a46df9ed-e141-45c9-a7ed-d981de259d17" alt=""><figcaption></figcaption></figure>

If “No update available ” appears when searching updates. Please turn off your firewall in the system settings and try again.

<figure><img src="https://2367252986-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLIgtGDAvVGkCKGOJb1bR%2Fuploads%2FrvVfnBqsvzNdU5NKsKR5%2Fimage.png?alt=media&#x26;token=de28fb7f-1d4d-4680-8c27-8a6bc8dc1385" alt="" width="188"><figcaption></figcaption></figure>
