06 2025 Systems

Tandem t:slim X2 Insulin Pump Simulator

Qt-based simulation of an insulin pump with Control-IQ logic, CGM data, delivery tracking and alerts.

10:24 112 mg/dL Insulin pump sim
t:slim X2 sim
Built with
  • C++
  • Qt
  • Linux
  • Git

01

Overview

The Qt simulator window with profile, insulin and bolus controls, simulation time, battery and insulin levels, an event log and a glucose trend graph.
Simulator UI

This simulator replicates the full user experience of the Tandem t:slim X2 insulin pump using C++ and the Qt framework. Designed to emulate core insulin delivery workflows, it includes a realistic user interface, data visualization, dynamic insulin profile controls, and Control-IQ automation. The purpose of the simulation is to train users, support safe testing of insulin pump features, and help developers understand how such systems operate without relying on physical medical devices.

Key functionalities include CRUD management of personal insulin profiles, manual bolus delivery (including quick and extended), real-time graphing of CGM (continuous glucose monitoring) data, and simulation of alerts such as battery low, insulin level low, and blood glucose anomalies. Each simulated action is logged for audit and diagnostic purposes.

Control-IQ, the automated insulin delivery system, uses live CGM feedback to decide if basal insulin should be paused, resumed, or adjusted. The UI allows users to visualize insulin on board (IOB), insulin fill levels, and battery status. A lock screen, startup sequence, and system error handling are also implemented, mirroring real-world safety operations.

02

Design & testing

Product image of the t:slim X2 insulin pump with a Dexcom G6 sensor.
The device being simulated.

Technologies used

  • C++
  • Qt Framework
  • Linux (VM)
  • Git
  • Custom UI Rendering