# CAN Stamp

<figure><img src="https://1886089318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FolH18CdGEWKpuo9G8NHx%2Fuploads%2FpweEBabOwiNxNmuAmOqC%2Fimage.png?alt=media&#x26;token=0164f4a0-0971-4d9a-a563-3efd0d51feb2" alt="" width="375"><figcaption></figcaption></figure>

The stamp is based on the STM32L431 IC and contains a CAN Transceiver, Power Regulation and a 120 Ohm CAN termination resistor. Just give it 5v & CAN and you are away!

Features:

* STM32L431
* 17.8x18.9mm
* TJA1051
* 1 Amp 3.3v LDO
* Input Fuse and Diode
* 120 ohm Termination Resistor
* Fully compatible with Ardupilot and Px4 Firmware

## General Overview

The general stamp Architecture:

<figure><img src="https://1886089318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FolH18CdGEWKpuo9G8NHx%2Fuploads%2FE6CxeyqdGx9xGEZisykO%2FGeneral%20Overview.png?alt=media&#x26;token=9082a5b5-05e5-4ea5-8342-55ef9fc62587" alt=""><figcaption></figcaption></figure>

## Power Domain

<figure><img src="https://1886089318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FolH18CdGEWKpuo9G8NHx%2Fuploads%2FkC41RIpECZGdhZVri6UO%2FPower%20Domain.png?alt=media&#x26;token=313e2dc0-629b-4c3e-9229-df6d145a82da" alt=""><figcaption></figcaption></figure>

The stamp takes 5v in from the FC and regulates that down to 3.3v with an onboard 1 Amp LDO to power the L431.

Drone CAN specifies that all modules on the CAN Bus have their own input Diode and 1 Amp fuse. For ease of integration they are included on the stamp and are broken out to edge pads. This gives edge pads as follows:

* 5v In Pad (From FC)
* *Goes through fuse and diode*
* 5v Out Pad (Fused for any 5v sensors)
* *Fused 5v goes to 3v3 LDO internally and powers L431*
* Fused 3.3v Out Pad (Fused for any 3v3 sensors)

## CAN Interface

<figure><img src="https://1886089318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FolH18CdGEWKpuo9G8NHx%2Fuploads%2FZ3cH2O2nEiopFe3kuJPz%2FCan%20Interface.png?alt=media&#x26;token=3ef4a638-0e57-4799-966e-b04b3dc74df7" alt=""><figcaption></figcaption></figure>

The CAN Interface goes between the L431 and the main bus and converts the logic from the L431 into differential signalling using a CAN transceiver.

The L431 is connected to the Transceiver using pins PB8 & PB9 and exits the stamp using Edge Pad 8&9.

CAN Bus stipulates the the device on each end of the bus should have a 120 ohm termination resistor between CAN High & CAN Low. The stamp contains this resistor but by default it is ***NOT*** connected. To connect it please connect Stamp Edge Pad 10 with CAN Low (Edge Pad 9) on your PCB.

## L431 Pinout and Useable Pins

<figure><img src="https://1886089318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FolH18CdGEWKpuo9G8NHx%2Fuploads%2FxgBBlPu00GLwbyFGAxFy%2FGeneral%20Pinout.png?alt=media&#x26;token=a885f07c-6d38-4437-91d6-65937cdb6374" alt=""><figcaption></figcaption></figure>

Some of the pins from the L431 are used on the stamp and are not broken out, these are:

* PB8 - CANRx
* PB9 - CANTx
* PB3 - LED

Others *are* broken out but are preferred to be unused (SWD Programming Pins, also connected to the pads on the bottom of the PCB)

* PA13 - SWDIO
* PA14 - SWDCLK

The rest are available for use (if they are supported by ardupilot):

* PC13
* PC13
* PC15
* PA0
* PA1
* PA2
* PA3
* PA4
* PA5
* PA6
* PA7
* PA8
* PA9
* PA10
* PA11
* PA12
* PA13 - SWDIO
* PA14 - SWDIO CLK
* PA15
* PB0
* PB1
* PB2
* ~~PB3 LED~~
* PB4
* PB5
* PB6
* PB7
* ~~PB8 CAN~~
* ~~PB9 CAN~~
* PB10
* PB11
* PB12
* PB13
* PB14
* PB15
