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.
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.

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.
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.
Manual
Direct control from the transmitter. Rudders and thrust follow the pilot.
Stabilised
A PID controller holds the pitch angle, with the bow planes mixed in.
Depth
K‑705 holds the set depth with dive planes, sink-rate damping and ballast. When the boat stops, the pump holds the depth.
Mission
The boat runs a planned mission step by step, autonomously and, if you choose, entirely without radio.
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.
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.


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.
| Limit | Default | Range |
|---|---|---|
| Dive depth | 3.0 m | 0.5 to 90 m |
| Rudder deflection | 25° | 5 to 45° |
| Pitch angle | 20° | 5 to 45° |
| Thrust | 35 % | 5 to 100 % |
| Throttle ramp | 150 %/s | 10 to 1000 %/s |
| Radio loss to failsafe | 1.0 s | 0.2 to 10 s |
| Battery warning and critical | 7.0 V and 6.4 V | |
| Small leak: emergency ascent | 0.35 | 0.05 to 0.95 |
| Major leak: emergency stop | 0.70 | 0.10 to 0.99 |
| GPS: minimum satellites | 5 | 3 to 12 |
| Return to home: arrival radius | 3 m | 1 to 50 m |
| Return to home: thrust | 20 % | 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.
| State | Meaning |
|---|---|
| Off | Pod sleeps. |
| Armed | Dark, watching the boat. |
| White strobe | Recovery aid, at the end of a mission or on command. |
| Red flash | Warning. |
| Alarm | Fast 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 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
- Switch the boat on. It must be disarmed.
- Join the WLAN
K‑705-XXXX. - Open
http://192.168.4.1in the browser. - 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

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

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.

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.

