Skip to content
N-1 · In buildN-1 build book

Flight computer

The chip that flies inside N-1.

Our own flight computer measures height and acceleration through the whole flight, logs every sample and radios live telemetry to the ground. It only measures; it never fires anything.

CompilesNot yet tested on hardwareMeasure only

Status

Designed, compiled, not yet flown.

Not yet flown

The firmware compiles for both boards, and Mission Control has been tested end to end in Simulation mode, but none of it has been tested on real hardware yet. Everything here is the design, not a flight result.

The board

One small board does the measuring, logging and radio.

Board
Heltec WiFi LoRa 32 V3ESP32-S3 with an SX1262 LoRa radio and 8 MB of flash on one board.
Barometer
BMP280Air pressure, turned into height above the pad.
Motion
MPU6050Acceleration and rotation on three axes.
Storage
On-board flashEvery sample is written to a log file (LittleFS) that is downloaded over USB after the flight.
Ground station
A second Heltec V3Receives telemetry and passes it to Mission Control on the laptop over USB.
Why not a Raspberry Pi
ESP32A Pi is heavier, needs more power and is slow to boot.

Flight phases

It works out where it is in the flight by itself.

The thresholds below come straight from the firmware, so this page changes when the firmware does.

  1. PADOn the rail. Averages the pressure to zero the height, beeps 3 short for all OK, 2 long for don't fly.
  2. BOOSTMotor burning. Starts on a hard push (or a real climb if the motion sensor is missing).
  3. COASTMotor out, still climbing to the highest point.
  4. DESCENTPast the peak. The motor's own ejection charge has put the parachute out.
  5. LANDEDStill for 5 seconds. Chirps so it can be found; LOCATE works again.

Thresholds

The numbers it decides with.

SettingValueWhat it means
PAD_LOG_MS100 msSample at 10 Hz on the pad
PAD_FLASH_MS1,000 ms...but only write one sample a second to flash while nothing is moving
FLIGHT_LOG_MS20 ms50 Hz in flight
TELEMETRY_MS500 ms2 packets a second
LAUNCH_G2.5 gTotal acceleration that counts as launch (3 samples in a row)
LAUNCH_ALT_M20 mOr climbing this far above the pad...
LAUNCH_VEL_MS5 m/s...while rising at least this fast (baro-only launch, used if the IMU is missing)
APOGEE_DROP_M2 mFiltered altitude this far below the peak = past apogee
LANDED_STILL_MS5,000 msVertical speed under 1 m/s for this long = landed
BOOST_MAX_MS5,000 msN-1's motor burns for about 1.6 s; after 5 s it is coasting whatever the IMU says
FALSE_LAUNCH_MS10,000 ms10 s after "launch" with less than FALSE_LAUNCH_M of climb = it was a knock
FLIGHT_MAX_MS300,000 ms5 minutes after launch, call it landed (an N-1 flight is about a minute)
GROUND_TAU_S600 sOn the pad, the ground pressure follows the weather with a 10 minute lag
LOG_RESERVE_BYTES524,288 bytes512 KB free = about 5 minutes at 50 Hz; less than that is a NO-GO
BATT_MIN_MV2,500 mVA reading below this means the divider is off or no battery is fitted

What it logs

30 bytes per sample, 50 times a second in flight.

On the pad it samples 10 times a second but only writes once a second while nothing moves, so a long wait at a club launch can't fill the flash.

4 Bt_mstime since power on, ms
4 Bpressure_paair pressure, pascals
4 Balt_mfiltered altitude above the pad
2 Bvel_cms
2 Baxmilli-g
2 Baymilli-g
2 Bazmilli-g
2 Bgx0.1 deg/s
2 Bgy0.1 deg/s
2 Bgz0.1 deg/s
2 Btemp_c100temperature, hundredths of a degree C
1 Bstateflight phase

Radio

Live telemetry to the ground, twice a second.

Frequency
869.525 MHzUK licence-free band 869.40 to 869.65 MHz, 10% duty cycle limit.
Spreading factor
SF7Short packets, about 25 ms each.
Bandwidth
250 kHz
Power
14 dBm
Rate
2 packets a secondAbout 5% duty, inside the 10% limit.
Sync word
0x4EThe letter N, so other LoRa users are ignored.
2 Bmagic'N', '1'
2 Bseq
4 Bt_mstime since power on
1 BstateN1State
4 Balt_dmaltitude above the pad, decimetres
2 Bvel_cmsvertical speed, cm/s
4 Bmax_dmhighest altitude so far, decimetres
2 Bacc_mgtotal acceleration, milli-g
2 Bbatt_mvbattery, millivolts (0 if not measured)
1 Bflagsbit0 baro ok, bit1 imu ok, bit2 logging ok, bit3 flash nearly full (NO-GO)
1 Backid of the last ground command the rocket received

Each packet is 25 bytes. The rocket and the ground station share these settings from one file, so they can't drift apart.

Measure only

Nothing on this board can fire anything.

  • No pyro channel, no firing output, no deployment code. The certified motor's own ejection charge puts the parachute out.
  • The only commands from the ground are PING and LOCATE. PING checks the radio link; LOCATE sounds the buzzer for 10 seconds. The rocket only acts on them on the pad or after landing.
  • Electronic parachute deployment waits until the board has proven itself over several flights.
  • Bad barometer readings are thrown away rather than turned into impossible heights, and a knock on the pad can't leave it stuck in flight mode.