From MCU lessons to simulation and SITL activities

Choose to practise designing a drone set, reading a log, or studying mode changes in SITL, with objectives, steps, worksheets and verified example events from ArduCopter.

Last updated:

A development board connected to a debugger beside a log graph and an oscilloscope on a control-system analysis bench
A concept rendering created with AI; it is not a screenshot or a device model with confirmed support

Choose by objective

These activities link knowledge through scenarios and evidence. They do not connect DroneSim to Arduino/ESP32/STM32 or run firmware in the web page. Start with the activity that answers your own question; no real board is needed

Choose a question: design in DroneSim, read the timing in a PC set, or study the states in SITL firmware

  1. Want to know what drone set to build: Design the set and plan a mission in DroneSim links the foundation chapters on input/process/output and the limits of the system
  2. Want to know whether data arrives late or is lost: Read the log of a PC set links the queue, timing and freshness; no drone set needs to be built
  3. Want to know why the firmware changed mode: Read the SITL events links failsafe with state and clock; no firmware needs to be installed to read the existing examples

Activity worksheet (CSV) · Answer key and checking criteria · Condensed SITL events with sources (JSON) · File list and SHA-256

Activity 1: design a drone set to answer a mission

Objective: explain what each component was chosen for, and identify the data that still must be checked in a real system Prerequisites: Arduino/ESP32 and signals Suggested time: 30-45 minutes, not yet measured with learners

  1. Open DroneSim and choose the training objective before building the set: design/assemble an FPV drone, simulate an autonomous mission, or a practice field and Replay. Read the description of the chosen design
  2. Build the drone set, choosing the mission and all the components. Record the names of the set/components/conditions shown on the web page and the reasons for the choices. Keep the original set as a baseline before changing just one item
  3. For the practice field, read the rules and confirm before starting: the autopilot system passes 3 checkpoints, a score of 0-3 within a 120-second frame, with a collision proxy and a Replay according to the rules the web page defines
  4. Watch the Replay and note the events and the differences from the baseline. Do not conclude that the score changed because the MCU ran faster, since the web page does not measure an MCU or run the firmware of that set
  5. Write an input -> process -> output diagram of the design. State the MCU requirements that need further checking, such as sensor input pins, buses, memory, the timing budget and behaviour when data is lost. Cite the control pathway in the firmware chapter

Recommendation: start the scene and the conditions from the original; keep before/after images of the set with a list of what changed. Work check: clear mission 1, reasons for choosing/changing components 1, signal diagram 1, limitations and what will be measured in reality 1 point. The field score is not used in place of remote-control piloting skill or as NIST certification

Activity 2: separate old data, a full queue and lost transmission slots

Objective: read what the log can tell, without filling in data that does not appear Prerequisites: the queue from an ISR and Freshness Gate Suggested time: 30 minutes

  1. Open the log-reading tool , choose 'old data without loss', analyse, and then identify the fresh/stale rows and the units in the graph
  2. Switch to 'queue and Serial together', compare the first/last counter and the delta, and separate the result from stale. Check the equation delta_tick = delta_overflow + delta_dropped + 1
  3. Switch to 'cumulative totals from before the visible window' and explain why unchanged totals of 7/3 give a delta of 0/0, while an 'unexplained skipped tick' must be rejected
  4. Fill in the worksheet with rows or JSON results and write 'what is seen / what cannot yet be told / evidence to collect further'. Do not put SITL JSON into this tool, because the tool accepts only the six-column CSV of the Freshness set

Recommendation: keep the original file; do not add a cutoff or edit a counter to make it pass. The graph uses row order, not time. Statistics use every row, but a graph over 1,000 rows selects points Work check: reading state 1, delta 1, rejecting wrong data 1, limiting the conclusion to match the clock/capture 1 point

Activity 3: trace the cause of a mode change from the firmware log

Objective: separate a tester's command from a GCS failsafe Prerequisites: PID, failsafe and firmware Suggested time: 45 minutes

The condensed event set is selected from the earlier results of 1 October 2026 , using ArduCopter 4.7.1 official Linux x86_64 with a single quad model, one run per case, with no new run in this round of adding the lesson. The source build is separate from the official binary used in the experiment. Read the SHA and sources in the JSON/original set

  1. Open the condensed events and the original answer key and check the case names, binary version and the parameters recorded. In this set, FS_GCS_ENABLE=5, FS_GCS_TIMEOUT=5, FS_OPTIONS=0 has read-back results according to the protocol
  2. Trace baseline: armed -> reaches the gate -> send a LAND command -> observe LAND -> disarmed, then compare with gcs-loss: armed -> reaches the gate -> stop sending the heartbeat -> observe LAND/the GCS Failsafe message -> disarmed, without sending a LAND command
  3. Compute the interval from the host observation in gcs-loss: 64.711191 − 60.031862 = 4.679329 s after the program stopped sending, or 64.711191 − 59.635100 = 5.076091 s after the last heartbeat the host sent. The figure in the answer key is rounded to 4.679 s
  4. State that the stop-sending boundary and the last heartbeat differ, and that a host observation is not the time of the internal trigger check in the firmware. Do not subtract the time_boot_ms of the firmware from the t of the host without converting clocks
  5. Check the full set with traces/accepted commands and the protocol (ZIP) before concluding the cause. The condensed JSON does not replace the whole trace. If planning a new run, follow the manual in a separate environment as specified, not connected to a real aircraft

Recommendation: read the mode together with the events/commands and the armed state; do not decide from a single message Work check: the order of events in the two cases 1, equations with units 1, the clock/boundary difference 1, the scope of one run/model/not a real board 1 point

According to the ArduPilot GCS failsafe documentation , the check uses the heartbeat and the response relates to parameters/state. The values in this activity are the protocol of the earlier results, not values recommended for copying to a real aircraft

Compare what can be confirmed

  • DroneSim: Events and scores follow the web model and do not confirm the MCU, the firmware, remote-control piloting skill or flight safety
  • MCU PC set: logic/synthetic data or CSV according to the verified contract; does not confirm IRQ latency, a real board or complete capture
  • Firmware SITL: The behaviour of the firmware/model/parameters and the recorded run; does not confirm wiring, the dynamics of a real aircraft or timing on an STM32

PX4 is another study pathway; see the v1.16 architecture and then choose the source/target/module to check separately. This activity has no new PX4 run results and does not regard PX4/ArduPilot as giving equal results

Three levels of understanding check · Drone simulation overview · Seven advanced chapters

Prepare to collect evidence from a real board

A guide to preparing UNO/ESP32/STM32 experiments, with worksheets Check the wiring version, source/core clock and raw files before concluding the results. The guide is ready to use, but the real upload/measurement still awaits equipment

Used in courses

How to cite this page

Drone Institute, Rangsit University. (2026). From MCU lessons to simulation and SITL activities. In UAS Technology Knowledge Hub (B.Tech.). https://rsu-uat.pk-research.work/en/kb/knowledge/microcontrollers/sim-activities/

Original from Drone-Hub: https://drone.pk-research.work/knowledge/microcontrollers/sim-activities/ · © PK-Research