Electronics · Magnetic Apogee Detector

MAD

A modern interpretation of Robert Galejs’ magnetometer-only apogee detector. MAD senses the rocket’s orientation against the Earth’s magnetic field to detect apogee. The first Rev B board was powered in December 2026. It is prototype hardware and is not flight qualified.

In developmentDesign notes

How it senses apogee

The rocket turns. The Earth’s field does not.

The Earth’s magnetic field points in a fixed direction at the launch site. MAD measures how much of that field lies along the rocket’s long axis, and that share changes as the rocket arcs over.

How MAD senses apogeeA rocket shown at three points on its flight arc against the slanted lines of the Earth’s magnetic field. A bar beside each rocket shows the share of the field measured along the rocket’s long axis: high on the way up, lower as it arcs over, and below the threshold line near apogee.123
  • Earth’s magnetic field
  • Share of the field along the rocket’s axis, |Bx| / |B|
  • Threshold (default 0.22)
  1. 1
    On the way up

    The rocket’s long axis lies close to the field direction, so most of the field is measured along that axis. The reading is high.

  2. 2
    Arcing over

    As the rocket tips, its axis swings away from the field. Less of the field lies along the axis and the reading falls.

  3. 3
    Near apogee

    The axis is close to perpendicular to the field. The reading drops below the threshold, and holding there is MAD’s apogee cue.

Illustration only, not to scale and not flight data. The field is drawn dipping 70° below horizontal; the real angle depends on where you launch. Where in the arc the reading crosses the threshold also depends on the direction the rocket tips, the rail angle and the airframe’s own magnetic bias.

Projecting the field onto the rocket’s axisAn arrow labelled B shows the Earth’s magnetic field. A dashed line shows the rocket’s long axis. A thick segment along that axis, labelled Bx, is the part of the field the sensor measures along the axis.BBxrocket axis

The measurement

One ratio, held below a threshold.

MAD has a sensor that measures the Earth’s magnetic field in three directions. The firmware looks at how much of that field points along the length of the rocket,Bx, and compares it with the total field, B. That comparison,|Bx| / |B|, gives a number between 0 and 1 that depends only on which way the rocket is pointing, not on how strong the field is.

While the rocket climbs, the number is high. As the rocket tips over at the top of its flight, the number drops. MAD calls it apogee when the number stays at or below 0.22 for 120 milliseconds, which means the rocket is lying within about 13° of sideways to the field. To avoid false triggers, it only starts checking once its power checks have passed and 3 seconds after arming.

The number follows the rocket’s attitude only if the sensor reads the Earth’s field and nothing else. On the first board, the board’s own parts put a field on the sensor stronger than the Earth’s, and with nothing connected to its output the board fired at the wrong attitude. Firmware 0.3.0 therefore keeps a calibration, made with RustMAD, and takes the board’s own field off every reading. It will not arm without one.

These defaults are starting values in the prototype firmware, not validated flight settings. Orientation is the sole apogee cue: there is no barometer or accelerometer. The prototype firmware has no launch detection. From firmware 0.3.0 it arms only if the number is at least 0.5 when its 2 second wait ends, but once armed it fires whenever the number holds below the threshold, on the ground included.

The board

The Rev B board.

The first Rev B board was powered on December 2, 2026. The pictures here are still renders from the design files, not photographs. The board is 33 × 138 mm with four layers, and every part is on the front.

3D render of the front of the MAD Rev B circuit board, a long narrow green board. At the far end a marked magnetometer zone reads NOSE, with +X and +Y arrows and “MAGNETOMETER – KEEP STEEL AWAY”. Along the board are the processor, a three-pin SWD header, a USB-C connector on one edge, a two-pin ARM header marked “ON = ARMED”, a white battery connector marked BATT 3–18V, two cylindrical capacitors and a green two-way screw terminal marked PYRO OUTPUT. Gold test points are labelled GND, 3V3, VIN, 5V and 12V.
Front, with partsThe Rev B board with its parts fitted: the magnetometer at the nose end, the processor, USB-C on the edge, the ARM header, the two firing capacitors and the match terminal at the tail. A 3D render from the design files, not a photograph of a built board.
3D render of the back of the MAD Rev B circuit board. White printing shows the Rocket Salvo logo, “MAD Magnetic Apogee Detector Rev B”, notes on the magnetometer and its brass or nylon screw, the USB-C port and status light colours, the battery range, the ARM jumper, the e-match output rating, a DANGER PYROTECHNIC OUTPUT warning and a blank serial-number box. The pins of the connectors show through, and the green screw terminal hangs below the tail end.
BackThe back carries no parts. It is printed with what each connector is for, the status light’s colours and the handling warning. A 3D render from the design files, not a photograph of a built board.
Flat render of the front of the bare MAD Rev B board, 33 by 138 mm, shown nose end up. Gold pads mark where each part goes, with white printed part numbers. From the top: the logo and “MAD REV B”, the boxed magnetometer zone with +X, +Y and NOSE arrows, the processor and memory, the SWD header, USB, the ARM header marked “ON = ARMED”, the power supply, the battery connector marked BATT 3–18V, the two capacitor positions and the E-MATCH terminal marked PYRO OUTPUT. A mounting hole sits at each end.
Flat render of the back of the bare MAD Rev B board, shown nose end up. Printed in white from the top: the Rocket Salvo logo and rocketsalvo.com; “MAD Magnetic Apogee Detector Rev B”; “MAGNETOMETER ON FRONT, brass/nylon screw at nose end”; SWD pins DIO, GND, CLK; “USB-C: logs and firmware. LED blue=safe green=armed red = firing or fault”; “BATT 3–18 V (1S–4S LiPo), check + / − before plugging in”; “ARM: jumper on = armed. Jumper off: output disabled, bank bleeds down in 10 s”; “E-MATCH 12 V 940 uF 67 mJ”; “DANGER PYROTECHNIC OUTPUT. Remove ARM jumper and check the bank is below 1 V before handling”; battery polarity marks; a blank S/N box; and the E-MATCH + and − pads.

The bare board, front and back, drawn from the fabrication files. Select a picture to see it full size.

Magnetometer
At the nose end, in a zone with no copper on the inner or back layers, no vias and no copper fill. Its axes are printed on the board.
Processor and memory
Run the state machine and store the flight log.
USB-C
On the board edge, for loading firmware and downloading the flight log.
ARM header
The removable jumper in the charge and fire paths. Fitted means armed.
Battery connector
A two-pin JST-PH socket, with polarity printed on both sides.
Firing capacitors
Two 470 µF capacitors: the stored-energy bank for the match.
Match terminal
Screw terminal at the tail end.
Test points
Ground, 3.3 V, 5 V, the protected battery input and the firing bank.

Design

How MAD is meant to work.

01

Orientation is the apogee cue

A three-axis magnetometer measures the field along the rocket’s long axis. Orientation is the sole apogee cue; voltage readings are safety interlocks and telemetry only.

02

Magnetic calibration

The board’s own parts put a magnetic field on the sensor: about 0.6 gauss on the first board, against about 0.4 for the Earth’s field in that room. Firmware 0.3.0 keeps a calibration, made with RustMAD, and takes the board’s field off every reading. It will not arm without one.

03

Hardware arming

A removable ARM jumper is part of both the charger-enable and fire-enable hardware paths. Firmware cannot bypass it. With the jumper out, the firing bank is disconnected from every supply and a bleed resistor discharges it.

04

Stored-energy firing

A bank of two 470 µF capacitors, charged to about 12 V, stores 67 mJ for one electric match. The bank charges only from the flight battery, so USB power alone cannot charge it. A resistor in the firing path limits the current into a shorted output.

05

Explicit safety state machine

SAFE → QUALIFY → ARMED → FIRING → LOCKOUT. With the jumper fitted, any detected fault forces FAULT. A single firing pulse is followed by lockout until the jumper is removed.

06

Flight logging

Sensor and voltage readings are logged to on-board flash memory and read back over USB-C. The firmware records only while the ARM jumper is fitted, and the log cannot be downloaded or erased until the jumper is out. On the first board, a download of 2,374 records came back with every check byte right.

07

Wide input range

Rev B accepts 3–18 V, including a single-cell LiPo, through a resettable fuse and reverse-polarity protection. The firmware will not arm below 3.3 V.

Safety state machine

Every firing passes through the same states.

Arming requires the physical jumper, stable power and capacitor readings, a stored magnetic calibration, a qualification delay after which the field must read as it does for a rocket standing on its pad, and a post-arm inhibit. A single firing pulse is followed by lockout until the jumper is removed.

  1. SAFEARM jumper absent. Outputs held off.
  2. QUALIFYJumper present. Power checked through a qualification delay, then the field.
  3. ARMEDBank charges. Orientation watched after a post-arm inhibit.
  4. FIRINGA single firing pulse.
  5. LOCKOUTNo further firing until the jumper is removed.

FAULTWith the jumper fitted, any detected fault forces this state. It holds until the jumper is removed.

Specifications

Rev B design and open items

The first table describes the Rev B prototype design and may change. Its electrical figures are calculated. Nothing has been measured on a board with instruments; a board’s own log shows its bank reaching 10 V in about a tenth of a second and settling at 11.9 V, from a 4.0 V battery. Nothing in the second table has been finalized.

Rev B design (prototype, subject to change)
Apogee sensingThree-axis magnetometer (MMC5983MA)
ProcessorRP2040
Supply input3–18 V, including 1S LiPo; the firmware will not arm below 3.3 V
OutputOne electric-match channel, 5.08 mm screw terminal
FiringCapacitor discharge: 940 µF charged to about 12 V, 67 mJ stored
ArmingRemovable ARM jumper in the charge and fire hardware paths
Flight logOn-board flash memory, 16 MB, with 4 MB kept for the flight log (262,144 records). Recorded only while the ARM jumper is fitted
CalibrationThe board’s own magnetic field, stored on the board and taken off every reading. Made with RustMAD, with the ARM jumper out
Firmware0.3.0, on the downloads page. It needs RustMAD 0.3.0 or later. It ran on a board on the bench on December 3, 2026
USB-CLoading firmware, reading status, calibrating, and downloading or erasing the flight log
Status lightBlue: safe or locked out. Green: qualifying or armed. Red: firing or fault
Board33 × 138 mm, 1.6 mm thick, four layers, parts on one side
MountingTwo M3 holes 130 mm apart; the one beside the magnetometer takes a brass or nylon screw
Not yet finalized
MassTo be determined
Current draw and battery lifeTo be determined
Operating temperature rangeTo be determined
Flight envelope (altitude, velocity, acceleration)To be determined
Apogee detection performanceTo be determined
Price and availabilityTo be determined

Rev A to Rev B

What changed in Rev B.

Rev B replaces Rev A. A review of Rev A found wiring errors in its schematic, and its last board layout had shorts between 11 pairs of nets, including 3.3 V to ground.

01

A new schematic and layout

Rev B is a new schematic capture, placement and routing made from one design definition. It is not a patch of Rev A.

02

Planes and wide copper

A solid ground plane and a 3.3 V plane on the inner layers. The battery input, the 5 V supply and the firing loop run on wide copper areas instead of thin tracks.

03

Bank isolated with the jumper out

A load switch now sits between the supply and the charger. With the ARM jumper out, the firing bank is disconnected from every supply and bled down.

04

A limit on short-circuit current

A 0.33 Ω resistor in the firing path keeps the current into a shorted output within the firing transistor’s ratings.

05

The processor cannot arm the gates

The processor reads the ARM jumper through a high resistance, so a processor pin driven high cannot stand in for the jumper. The fire command has an unused pin on each side of it on the processor package.

06

Assembled in one place

Every part, including the connectors and inductors, is fitted by the board assembler. The placement file is checked pad by pad against the assembler’s published part outlines.

07

A printed legend

Every connector is labelled with its function and polarity on both sides, with the sensor axes, test-point names, the status light’s colours, safety text and a serial-number box.

Development status

Where the project stands.

The first Rev B board was powered on December 2, 2026, with firmware 0.2.0. USB, the magnetometer and the flight log worked. With nothing connected to its output, the board fired at the wrong attitude, because its own parts put a magnetic field on the sensor stronger than the Earth’s. Firmware 0.3.0 adds a calibration that takes that field off. On December 3 it ran on a board on the bench: calibrated with RustMAD 0.3.0, the board passed the pad check, armed, and fired when it was turned across the field as the board read it. That is one board on a bench, not a flight, and none of the stages of the verification plan has been signed off on any board.

Done so far

  • Rev B schematic and four-layer board, both generated from one design definition
  • Design checks passed: electrical rules, board rules, and the fabrication files read back against the board
  • Fabrication and assembly files, with every part from the assembler’s parts library
  • First board powered on December 2, 2026, with firmware 0.2.0: USB, the magnetometer and the flight log worked
  • Firmware 0.3.0, which adds the magnetic calibration, and RustMAD 0.3.0 for Windows, both on the downloads page
  • Firmware 0.3.0 run on a board on the bench on December 3, 2026: calibrated, it passed the pad check, armed, and fired when turned across the field as the board read it

Still required

  • A check of the calibration’s accuracy on a board, and of the faults for a missing calibration and a failed pad check
  • Unpowered inspection and current-limited bring-up
  • Logic and sensor checks against a reference magnetometer
  • Inert firing-load tests across the input voltage range
  • Controlled initiator tests with statistical margin
  • Flight qualification: vibration, acceleration, EMI, brownout, thermal cycling and airframe magnetic calibration
  • Independent schematic, PCB, firmware and range-safety review

Follow the design.

How it works, the safety states and the verification plan.