# Quick start

> Unbox UPAN Core, wire the e-stop, motors and power, connect it to Wi-Fi, install a package from upan.tools and make the first move — or drive it from a PC with upan-cli.

This guide takes you from the box to the first move with UPAN Core. You wire the e-stop, the motors and the power supply, connect the controller to your Wi-Fi, and install a **package** — the controller screen, axis settings and programs that the agent on upan.tools builds for your job. After that the controller works locally: no account and no internet connection are needed. The firmware is in development; steps marked "not final" may still change.

## What you need

- UPAN Core: UPC2-T2 (with 2 × TMC2209 in the sockets) or UPC2-T0 (empty sockets — fit your own TMC2209 / TMC2226 StepStick modules or use external drivers).
- A 12–24 V DC power supply, never above 36 V. 48 V is not supported. See [Power](/docs/power) for models and sizes.
- One or two bipolar stepper motors with 4 wires, up to about 2 A on the drivers in the sockets. Or a stepper or servo driver with Step/Dir inputs.
- An NC stop button, or a short wire jumper.
- A 35 mm DIN rail, or a flat place with free air above the vents.
- A phone or PC with Wi-Fi. For setup from a PC: a USB-C cable.

## 1. Unbox

The box holds the controller, the plugs for all terminals, the antenna, the RS485 terminator jumper and a label or card with the device password. The password is unique to your device; you need it to log in over the network. The QR code on the case opens the device's page on upan.tools with these steps. The exact box contents are not final yet.

Screw the antenna onto the SMA socket.

## 2. Check the drivers

Do all wiring with the power supply switched off.

On UPC2-T2 the two TMC2209 drivers are already in the sockets, with heatsinks. On UPC2-T0, plug in your own TMC2209 or TMC2226 StepStick modules: the sockets are keyed, so a module only fits one way round. Leave a socket empty if that axis uses an external driver. Details: [Wiring](/docs/wiring#drivers-in-the-sockets).

## 3. Wire the e-stop

On the `OUT / E-STOP` terminal, connect an NC stop button between pin 7 (`+5V`) and pin 6 (`ESTOP`). Without a button, fit a wire jumper between pins 6 and 7. With the input open, all drivers stay off.

Limit switches go on the fast inputs `IN1`–`IN4` of the `FAST IN` terminal, as NC contacts from `+V`. If you have none yet, leave them for later: the package says which inputs it expects. Details and examples: [Wiring](/docs/wiring#fast-inputs-and-sensor-supply).

## 4. Connect the motors or the external driver

**Driver in a socket:** connect the motor to `MOTOR 1` (or `MOTOR 2` for the second axis): one coil on pins 1–2, the other on pins 3–4. Never plug or unplug a motor while the supply is on.

**External driver:** connect it to `AXIS 1 EXT` (or `AXIS 2 EXT`):

| UPAN Core | Driver |
|---|---|
| 1 `STEP+`, 2 `STEP−` | `PUL+`, `PUL−` |
| 3 `DIR+`, 4 `DIR−` | `DIR+`, `DIR−` |
| 5 `EN`, 7 `GND` | `ENA+`, `ENA−` |

Common-anode and common-cathode drivers are covered on the [Wiring](/docs/wiring#external-driver-axis-1-and-2) page.

## 5. Connect the power supply

Connect the supply to the `PWR 12–24V` terminal: pin 1 `+`, pin 2 `GND`. Connect PE to the supply's earth terminal and to the machine frame. Then switch the supply on at the mains side. The light flashes white, then turns blue (ready).

## 6. Connect it to your Wi-Fi

1. Hold the button for 5 s. The light breathes turquoise: the controller opens its own Wi-Fi access point `UPAN-xxxx` (`xxxx` is the end of the serial number).
2. Connect your phone or PC to `UPAN-xxxx`. The setup page opens; choose your workshop Wi-Fi.
3. Once the controller has joined your network, open its screen at `http://upan-xxxx.local` from a PC or iPhone. On Android, use the IP address: the setup page shows it as a QR code, and many routers list the device as `upan-xxxx`.
4. Log in with the password from the label or card.

The controller screen is served by the controller itself and works without internet.

## 7. Install a package

Describe your job to the agent on [upan.tools](/build): what moves, how far, what triggers what. The agent says whether UPAN can do it, then builds the package and shows the wiring for it. Install the package in one of three ways:

1. **USB drive.** Connect the controller to a PC with USB-C. It shows up as a USB drive; drop the package file on it.
2. **Controller screen.** Choose "Install package" and pick the file.
3. **Code.** Enter the project code (like `P-7K3Q`) on the controller screen: the controller fetches the package from upan.tools.

The controller checks the package before it accepts it: a package can set axis settings and programs only within the machine limits, and it cannot change the firmware.

> **Note:** Packages need controller firmware that is still in development. The steps and the file format are not final yet.

## 8. First move

The controller screen now shows the screen your package defines: jog buttons, a start button for the program, a stop button. Make a short jog first and check the direction. If the motor turns the wrong way, do not rewire: change the direction in the agent, or in the axis settings on the screen.

If a move is refused, the message says why and what value is allowed. See [Troubleshooting](/docs/troubleshooting).

## From a PC with upan-cli

`upan-cli` is the command-line tool for UPAN. How it is distributed (package name and download location) is not final yet. Plug a USB-C cable into the controller; USB powers the logic, so you can set it up before the motor supply is on.

```powershell
upan-cli ports
```

Remember the port for the session (use the port from the list):

```powershell
$env:UPAN_PORT = 'COM5'
```

```powershell
upan-cli info
```

`info` shows the firmware version, the order code and the serial number.

Machine limits (travel, speed, acceleration, motor current, limit switches) can only be changed over USB, with physical presence at the device: press the button **briefly** (under 2 s), then send the command within 30 s. Example for a linear axis with a 5 mm lead screw, a motor rated 1.5 A and no limit switches yet:

```powershell
upan-cli config set --hard axis_kind=linear full_steps_per_rev=200 microsteps=16 travel_per_rev=5mm travel_min=0mm travel_max=300mm velocity_max=50mm/s acceleration_max=200mm/s2 run_current_ma=1500 hold_current_ma=750 limit_min_absent=yes limit_max_absent=yes home_method=none
```

How the second axis is addressed is not final yet. A relative move works without homing:

```powershell
upan-cli move-by 10mm -v 5mm/s
```

| Command | What it does |
|---|---|
| `upan-cli status` | state, position, inputs |
| `upan-cli jog 5mm/s --for 2s` | move while the command runs; stops by itself if the connection drops |
| `upan-cli set-position 0` | declare the current position as 0 (the axis counts as homed) |
| `upan-cli move-to 50mm` | absolute move, only after homing |
| `upan-cli stop` | smooth stop |
| `upan-cli fault-clear` | leave the fault or stop state |

Units: `um`, `mm`, `cm`, `m`, `in` for a linear axis; `deg`, `rev` for a rotary axis. A plain number means mm or degrees.

## Your own AI agent

`upan-mcp` connects UPAN to your own AI agent through the Model Context Protocol (MCP). It is an open-source program that runs on your PC and talks to the controller over the network or USB. The agent sends commands; the controller checks every one against its limits and refuses what is not allowed, with the reason.

> **Note:** `upan-mcp` is in development. Installation steps for Claude Code, Claude Desktop and other agents will be published on the [upan-mcp](/docs/upan-mcp) page when it is released.

## Next steps

- [Wiring](/docs/wiring) — every terminal, inputs, outputs, RS485, Qwiic and UPAN Axis.
- [Safety](/docs/safety) — the e-stop, limits and homing rules.
- [Power](/docs/power) — choosing and wiring the power supply.
- [API reference](/docs/api) — commands, fields and error codes.
