# Wiring Skynode to the Vehicle

## Wiring sensors and actuators

In order to connect sensors and actuators to Skynode, it is suggested to use the Pixhawk Adapter Boards (Refer to the image below).

### How to connect the interface boards

![Pixhawk Adapter Boards](https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2Fgit-blob-2d820c5e99fe67b480b5730618854c435db5315b%2Fppa_board_interface.jpg?alt=media)

1. **Disconnect** Skynode from power
2. Connect the Skynode Primary interface (J4) and the Pixhawk Adapter Board (J11) using a Straight Molex PicoClasp 40-pin interface cable

   <div align="left"><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2Fgit-blob-644b4482f2ccfcc981a8654b8724a77da361069a%2Fskynode_interfaces_primary_j4.jpg?alt=media" alt="" width="375"></div>
3. Connect the Skynode Secondary interface (J3) and the Pixhawk Adapter Board (J21) using a Straight Molex PicoClasp 40-pin interface cable

<div align="left"><figure><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2Fgit-blob-b0a0f52f1eccf7ead9519ef61db7925e1a09387e%2Fskynode_interface_secondary_j3.jpg?alt=media" alt="" width="375"><figcaption></figcaption></figure></div>

### How to connect sensors

When using the sensors delivered with the Skynode Evaluation Kit, it is possible to follow in depth guides on how to set them up, configure and test their correct functioning from the [Sensors included in the Kit](https://docs.auterion.com/hardware-integration/skynode/evaluation-kit/sensors) page.

If you are integrating other sensors please refer to the [Pixhawk Adapter Board](https://docs.auterion.com/hardware-integration/skynode/peripherals/adapter-boards) reference page to connect them to the proper input peripheral.

### How to connect actuators

Actuators are generally connected to the (J15) and (J25) Pin Headers present on the Pixhawk Adapter Board. Be aware of the naming convention used for this: MAIN channels on (J25) and AUX channels on (J15).

{% hint style="warning" %}
**MAIN** outputs in the PX4 documentation are run over the **IO** which is wired over the **SECONDARY** breakout board

**AUX** outputs in the PX4 documentation are run over the **FMU** which is wired over the **PRIMARY** breakout board
{% endhint %}

The number of actuators and their function depends on the Airframe Configuration.

If you are using an airframe present on the [PX4 Airframes reference](https://docs.px4.io/main/en/airframes/airframe_reference.html) you have to make sure to assign the actuators to the right AUX or MAIN channel before you will be able to start testing and using them. If this is not the case you will need to create your own Airframe Configuration File as explained in [Creating Airframe Configurations for APX4](https://docs.auterion.com/hardware-integration/hardware-integration/airframe-setup-in-software).

1. Go to the [PX4 Airframe reference](https://docs.px4.io/main/en/airframes/airframe_reference.html) and look for the Generic Quadcopter Airframe Reference.
2. Check and note down the SYS\_AUTOSTART parameter related to the desired Airframe.\
   For this example SYS\_AUTOSTART = 4001 (as shown in the figure below).\
   The number and type of actuators needed for this airframe are also visible from the image and/or the Common Output section.\
   For this example: 4 motors (Motor1-4).

<figure><img src="https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2Fgit-blob-fe2d77b46f8bec0a12f3503ab621fbfb0cebed53%2FQuadrotorXConfig.png?alt=media" alt="" width="528"><figcaption></figcaption></figure>

3. Wire the ESCs and Servos cables to the AUX or MAIN channels of the Pixhawk Adapter Board and note down which actuators corresponds to which channel.\
   E.g. for the Generic Quadcopter wire the ESCs for motors 1-4 to the AUX channels 1-4.

{% hint style="warning" %}
Be aware that the Pin Headers (J15 and J25) are not powered by Skynode. Skynode is only sending the signal out of the IO(J25) or FMU(J15) pins.\
This means, that you will need to connect the required power supply to the VDD and GND pins, if this is required by the actuators used.\
Normally ESCs are connected to Battery via the Skynode Power Module.\
On the other hand, servos normally need an external power supply.
{% endhint %}

## Mounting Skynode on the vehicle

It is recommended to mechanically mount Skynode on the vehicle before starting with bench testing.\
General requirements and recommendations regarding Skynode mounting are covered in the "Installation" section of the [Skynode Data Sheet](https://docs.auterion.com/hardware-integration/skynode/skynode-x-gx#datasheet).

These cover:

* Recommended Skynode mounting orientation (see mounting note below)
* Considerations for Antenna placement (regulatory)
* General recommendations for reducing electromagnetic interference (separation of GPS and Skynode, keep-out zones for ESC wiring, USB wiring etc.).

The data sheet also contains information about the power architecture and other supported peripherals.

{% hint style="success" %}
**Mounting note:**\
The flight direction of Skynode is indicated by the Auterion "A" on the enclosure.
{% endhint %}
