How it all connects
Ligmax is five computers, two microcontrollers and one flight controller talking over six different transports. These are the working diagrams the team builds against: what talks to what, which port it uses, where the power goes, and which GPIO pin does what on each ESP32.
Every link, and the port it runs on
The Raspberry Pi 5 is the hub. Perception runs beside it on the Jetson, hard real-time control runs below it on the Pixhawk, and everything reaching shore goes out through the 5G router — except the RC link, which is deliberately independent of all of it.
Listening ports
| Port | Transport | Service | Host | Reachable from |
|---|---|---|---|---|
| 443 | TCP / HTTPS | Operator dashboard, via reverse proxy | Ground station | Internet — live.ligmax.no |
| 3338 | TCP / HTTP | Dashboard app behind the proxy | Ground station | localhost only |
| 3338 | TCP | Jetson frame ingest | Viewer host | Vessel LAN |
| 8771 | UDP | Telemetry ingest from the vessel | Ground station | Vessel LAN / 5G |
| 8080 | HTTP | MJPEG camera view | Viewer host | Vessel LAN |
| 5555–5560 | TCP (ZeroMQ) | Companion-computer node bus | Raspberry Pi 5 | localhost only |
| 2101 | TCP (NTRIP) | RTK corrections — planned | Ground station | Internet — rtk.ligmax.no |
The dashboard is served over HTTPS on 443 by a reverse proxy in front of the app, which itself listens only on localhost. Note that 3338 is also the default for the Jetson frame feed, so those two must not share a host without moving one of them.
On-board buses
| Bus | Identifier | Between | Carries |
|---|---|---|---|
| CAN | can1 @ 250 kbit/s | Pi 5 ↔ Daly 150 A BMS | Pack voltage, current, SoC, per-cell mV, temperatures, alarms |
| CAN | vehicle bus | Pixhawk ↔ VESC 6.7 ×2 | Field-oriented motor commands |
| MAVLink | /dev/ttyACM0 @ 115200 | Pi 5 ↔ Pixhawk 6C | Setpoints, RC override ch 6, telemetry, heartbeat |
| PWM | 1000–2000 µs | Pixhawk → both ESP32s, stern ESC | Actuator and thruster demand |
| CSI | /dev/video0-1 | Cameras → Jetson | 2592×1944@14, 1920×1080@29 or 1296×972@28 |
From 144 cells to five kilowatts
One pack feeds everything, split immediately into a high-voltage path for propulsion and a low-voltage path for compute. Two things must both be closed before any propulsion power flows, and one circuit deliberately bypasses the whole system.
Converter part numbers, rail voltages and fuse ratings are not recorded in the software repos. Treat the two DC-DC blocks as placeholders until the hardware values are measured and written down.
Two ESP32s, one pinout, different meanings
The active stabilisation runs on two separate ESP32 boards. Both take servo PWM from the Pixhawk and both use the same eight GPIO pins — but those pins drive completely different hardware on each board. Getting the two mixed up is the easiest way to damage something.
Translator ESP32 — roll trim
| GPIO | Dir | Signal | Wired to |
|---|---|---|---|
| 34 | in | RC_CH1_PIN | Pixhawk out 1 — left actuator demand |
| 35 | in | RC_CH2_PIN | Pixhawk out 2 — right actuator demand |
| 25 | out | MOTOR_A_IN1 | 160 W driver IN1 |
| 26 | out | MOTOR_A_IN2 | 160 W driver IN2 |
| 27 | out | MOTOR_A_ENA | 160 W driver ENA (PWM 0–255) |
| 12 | out | MOTOR_B_IN3 | 160 W driver IN3 |
| 14 | out | MOTOR_B_IN4 | 160 W driver IN4 |
| 13 | out | MOTOR_B_ENB | 160 W driver ENB (PWM 0–255) |
Slider ESP32 — pitch trim
| GPIO | Dir | Signal | Wired to |
|---|---|---|---|
| 34 | in | PIXHAWK_PWM_PIN | Pixhawk PWM out — rail position demand |
| 35 | in | RPI_HOMING_PIN | Raspberry Pi, 3.3 V homing trigger |
| 25 | out | PUL_PIN | DM542C PUL+ (step) |
| 26 | out | DIR_PIN | DM542C DIR+ |
| 27 | out | ENA_PIN | DM542C ENA+ |
| 12 | in | LIMIT_REAR_PIN | Rear endstop → GND (pull-up) |
| 14 | in | LIMIT_FRONT_PIN | Front endstop → GND (pull-up) |
| 13 | in | LIMIT_MID_OPTO_PIN | Optical centre endstop → GND (pull-up) |
The roll mixer itself runs on the flight controller as a Lua script: a roll PD loop (gains in SCR_USER1/SCR_USER2) summed with a ride-height offset the Pi commands on RC channel 16, output on servo functions 94 and 95 at 20 Hz and clamped to 1000–2000 µs.
Full engineering detail — hull geometry, control loops, test results and the complete component list — is in the technical report.