> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://docs.fysetc.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# FYSETC-SPIDER-KING

# FYSETC-SPIDER-KING

## 1. Product introduction

10 axis industrial grade 3D printer motherboard

![](https://raw.githubusercontent.com/FYSETC/wiki.fysetc/main/docs/images/crisp/SpiderKing.jpg "=800xauto")

### 1.1 Advantage

1. Replaceable control core:
   It has a replaceable control core(Named 'King' core).You can freely choose between 4xRP2040(King-R) / STM32F446(King-446) / STM32F407(King-407) / STM32H7XX(King-H7xx), and even you can make your own control core(We will open source the interface).

2. Intelligent identification of stepper driver type:
   With an additional MCU, Spider-King can identify the driver type and switch the SPI/UART channel automatically.
   This feature save you time on searching doc of how to set the jumppers, keep you away from borning setting jumppers. No longer has problems with stepper driver setting. (If you want to use this feature, you need our new stepper driver)

3. Multiple firmware support:
   It supports multiple firmwares.You can choose to use Klipper / Marlin 2.0 / Reprap Firmware / GRBL and other firmware according to your preferences and needs.

4. Industrial-grade standard design, 5000V full IO isolation:
   It provides a more secure hardware base: equiped with onboard high-power isolated power supply, and the control core is isolated from all high-voltage peripherals, including stepper motor drive, MOSFET output, high-voltage input signal, CAN bus, etc.

5. 10 way stepper motor drive support:
   Onboard 10 way stepping motor drive socket, 6x 3A max (maximum 35V), 4x 6A max (maximum 55V). Any socket supports SPI / UART / standalone mode.It has a new 6A drive design. It can drive 57 or even 86 step motors without external drive;

6. A variety of communication interfaces support:
   It supports onboard 5000V isolated CAN interface, supports wireless WI-FI interface, supports ESP32 high-speed communication module, supports multiple connection to Raspberry Pi, including UART, SPI and USB.

7. Centralized heat dissipation of heat-generating components:
   We centralized most heating components like 5V power supply, stepper driver in the middle area of the board, this area can be covered with the 12CM fan for cooling. You don't need to rack your brains to design the air duct, you can get better and more stable output performance.

8. Compatible with RRF firmware standard socket design:
   The socket layout is set according to Duet wiring and layout, which is more convenient to use the RRF. And more, we adds two DUET type fan ports which have feedback signal.

9. All Solid Capacitors: Power Section：
   It can provide more stable power supply and higher efficiency.

10. Compact Design:
    It has a very small size of 177mm\*108mm, realizes multiple MOSFET outputs, and supports up to 10 stepper drivers.

## 2. Hardware Guide

### 2.1 Pin definition

| Features | Spider Pin | STM32 Pin | Pin No. | Comment |
| ---- |
| X-MOTOR(1) | X-Step | PG7 | 92 |  |
| X-MOTOR(1) | X-DIR | PG6 | 91 |  |
| X-MOTOR(1) | X-EN | PE11 | 64 |  |
| X-MOTOR(1) | X-CS/PDN | PD2 | 116 |  |
| X2-MOTOR(2) | X2-Step | PD11 | 80 |  |
| X2-MOTOR(2) | X2-DIR | PD10 | 79 |  |
| X2-MOTOR(2) | X2-EN | PG10 | 125 |  |
| X2-MOTOR(2) | X2-CS/PDN | PE15 | 68 |  |
| Y-MOTOR(3) | Y-Step | PG14 | 129 |  |
| Y-MOTOR(3) | Y-DIR | PG12 | 127 |  |
| Y-MOTOR(3) | Y-EN | PG15 | 132 |  |
| Y-MOTOR(3) | Y-CS/PDN | PD8 | 77 |  |
| Z-MOTOR(4) | Z-Step | PD4 | 118 |  |
| Z-MOTOR(4) | Z-DIR | PD6 | 122 |  |
| Z-MOTOR(4) | Z-EN | PD5 | 119 |  |
| Z-MOTOR(4) | Z-CS/PDN | PD7 | 123 |  |
| Z2-MOTOR(5) | Z2-Step | PE5 | 4 |  |
| Z2-MOTOR(5) | Z2-DIR | PC13 | 7 |  |
| Z2-MOTOR(5) | Z2-EN | PE6 | 5 |  |
| Z2-MOTOR(5) | Z2-CS/PDN | PC14 | 8 |  |
| E0-MOTOR(6) | E0-Step | PE3 | 2 |  |
| E0-MOTOR(6) | E0-DIR | PE4 | 3 |  |
| E0-MOTOR(6) | E0-EN | PE2 | 1 |  |
| E0-MOTOR(6) | E0-CS/PDN | PC15 | 9 |  |
| E1-MOTOR(7) | E1-Step | PG13 | 128 |  |
| E1-MOTOR(7) | E1-DIR | PG8 | 93 |  |
| E1-MOTOR(7) | E1-EN | PG9 | 124 |  |
| E1-MOTOR(7) | E1-CS/PDN | PG3 | 88 |  |
| E2-MOTO( 8 ) | E2-Step | PE1 | 142 |  |
| E2-MOTOR( 8 ) | E2-DIR | PE0 | 141 |  |
| E2-MOTOR( 8 ) | E2-EN | PB2 | 48 |  |
| E2-MOTOR( 8 ) | E2-CS/PDN | PD9 | 78 |  |
| E3-MOTOR(9) | E3-Step | PF4 | 14 |  |
| E3-MOTOR(9) | E3-DIR | PF3 | 13 |  |
| E3-MOTOR(9) | E3-EN | PF2 | 12 |  |
| E3-MOTOR(9) | E3-CS/PDN | PF5 | 15 |  |
| E4-MOTOR(10) | E4-Step | PF15 | 55 |  |
| E4-MOTOR(10) | E4-DIR | PG0 | 56 |  |
| E4-MOTOR(10) | E4-EN | PG5 | 90 |  |
| E4-MOTOR(10) | E4-CS/PDN | PG11 | 126 |  |
| TMC Driver SPI (SOFT) | MOSI | PE14 | 67 |  |
| TMC Driver SPI (SOFT) | MISO | PE13 | 66 |  |
| TMC Driver SPI (SOFT) | SCK | PE12 | 65 |  |
| End-stops | X-MIN | PC5 | 45 |  |
| End-stops | X-MAX | PB5 | 135 |  |
| End-stops | Y-MIN | PC4 | 44 |  |
| End-stops | Y-MAX | PF13 | 53 |  |
| End-stops | Z-MIN | PB6 | 136 |  |
| End-stops | Z-MAX | PF14 | 54 |  |
| End-stops | Probe | PA0 | 34 |  |
| DIAG | DIAG-1 | PF6 | 18 |  |
| DIAG | DIAG-2 | PF7 | 19 |  |
| DIAG | DIAG-3 | PF8 | 20 |  |
| DIAG | DIAG-4 | PF11 | 49 |  |
| DIAG | DIAG-5 | PF12 | 50 |  |
| DIAG | DIAG-6 | PA14/SWCLK | 109 |  |
| DIAG | DIAG-7 | PA13/SWDIO | 105 |  |
| FAN/RGB | FAN0 | PWM-(PE8) | 59 |  |
| FAN/RGB | FAN0 | TACHO-(PB1) | 47 |  |
| FAN/RGB | FAN1 | PWM-(PE9) | 60 |  |
| FAN/RGB | FAN1 | TACHO-(PB7) | 137 |  |
| FAN/RGB | FAN2 | PD15 | 86 |  |
| FAN/RGB | FAN3 | PD12 | 81 |  |
| FAN/RGB | FAN4 | PD14 | 85 |  |
| FAN/RGB | 5V-LED(WS2812) | PD3 | 117 | Share with Debug Led |
| Heating | E0-Heater | PB4 | 134 |  |
| Heating | E1-Heater | PB0 | 46 |  |
| Heating | E2-Heater | PD13 | 82 |  |
| Heating | E3-Heater | PC8 | 98 |  |
| Heating | E4-Heater | PA15 | 110 |  |
| Heating | Heated-Bed | PE10 | 63 |  |
| Temperature | TE0（THERM0） | PC1 | 27 | A 4.7kOhm 0.1% temperature sensor pull up resistor is used,PT1000 can be connected directly. For PT100, an amplifier board must be used. |
| Temperature | TE1（THERM1） | PF9 | 21 | Same as TE0. |
| Temperature | TE2（THERM2） | PC3 | 29 | Same as TE0. |
| Temperature | TE3（THERM3） | PC2 | 28 | Same as TE0. |
| Temperature | TE4（THERM4） | PC0 | 26 | Same as TE0. |
| Temperature | TB（THERM5） | PF10 | 22 | Same as TE0. |
| CAN | TX | PB9/SDA1/CAN\_TX | 140 |  |
| CAN | RX | PB8/SCL1/CAN\_RX | 139 |  |
| EXP1 | LCD\_D7 | PE7 | 58 |  |
| EXP1 | LCD\_D6 | PG4 | 81 |  |
| EXP1 | LCD\_D5 | PC11/MISO3/RX3/4 | 112 |  |
| EXP1 | LCD\_D4 | PC10/SCK3/TX3/4 | 111 |  |
| EXP1 | LCD\_EN | PC12/MOSI3/TX5/SDA2 | 113 |  |
| EXP1 | LCD\_RS | PD0/CAN-RX1 | 114 |  |
| EXP1 | ENC\_C | PA8/SCL3 | 100 |  |
| EXP1 | BEEP | PC9/SDA3 | 99 |  |
| EXP2 | RESET | NRST | 25 |  |
| EXP2 | ENC\_A | PC6/TX6 | 96 |  |
| EXP2 | ENC\_B | PC7/RX6 | 97 |  |
| EXP2 | SD-DET | PB10/SCL2 | 69 |  |
| EXP2 | SD-MISO | PA6/MISO1 | 42 |  |
| EXP2 | SD-MOSI | PA7/MOSI1 | 43 |  |
| EXP2 | SCK | PA5/SCK1 | 41 |  |
| EXP2 | CS | PA4/CS1 | 40 |  |
| EXP3 | SD-DET | PB10/SCL2 | 69 |  |
| EXP3 | SD-MISO | PA6/MISO1 | 42 |  |
| EXP3 | SD-MOSI | PA7/MOSI1 | 43 |  |
| EXP3 | SCK | PA5/SCK1 | 41 |  |
| EXP3 | CS | PA4/CS1 | 40 |  |
| EXP3 | TX | PA2/TX2 | 36 |  |
| EXP3 | RX | PA3/RX2 | 37 |  |
| EEPROM(4K) I2C Pin-Out | SCL | PF1/SCL2 | 11 | Connect to 24LC32(4K EEPROM) |
| EEPROM(4K) I2C Pin-Out | SDA | PF0/SDA2 | 10 | Connect to 24LC32(4K EEPROM) |
| Raspberry Pi | TX | PA10/RX1 | 102 |  |
| Raspberry Pi | RX | PA9/TX1 | 101 |  |
| Raspberry Pi | MOSI | PB15 | 76 |  |
| Raspberry Pi | MISO | PB14 | 75 |  |
| Raspberry Pi | SCK | PB13 | 74 |  |
| Raspberry Pi | CS | PB12 | 73 |  |
| Raspberry Pi | DATA\_RDY | PB11 | 70 |  |
| SWD Debug | SWDIO | PA13 | 105 | only used for debugging now and can be used for other purposes. |
| SWD Debug | SWCLK | PA14 | 109 | only used for debugging now and can be used for other purposes. |

### 2.2 Pinout diagram

![](https://raw.githubusercontent.com/FYSETC/wiki.fysetc/main/docs/images/crisp/SpiderKing_V1.0_Pinout.jpg "=800xauto")

If the pic is not clear enough, please check the .pdf and .svg file on our [github](https://github.com/FYSETC/FYSETC-SPIDER-KING/blob/main/Spider_King_V1.0_Pinout.pdf) or  [国内](http://git.t.ecoaas.com/FYSETC/FYSETC-SPIDER-KING/blob/main/Spider_King_V1.0_Pinout.pdf).

### 2.3 Endstop voltage selection

![](https://raw.githubusercontent.com/FYSETC/wiki.fysetc/main/docs/images/crisp/EndstopVol.jpg "=800xauto")

### 2.4 Stepper drivers guide

![](https://raw.githubusercontent.com/FYSETC/wiki.fysetc/main/docs/images/crisp/StepperDriver-SPI-UART.jpg "=800xauto")

Check the clear picture on our [GitHub](https://github.com/FYSETC/FYSETC-SPIDER-KING/blob/main/https://raw.githubusercontent.com/FYSETC/wiki.fysetc/main/docs/images/crisp/StepperDriver-SPI-UART.jpg) or [国内](http://git.t.ecoaas.com/FYSETC/FYSETC-SPIDER-KING/blob/main/https://raw.githubusercontent.com/FYSETC/wiki.fysetc/main/docs/images/crisp/StepperDriver-SPI-UART.jpg).

#### 2.4.1 Big5160 install

![](https://raw.githubusercontent.com/FYSETC/wiki.fysetc/main/docs/images/crisp/SpiderKing_Big5160.jpg "=800xauto")

## 3. OS Guide

### 3.1 SAMFi-OS

Check details on [github](https://github.com/FYSETC/FYSETC-SAMFi-OS) or [国内]([FYSETC/FYSETC-SAMFi-OS - FYSETC-SAMFi-OS - Ecoaas Git](http://git.t.ecoaas.com/FYSETC/FYSETC-SAMFi-OS)).

### 3.2 MainsailOS

Check details [here](https://docs.mainsail.xyz/setup/mainsail-os).

### 3.3 Fluidd

Check details [here](https://docs.fluidd.xyz/).

### 3.4 OctoPi

Check details [here](https://octoprint.org/download/).

## 4. Firmware Guide

Spider-King support Marlin firmware, Klipper firmware and RRF firmware. Choose one you need.

### 4.1 Marlin

#### 4.1.1 Download Vscode + platformio

To compile the firmware , you need to install Visual Studio Code and the platformio pulg-in. More Marlin firmware details, please visit Marlin firmware official website [here](https://marlinfw.org/).

#### 4.1.2 Download firmware

The Marlin firmware is in the `firmware/Marlin` folder in git repository [GitHub](https://github.com/FYSETC/FYSETC-SPIDER-KING/tree/main/firmware/Marlin) or [国内](http://git.t.ecoaas.com/FYSETC/FYSETC-SPIDER-KING/tree/main/firmware/Marlin), you can also get the firmware from latest [Marlin bugfix-2.1.x branch](https://github.com/MarlinFirmware/Marlin/tree/bugfix-2.1.x). 

Step 1: you need to enable following define in `configuration.h` file.

```
#define MOTHERBOARD BOARD_FYSETC_SPIDER_KING407
#define SERIAL_PORT -1
```

Step 2: then we need to change `platformio.ini` file

`default_envs = FYSETC_SPIDER_KING407`

#### 4.1.3 Compile the firmware

Open Vscode and open platformio main page and click the "Open Project" button , and direct to the folder where you put your firmware.

If everything goes fine , at the bottom you can see several buttons

The check mark button is for compiling , click it to compile. You can find built `firmware.bin` at `.pio\build\FYSETC_SPIDER_KING407 folder.`

#### 4.1.4 Upload firmware

Follow Firmware Update guide [here](#jump0).

### 4.2 Klipper

We put Klipper related files like `printer.cfg` in `firmware/Klipper` folder in github repo.

If you want to use Klipper. You need to follow the Klipper [installation guide](https://www.klipper3d.org/Installation.html) to install [Klipper](https://github.com/KevinOConnor/klipper) first. When we try to compile it, we need to call `make menuconfig` to choose compile options, please select options for Spider King as below describe.

#### 4.2.1 menuconfig

Please choose these options for Spider King, you need to decide which to choose according to your board and wiring on some options.

* ##### Enable `extra low-level configuration options`

* ##### Micro-controller Architecture

Select `STMicroelectronics STM32`

* ##### Processor model

Select `STM32F407`

* ##### Clock reference

Select `8 MHz crystal`

* ##### Bootloader offset

Choose `32kiB bootloader`. 

*Note: If your bootloader crashed, you need to follow the `5.Bootloader Guide`  character to flash the spider king bootloader.*

* ##### Communication interface

You have two choices here, if you use USB cable to connect RaspeberryPI and Spider King, you need to follow `1. USB (on PA11/PA12)` below. If you use serial to connect RaspberryPI and Spider King, then check `2. Serial (on USART1 PA10/PA9)`.

* ###### 1. USB (on PA11/PA12)

If you want to connect Spider King to RaspberryPI with USB cable. You need to select `USB (on PA11/PA12)`

![](https://raw.githubusercontent.com/FYSETC/wiki.fysetc/main/docs/images/crisp/6a5e13f9b3ea4.png"=800xauto")

And in `printer.cfg` file, you need to set the `serial` as below. We provide an example cfg file `printer.cfg` for VORON 2 machine [here](https://github.com/FYSETC/FYSETC-SPIDER-KING/tree/main/firmware/Klipper) or [国内](http://git.t.ecoaas.com/FYSETC/FYSETC-SPIDER-KING/blob/main/firmware/Klipper/printer.cfg).

```
Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify
##--------------------------------------------------------------------
serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_230032000851363131363530-if00
```

* ###### 2. Serial (on USART1 PA10/PA9)

If you want to connect Spider King UART1(RX1:PA10, TX1:PA9) port to RPI uart0(TX:GPIO14,RX:GPIO15) port, you need to select `Serial (on USART1 PA10/PA9)`

![](https://raw.githubusercontent.com/FYSETC/wiki.fysetc/main/docs/images/crisp/6a5e144a1117d.png)

In `printer.cfg` file, you need to uncomment the following line as our example `printer.cfg` file here ([github](https://github.com/FYSETC/FYSETC-SPIDER-KING/tree/main/firmware/Klipper) [国内](http://git.t.ecoaas.com/FYSETC/FYSETC-SPIDER-KING/blob/main/firmware/Klipper/printer.cfg)) do, if your cfg file don't have this line, please add it.

```
serial: /dev/ttyAMA0
```

Besides this make option, you still need to follow the instructions in ``` Connect RPI ``uart.md ``` file, you can find the file [github](https://github.com/FYSETC/FYSETC-SPIDER/blob/main/firmware/Klipper/Connect%20RPI%20uart.md) [国内](http://git.t.ecoaas.com/FYSETC/FYSETC-SPIDER-KING/blob/main/firmware/Klipper/Connect%20RPI%20uart.md).

#### 4.2.2 Compile firmware

```
make
```

#### 4.2.3 Upload firmware

Follow Firmware Update guide [here](#jump0).

### 4.3 RRF

Spider King is originally supported by teamgloomy‘s RRF firmware from version 3.4.2rc2 [Releases · gloomyandy/RepRapFirmware · GitHub](https://github.com/gloomyandy/RepRapFirmware/releases). Check the document [here](https://teamgloomy.github.io/fysetc_spider_king_407_general.html).

### 4.4 Firmware Upload

We provide several methods to upload the firmware including SDCARD, dfu-util, DFU and platformio.

#### 4.4.1 Upload the firmware(SDCARD)

Uploading firmware using SD card is our default way to update the firmware as Spider King already has stock bootloader. 

Steps: 

1. Copy your compiled firmware file `firmware.bin`(If you use klipper firmware, you need to rename `klipper.bin` to `firmware.bin`) file to the SD card

2. Insert it to the SD card slot which is at the right side of the board

3. Then power on the board. 

4. You may need to wait for about 30s to finish uploading.

**Note: If you once upload the firmware to Spider King flash address `0x08000000`, then the stock bootloader will be gone, you need to upload the bootloader yourself, please follow the `5.Bootloader Guide` chacter to upload the bootloader.**

#### 4.4.2 Upload the firmware(dfu-util)

This method works in linux, that means should work in raspberry pi.

##### Step 1. Enter DFU mode first

1. First power off the board

2. Make sure no jumper on 5V and U5V-EN(On KING core board)

3. Place jumper on BT0 to 3V3 pin (On KING core board)

4. Connect USB cable to the KING core board and your computer (If you use raspberry pi to upload firmware, connect USB cable to your raspberry pi)

5. Power on the board with 24v PSU
   
   Now the board is in DFU mode. If not, click the reset button. Also you can power on the board with USB 5v, but you need to set jumper on 5V and U5V-EN on KING core board ,check the silkscreen lable on the KING core board, and remember to remove it after you finish uploading.
   
   ***REMEMBER to remove BT0 jumper if you finish uploading firmware or it will enter DFU mode again.***

##### Step 2. Install dfu-util

Make sure dfu-util is installed, shoot `dfu-util --version` command to check.

Sample output:

```
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
```

If not , you should install it first, use the package manager of your distribution to get the latest version, like

```
sudo apt-get install dfu-util
```

##### Step 3. Use command to upload firmware

Then use the command below to upload the firmware. You should replace `firmware.bin` below with your built firmware bin(or hex) file location like `out/klipper.bin`. 

```
dfu-util -R -a 0 -s 0x08008000:leave -D firmware.bin
```

#### 4.4.3 Upload the firmware(DFU)

This method only works in WINDOWS OS.

##### Step 1. Download stm32cubeprogrammer

You can download it from ST website [STM32CubeProg](https://www.st.com/zh/development-tools/stm32cubeprog.html). Then install and open the STM32CubeProgrammer software.

![](https://raw.githubusercontent.com/FYSETC/wiki.fysetc/main/docs/images/crisp/fysetc-spider-king--step-1-download-stm32cubeprogrammer.png "=800xauto")

##### Step 2. Enter DFU mode

* First power off the board

* Make sure no jumper on 5V and U5V-EN(On KING core board)

* Place jumper on BT0 to 3V3 pin (On KING core board)

* Connect USB cable to the KING core board and your computer (If you use raspberry pi to upload firmware, connect USB cable to your raspberry pi)

* Power on the board with 24v PSU
  
  Now the board is in DFU mode. If not, click the reset button. Also you can power on the board with USB 5v, but you need to set jumper on 5V and U5V-EN on KING core board, check the silkscreen lable on the KING core board, and remember to remove it after you finish uploading.
  
  ***REMEMBER to remove BT0 jumper if you finish uploading firmware or it will enter DFU mode again.***

##### Step 3. Upload the firmware

Now you can connect and flash the Spider board with stm32cubeprogrammer with the following operation.

Do as the red number shows in the screen shot.

1. Click the button to find the DFU port.
2. Connect the DFU
3. Choose the "firmware.bin" file. (or .hex file).
4. Fill in the 'Start address' `0x08008000`.
5. Start Programming

#### 4.4.4 Upload the firmware(platformio)

If you compile Marlin yourself with platformio,you can follow the instructions below to upload the firmware.

##### Step 1. Enter DFU mode first

* First power off the board

* Make sure no jumper on 5V and U5V-EN(On KING core board)

* Place jumper on BT0 to 3V3 pin (On KING core board)

* Connect USB cable to the KING core board and your computer (If you use raspberry pi to upload firmware, connect USB cable to your raspberry pi)

* Power on the board with 24v PSU
  
  Now the board is in DFU mode. If not, click the reset button. Also you can power on the board with USB 5v, but you need to set jumper on 5V and U5V-EN on KING core board, check the silkscreen lable on the KING core board, and remember to remove it after you finish uploading.
  
  ***REMEMBER to remove BT0 jumper if you finish uploading firmware or it will enter DFU mode again.***

##### Step 2. Click the upload button to upload firmware

## 5. STLs

We have upload some STLs for some 3D printers, like Voron: [holder](https://github.com/FYSETC/FYSETC-SPIDER-KING/tree/main/STLs).

# Attachments

* [Schematic files](https://github.com/FYSETC/FYSETC-SPIDER-KING/blob/main/hardware/Spider_King_V1.1_SCH.pdf)
* [Pinout File](https://github.com/FYSETC/FYSETC-SPIDER-KING/blob/main/Spider_King_V1.0_Pinout.pdf)

For more documents including configuration information, please check https://github.com/FYSETC/FYSETC-SPIDER-KING

# Support

[Fysetc Discord Server](https://discord.gg/CtENXn9N)

# Shop

[Fysetc Offical Store](https://www.fysetc.com/)
[AliExpress](https://www.aliexpress.com/store/3480083?)