# Custom power setup

{% hint style="danger" %}
Building a custom power setup comes with an increased risk of damaging Skynode. Skynode warranty is voided by the use of any described power setup on this page. This page serves to inform the knowledeable system integration engineer.
{% endhint %}

### Analog sensing via ADS1115

{% hint style="info" %}
This workaround is supported with AuterionOS 2.5 and later
{% endhint %}

To enable and configure it, keep the `BAT1_SOURCE` value at default (Power Module). Set the parameter `ADC_ADS1115_EN` to 1 and then configure it like a regular [analog voltage/current sensor in PX4](https://docs.px4.io/master/en/config/battery.html). Typically the voltage dividers and amps-per-volt values are given by the power module manufacturer, and the channel mapping depends on your wiring. For example, with a [PM06 from holybro](http://www.holybro.com/product/micro-power-module-pm06/) the following settings would be appropriate

`BAT1_SOURCE = Power Module (default)`\
`ADC_ADS1115_EN = 1`\
reboot (and restart AMC)\
`BAT1_I_CHANNEL = 1`\
`BAT1_V_CHANNEL = 0`\
`BAT1_V_DIV = 18.182`\
`BAT1_A_PER_V = 36.364`\
`BAT1_N_CELLS = 6`

#### Wiring example

<figure><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2FYoIaJPZ37CPLViMvPT5c%2Fimage.png?alt=media&#x26;token=87f4a446-dc68-4a87-b3fd-57ec6f039806" alt=""><figcaption></figcaption></figure>

### CUAV CAN PMU setup

{% hint style="info" %}
This workaround is supported with AuterionOS 2.5 and later
{% endhint %}

The [CAN PMU](https://doc.cuav.net/power-module/can-pmu/en/) from CUAV is a drone power management module that supports input voltage from 6 to 62V and currents up to 110A. It uses advanced CAN bus communication and supports the standard [UAVCAN](https://new.uavcan.org/) protocol.

#### Wiring

The CAN PMU connector has 6 pins:

1. (Red cable) - 5V
2. (Red cable) - 5V
3. (Yellow cable) - CAN P
4. (Blue cable) - CAN N
5. (Black cable) - GND
6. (Black cable) - GND

<figure><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2Fgit-blob-94ef7eb42d88ded07a94936d17d0cc1b3ae4a9f7%2FIMG_8815.jpg?alt=media" alt=""><figcaption><p>CUAV CAN PMU connector wiring</p></figcaption></figure>

Pins 1, 2, 5, 6 can be directly connected to pins 1, 2, 5, 6 of J5 or J6 on Skynode:

<figure><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2F6VuSEJctP33DdhOTYLAU%2Fimage.png?alt=media&#x26;token=537f7e7e-eb45-4f96-a2f7-b5d529ec1578" alt=""><figcaption></figcaption></figure>

Pins 3 and 4 instead needs to be connected respectively to pins 2 and 3 of J14 (CAN1) on the [Pixhawk Adapter Board](https://docs.auterion.com/~/changes/TDRfjBXXgHmxK48cWqay/hardware-integration/skynode/peripherals/adapter-boards):

<figure><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2Fgit-blob-84c56a8f606ed3155f4c0734e43e6dbb39bdd78a%2Fpbb.jpg?alt=media" alt=""><figcaption><p>Pixhawk Adapter Board</p></figcaption></figure>

Once the CAN PMU is connected to Skynode, just set the parameter `UAVCAN_ENABLE` to 2 (Sensors Automatic Config) and reboot.\\

{% hint style="danger" %}
Custom power cables from the CAN PMU connector to J5 or J6 on Skynode could introduce voltage drops. It is highly recommended to cut the cables and solder the wires together.
{% endhint %}
