Under Pressure · Submarines

K‑705 The autopilot for submarines.

Firmware, control, mission planning and configurator for remote-controlled and autonomous submarines, developed by us from scratch. K‑705 stabilises, holds depth, runs missions on its own where no radio can reach, and finds its way back with GPS at the surface. Missions are planned on the national map with lake relief, settings are made over USB or the boat's own WLAN.

100 HzControl loop
64Mission steps
100Parameters
USB + WLANConnection

Symbolic image: diver on the forward hull of a submerged submarine. Photo U.S. Navy, public domain, mirrored.

The principle

Built like iNav. Made for under water.

K‑705 is our own firmware, written from scratch, on an RP2040. The BNO055 measures attitude and heading, with a built-in magnetic compass, the MS5837 measures pressure and therefore depth. From these K‑705 controls pitch, heading and depth, 100 times per second.

Firmware, control, protocol, configurator, mission planner and map integration all come from one hand. The planner works with the same limits as the boat, and the parameter list comes straight from the firmware source code.

Anyone who flies planes or multirotors with iNav knows the principle: firmware in the vehicle, a configurator on the PC, clear modes, a mission planner and a failsafe that takes over in an emergency. Under water more comes into play: buoyancy and ballast, pressure instead of altitude, and no radio below the surface. The boat has to be able to decide on its own.

We know iNav from our own practice: our long-range PC-7 flies with it.

K‑705 configurator during a mission: trim and heel indicator, gyrocompass with ordered course 120°, depth gauge at 1.61 m, readings and outputs
The configurator during a mission in demo mode: step 3, curve to heading 120°, depth 1.6 m.

What K‑705 measures, knows and does

81 values live, 29 in the black box, 17 protective functions. K‑705 sees more than the pilot and acts before things get tight.

81Values in every telemetry packet
50 HzLive telemetry over USB, 10 Hz over WLAN
100 HzControl loop for attitude, depth and heading
29Measurements per black box record, up to 20 Hz
100Parameters, all adjustable in the configurator
17Protective functions, effective without radio
10Step types for missions of up to 64 steps
13 × 5Light states for five lights, headlights included

Attitude and motion

  • Roll, pitch and heading with compass
  • Rotation rates in three axes
  • Calibration state of the attitude sensors

Water and depth

  • Depth from the pressure sensor, up to 30 bar
  • Outside pressure and water temperature
  • Ballast fill level

Position

  • GPS: latitude, longitude, satellites, accuracy, speed
  • Distance and bearing to home
  • Dead reckoning under water, matched on surfacing

Energy

  • Battery voltage and both cells individually
  • Current and charge used in mAh
  • Remaining capacity with adjustable reserve

Inside the hull

  • Humidity, pressure and temperature in the tube
  • Three leak probes in different places
  • Vacuum leak test before diving

Control and state

  • 16 radio channels and signal strength
  • Rudders, throttle, pump and every controller set point
  • Mode, mission step, warnings, cycle time

17 protective functions that work without radio

  • Small leak: emergency ascent
  • Major leak: emergency stop, power cut
  • Battery low: warning
  • Battery critical: surface
  • Weakest cell too low: surface
  • Cells out of balance: warning
  • Energy reserve reached: warning or return home
  • Current too high: warning
  • Humidity in the hull: warning
  • Inside pressure rising: warning
  • Arm only after a leak test (optional)
  • Depth limit: surface
  • Sensor failure: surface
  • Radio loss: surface or return home
  • Dead man in the beacon: alarm when the boat goes silent
  • Watchdog in firmware and test mode
  • Battery empty while disarmed: switches itself off

All of it is live in the configurator, all of it goes into the black box: around 30 minutes at 10 Hz, as charts, GPS track and CSV. Cells, current and the hull interior need the optional sensors ADS1115, INA226 and BME280.

Six modes, one clear sequence

From driving by hand to the autonomous mission. And above it all the failsafe, which always takes priority.

01

Manual

Direct control from the transmitter. Rudders and thrust follow the pilot.

02

Stabilised

A PID controller holds the pitch angle, with the bow planes mixed in.

03

Depth

K‑705 holds the set depth with dive planes, sink-rate damping and ballast. When the boat stops, the pump holds the depth.

04

Mission

The boat runs a planned mission step by step, autonomously and, if you choose, entirely without radio.

05

Return to home (RTH)

With GPS, the boat returns to its starting point at the surface. Under water it never navigates by GPS: it surfaces first, waits for a valid fix and then heads home. Automatically after every mission, can be switched off.

06

Failsafe

On a leak, critical battery, depth limit, sensor failure or loss of radio, K‑705 takes over: empty the ballast, nose up 10°, 15 % throttle, surface. On radio loss, optionally with return to home.

New in version 0.5

Mission planner with lake chart

Plan the dive at home on screen.

You set the start and waypoints on the swisstopo national map, with the lake relief from measured lake depths underneath. One click turns this into the complete mission: turn onto the course, dive, run straight, with the time from distance and speed.

At the lake: load the mission into the boat over WLAN, then start it. The boat does the rest on its own.

Three ways to start

  • With the transmitter: switch on channel 7, the boat drives like an RC ship and dives at the push of a button
  • Without a transmitter, with the magnet: hold it to reed 2 for 1 to 5 seconds and take it away. The boat arms, counts down (adjustable, 10 s by default) and starts. The magnet during the countdown aborts, during the mission it makes the boat surface, over 5 seconds switches it off
  • Over USB from a laptop, for example on the test bench

The map planner

  • National map or aerial image from swisstopo, alternatively OpenStreetMap
  • Lake relief from swissBATHY3D, the federal lake depth data, with adjustable opacity
  • Depth and speed for every waypoint, markers can be dragged
  • Beacon at the end and return to home after the mission, both optional
  • Save the plan as a file, it stays stored in the browser

There is no GPS under water. The boat keeps track of its position from speed and compass. When it surfaces it compares this with GPS, reports the deviation and proposes a better speed factor. So you calibrate the speed more precisely with every dive. The boat does not compensate for current under water.

K‑705 map planner in demo mode: swisstopo national map with coloured lake relief in the basin off Lucerne, start point and four waypoints, distance 1582 m, maximum depth 12 m
The map planner in demo mode: four waypoints in the basin off Lucerne, the deep areas in red. Map and lake depths © swisstopo.
K‑705 mission planner with step list, 3D preview of the track, depth profile and top view
The mission planner: steps on the left, the track in 3D on the right, depth profile and top view below.

Know what happens before the start

  • 3D preview of the track, with playback
  • Depth profile and top view
  • Duration, distance, maximum depth and energy demand before the start
  • Warnings before anything can go wrong: depth above the limit, speed above the limit, too many steps
  • Send, store in the boat, read back, over USB or WLAN

Up to 64 steps from these building blocks

  • Wait
  • Dive
  • Straight
  • Turn
  • Curve with radius
  • Ballast
  • Fixed rudder
  • Beacon
  • Surface
  • Repeat

Safety that thinks ahead

Failsafe takes priority

Leaks, battery, depth limit, sensor failure and radio loss are monitored continuously. One trigger is enough, and the boat surfaces.

Leaks in two stages

Two probes in two places, the wetter one counts. Small leak: emergency ascent, at the surface the boat switches off. Major leak: emergency stop, everything powerless, the beacon raises the alarm. Arming again only after a restart.

Status LEDs on the hull

Default: green shows ready, armed and mission, red flashes count the fault, steady red means emergency stop. Every light can be set freely in every state, with colour if you wish.

WLAN only when disarmed

When the boat is armed, the firmware switches the WLAN off and keeps it off, even against accidental switching on. Arming and mission start never work over WLAN.

Safe test mode

Servos, motor and pump can only be driven directly when disarmed. If the signal stops for 1.5 s, the firmware stops motor and pump.

Limits in software

Rudder deflection, pitch, throttle and depth are limited, identically in the firmware and in the mission planner.

Limits: default values and adjustable ranges of the software
LimitDefaultRange
Dive depth3.0 m0.5 to 90 m
Rudder deflection25°5 to 45°
Pitch angle20°5 to 45°
Thrust35 %5 to 100 %
Throttle ramp150 %/s10 to 1000 %/s
Radio loss to failsafe1.0 s0.2 to 10 s
Battery warning and critical7.0 V and 6.4 V
Small leak: emergency ascent0.350.05 to 0.95
Major leak: emergency stop0.700.10 to 0.99
GPS: minimum satellites53 to 12
Return to home: arrival radius3 m1 to 50 m
Return to home: thrust20 %5 to 100 %

New in version 0.5

Beacon and signals: recovery even when everything fails

The submarine is sinking? You see it flashing.

The beacon is a separate pod with its own battery, its own computer and a powerful 3-watt strobe, plus an RGB pixel for red warning signals. It is connected to the boat by a single data line.

The boat reports five times per second. If the report stays away for 8 seconds although the boat was last armed, the pod raises the alarm on its own. This also covers the case in which the electronics in the boat have failed completely.

Emergency stop and a major leak always raise the alarm. Everything else you decide yourself, on the «Signale» (signals) page of the configurator.

Beacon states
StateMeaning
OffPod sleeps.
ArmedDark, watching the boat.
White strobeRecovery aid, at the end of a mission or on command.
Red flashWarning.
AlarmFast red and strobe, when the boat falls silent or leaks.
Computer
RP2040 Zero
Strobe
DEBO LED 3W, switched by a MOSFET
Warning light
SK6812 RGB pixel
Supply
its own 1S battery
Link
one data line and ground, 9600 baud
Signals page in the K‑705 configurator: light plan with states and lights, preview with lit lamps, hardware and basic settings
The «Signale» page: light plan, preview and settings. Every cell is one light in one state.

Signals by your rules

  • Light plan: 13 states from ready to emergency stop, each for L1 green and L2 red on the hull plus strobe and pixel on the pod
  • Per light and state: colour, brightness, a 16-step rhythm, breathing, depth count or fault code
  • Inherit: a warning uses just one light, the others keep showing the mission
  • Presets such as double flash, heartbeat or U in Morse, plus overall presets standard, stealth and dive buddy
  • Status LEDs as 5 mm LEDs or as RGB pixels with free colour
  • Preview in the browser, states can be combined, and «Am Boot zeigen» lights up the real boat for 10 seconds

WLAN on board

Configure it on the shore, with a phone. No cable, no app, no internet.

A small radio module sits in the boat, a XIAO ESP32 C3. It opens its own WLAN and serves the configurator itself. Phone, tablet or laptop connect straight to the boat, and the pressure hull stays closed.

The map needs internet, the boat WLAN has none. So you plan at home, then switch to the boat WLAN and upload the mission.

How to connect

  1. Switch the boat on. It must be disarmed.
  2. Join the WLAN K‑705-XXXX.
  3. Open http://192.168.4.1 in the browser.
  4. Press «Per WLAN verbinden» (connect via WLAN).

This does not work from underpressure.ch: the site is encrypted, and the browser does not allow a connection from there into the boat’s unencrypted network. That is why the boat carries the configurator itself.

Over WLAN

  • Read and write parameters
  • Send missions and store them in the boat
  • Read out the black box
  • Tests and calibration
  • Live telemetry at 10 Hz

Deliberately not over WLAN

  • Arming: Crossfire, USB or magnet at reed 2
  • Mission start: Crossfire, USB or magnet at reed 2, with a countdown
  • Bootloader and firmware update: USB only
Black and white aerial photo: submarine just below the surface, only the raised masts leave a white trail of spray
At the surface WLAN and remote control, below it autonomous. Symbolic image: submarine at periscope depth, 1986. Photo U.S. Navy, public domain.

The configurator

One tool for everything, right in the browser and with no installation.

The configurator reads the parameter list directly from the firmware source code when it is built. So boat and configurator always speak the same language, over USB just as over WLAN.

  • Overview with instruments modelled on a submarine control station: trim and heel, gyrocompass with ordered course, depth gauge with deviation from the set depth
  • Map: national map or aerial image from swisstopo or OpenStreetMap, with lake relief, waypoints by click
  • Live graphs for attitude, heading, depth, battery, leak and ballast
  • Calibration: depth, attitude, IMU profile, battery voltage, servo centre, end points and direction
  • Tests for servos, motor and pump, only when disarmed and with a watchdog
  • Navigation: set home, start and end return to home
  • Black box: load a recording, charts, GPS track and CSV export
  • Signals: set every light in every state freely, with colour, brightness and rhythm, a live preview and a table of what every light means
  • On board: cell voltages, current and energy used, humidity and pressure inside the hull, a vacuum leak test and charging the pod through the boat, with optional sensors on the I2C bus
  • 153 parameters with minimum, maximum, unit and description, with import and export
  • Terminal for every protocol command
  • Demo boat: try everything, with no hardware at all

Design values

Example: a submarine as a dive buddy

Our test vehicle: a submarine that dives with you.

This is the boat on which we develop and trial K‑705: a remote-controlled Alfa-class submarine at 1:120 scale, 67 cm long, built for Lake Lucerne and designed for 60 metres. Meant as a dive buddy that comes along under water.

Closed once, never opened again

The hull is printed from resin by SLA, bonded in segments and reinforced with glass fibre cloth and epoxy. Inside sits the pressure hull: a DN50 tube wrapped in GRP and closed with printed end caps.

Once the boat is closed, it stays closed. No USB socket, no switch to the outside. The only opening is the charging port for boat and beacon, closed with a blanking plug in operation. Firmware and radio module are loaded over USB before the boat is sealed. After that everything runs over WLAN: parameters, missions and black box. Nobody has to open the boat for a new mission.

Propulsion and control

  • Brushless motor T-Motor AS2304 outside the pressure hull, flooded, with a short shaft to the propeller
  • Ballast pump on the peristaltic principle for fine trimming
  • Three servos for bow planes, stern planes and rudder, planned oil-filled and pressure-compensated, the sealing is in progress
  • Remote control over TBS Crossfire, the long-range radio from model aviation
  • Status LEDs outside on the hull, visible under water
CAD section through a submarine model: pressure tube with sled inside the hull, motor and coupling in the stern, sail with masts
Section in CAD: the pressure tube with its sled sits inside the printed hull, the drive in the stern.

Specifications

The test boat on which K‑705 is being developed. All figures are design values.

Electronics

Computer
RP2040 Zero, 100 Hz control loop
Attitude and heading
BNO055 with magnetic compass (NDOF), IMU mode without compass selectable
Depth and temperature
MS5837-30BA, second-order compensation
Remote control
TBS Crossfire (CRSF, 420000 baud), 8 channels, RSSI
GPS
ATGM336H, NMEA at 9600 baud
WLAN
XIAO ESP32 C3, its own network, linked to the Zero by UART at 460800 baud
USB
only before sealing: load firmware and radio module

Propulsion and ballast

Motor
T-Motor AS2304 1800 KV, outside the tube, flooded, short shaft
ESC
AT12A, forward only by default, reverse by parameter if the ESC supports it
Rudders
3 × MG90S: rudder, stern planes, bow planes, sealing in progress
Ballast
Peristaltic pump DFRobot DFR0523, 50 Hz servo signal, fills and empties
Power
2S 850 mAh (6.3 Wh), voltage sensing
Supply
logic from the ESC's BEC, servos and pump from a separate 5 V converter

Construction and safety

Hull
SLA resin, printed, reinforced with glass fibre cloth and epoxy
Pressure hull
DN50 tube, 46.4 mm inside, 400 mm long, wrapped in GRP, printed end caps
Charging
one port for boat and beacon, blanking plug in operation
Sled
Chassis v1.2, battery at the bottom, 4 slide rails
Leak
two probes in two places
Indicators
green and red status LEDs, outside on the hull
Recovery
beacon pod with its own battery, its own computer and a 3 W strobe

New

Wiring plan on one page

One sheet with everything on it: every sensor, every output, every component, every wire.

This is how we wire our test vehicle. Every component with part number and function, every pin from the firmware, power supply with latching switch, separate ground for the beacon. To rebuild, check and pass on.

K‑705 wiring plan on one A4 page: RP2040 Zero in the centre, sensors on the left, outputs on the right, power and beacon below
Drawing UP-K705-E-001, revision F, as of 26.11.2026. Not yet tested under water.

Try it yourself

  • USB: Chrome or Edge on a PC or Mac (Web Serial). Firefox, Safari and mobile browsers cannot do USB.
  • WLAN: any browser, including on a phone. Join the boat's WLAN and open http://192.168.4.1.
  • The demo needs no boat: it simulates telemetry, tests and missions.
  • The map loads tiles from swisstopo and, if you choose, OpenStreetMap, only after you click «Karte laden» (load map).

Under construction

Status

K‑705 is under construction. Firmware and planner are tested in simulation, the tests with the hardware in the lake will follow. All figures for the boat are design values.

It is tested on a PC, with test models instead of hardware: the firmware core with protocol, arming, failsafe, test mode and a complete mission against a boat model, plus GPS parsing, return to home, the check on surfacing, the black box format, the leak logic, the signal to the beacon and the status LED patterns, the locks for the radio port, and the configurator over a simulated WLAN bridge.

Not yet tested: the firmware on real hardware, the programs of the radio module (written, not yet compiled) and of the beacon pod, the WLAN in the real boat, watertightness at 60 metres and all tests in the water. The controller values are starting values and will be tuned in the water.

Next step

Are you building a vehicle that has to work on its own?

Firmware, control, configurator and mission planning: we develop it for your vehicle, under water, on the ground or in the air.