Lessons and the learning game

Build a CubeSat flight computer

A 1U CubeSat's flight computer on the bench, with a real solar and battery circuit and a LoRa ground station beside it.

The finished satellite

Build a CubeSat flight computer runs every lesson on the same wiring:

  • The flight computer: an Arduino Uno. Flight computers on real CubeSats are often small microcontrollers like this one.
  • Temperature inside: a BME280, read register by register with the datasheet's integer formula.
  • Spin and the magnetic field: an MPU9250, its gyroscope for tumbling and its AK8963 magnetometer for Earth's field.
  • Power: a solar panel charges a LiPo battery through a 1N5817 Schottky diode, a 47 ohm resistor stands for the rest of the spacecraft, and an INA219 between the bus and the cell reads the current and voltage.
  • The downlink: a Ra-02 LoRa radio at 433 MHz.
  • Two lamps: green for the payload, red for safe mode.
  • The ground station: a second Uno with its own Ra-02 and a CONTACT button.

The catalog card for this course names an ESP32. The course builds on the Uno, which has the same sensors and radio and runs every lesson in the simulator.

How it works

The orbit. Kepler's third law gives the period, 2 pi times the square root of a cubed over Earth's gravitational parameter. At 400 km, where most CubeSats leave the International Space Station, an orbit takes 92.4 minutes: 56.4 in sunlight and up to 36.0 in Earth's shadow.

The power budget. The circuit is real: the panel's light slider is the Sun. In sunlight the cell charges at about 110 mA; in eclipse it carries the load at about 80 mA, and the blocking diode keeps the battery from draining back through the dark panel. The cell is shrunk to half a milliamp hour so an orbit plays out in seconds of simulation, where one second stands for ten minutes of mission time. Per orbit, energy in is the panel's power over the sunlit minutes and energy out is the load over all of them. A panel pointed badly makes the margin negative.

Telemetry. Housekeeping goes down in CCSDS-style frames: the sync marker 1A CF FC 1D, a 6-byte header with the APID, a 14-bit sequence count and the length, eleven bytes of data, and a CRC-16/CCITT. The ground station checks the CRC before it believes anything, and spots a missing frame by a gap in the count.

Beacon and safe mode. After deployment the satellite keeps 45 minutes of radio silence, as the CubeSat Design Specification asks, then beacons its callsign and health and answers a PING. Under 3.50 V it goes to safe mode, switches the payload off and beacons less often, and it only comes back over 3.80 V: two thresholds, so it never chatters between modes.

The course

Seven lessons in three chapters:

  1. Mission design: scan the bus, check the radio, and work out a 400 km orbit, its eclipse and its lifetime.
  2. Sensors: temperature limits, Earth's magnetic field, and tumbling.
  3. Power budget: sunlight, eclipse, the blocking diode, and the margin per orbit.
  4. Telemetry frames: a sync marker, a sequence count, a CRC, and a flipped bit caught on the ground.
  5. Beacon mode: the 45-minute silence, the first beacon, the duty cycle, and a ping.
  6. Safe mode: a long eclipse, shedding the payload, and hysteresis.
  7. Project: a ground pass: fly an orbit through an eclipse, make contact, download the log, and share the pass report.

Every checked step is tested against the running circuit.