C++ firmware built around a 6-phase finite state machine (INIT → CHECK → BUFFER → MARCHE → PAUSE → ERREUR)
All mechanical parts designed in Creo and made by 3D printing
Gallery
The removable biological unit and its case
Full CAD assembly in the case
Culture dish holder, wedges and magnetic connector mounts
From model to prototype: assembly in the case
The screen in MARCHE (running) mode: T = 37.1 °C for a 37.0 °C setpoint
The problem
How do you carry living cells for an hour-long train ride between Lausanne and Geneva without them dying on the way? Mammalian cells need 37 °C (enzymes degrade at the slightest deviation), humidity close to saturation (≈ 100 % RH, otherwise the medium evaporates and becomes cytotoxic) and a pH between 7.2 and 7.4, controlled by CO₂ injection.
Commercial solutions (Cellbox Go, Phoenix…) are designed for 12 to 72 h journeys. They are oversized and unaffordable for a one-hour trip. Hence the development of a custom prototype.
Specifications
Battery life ≥ 1 h with no mains socket
Weight < 10 kg, cabin-case size (45 × 36 × 20 cm)
Biological zone temperature: 37.0 °C ± 0.5 °C
Relative humidity: ≈ 100 %
Medium pH (via CO₂): 7.2 – 7.4
Preparation with no technical training: < 5 min
How we chose
For each subsystem, several solutions were described and then compared with a weighted decision matrix (scores out of 5, multiplied by each criterion's weight). The table sums up the chosen solution and the best alternative that was rejected.
Subsystem
Chosen solution
Score
Next alternative
Heating
Heating resistor
80
Peltier module (65)
pH control
CO₂ injection by solenoid valve
88
HEPES buffer (44)
Humidification
Passive cellulose sponge
102
Microporous membrane (74)
T / RH sensor
SHT35
77
DS18B20 (57)
CO₂ sensor
SCD40 + Nafion membrane
84
SCD40 alone (67)
Microcontroller
ESP32
100
Raspberry Pi (74)
Power
3S 5000 mAh LiPo + BMS
79
3S 2200 mAh LiPo (72)
The maximum scores differ from one matrix to another (different number and weight of criteria): compare them within a row, not between rows.
Chosen architecture
Everything is organised around a removable biological unit fitted inside the case. Each subsystem was chosen with a weighted decision matrix:
Heating — RS PRO 8.2 Ω wirewound resistor (50 W rated; at 12 V it dissipates P = U²/R = 144/8.2 ≈ 17.6 W), driven by an IRLZ44N MOSFET
Humidification — passive cellulose sponge (ratio of water available / water needed ≈ 2,500)
pH / CO₂ — CO₂ injection by solenoid valve: CO₂ tank → regulator → SMC V114 solenoid valve (normally closed) → biological zone
Measurement — SHT35 (T+RH, ±0.1 °C) in the biological zone; SCD40 + Nafion membrane (CO₂, ±50 ppm) outside the humid zone
Power — 2 × 3S 5000 mAh LiPo + BMS, 12 V DC-DC (resistor + valve) and 5 V regulator (ESP32 + sensors). Estimated battery life ≥ 2 h.
The three power loads (resistor, solenoid valve, fan) are switched the same way: a low-side IRLZ44N MOSFET, a 100 Ω gate resistor and a 1N4007 flyback diode that protects the transistor when an inductive load is switched off.
"Actionneurs" (actuators) sheet of the schematic (EasyEDA), in French — click to enlarge
What I'm proudest of: the "pick and place" system
The biological unit can be prepared in a controlled environment, then simply set down on its base. Magnetic connectors then make all the links automatically: power, sensors and the inner heating system connect in a single move, with no delicate handling.
Mechanical design
All parts were modelled in Creo and 3D-printed. The perforated base grid allows every mount to be anchored flexibly. The culture dish holder is made of two clip-together parts: the lower part holds the sponges and the SHT35 sensor; the upper part houses the fan and the CO₂ compartment with its Nafion membrane. Angled wedges and side plates hold the plastic container still against the train's vibrations.
Firmware — finite state machine
Firmware v4.0 (C++, ESP32-DevKitC) organises the behaviour around a 6-phase finite state machine:
Firmware v4.0.1 state machine — a single GO button drives every transition (diagram in French)
INIT — variables initialised, 3 s splash screen
CHECK — I²C scan every 2 s, SHT35 and SCD40 check
BUFFER — live T/RH/CO₂ display, waiting for the enclosure to be closed and GO to be pressed
MARCHE (running) — active control: on/off heating resistor, CO₂ injection by solenoid valve, timer
PAUSE — resistor off, fan kept on, back to MARCHE or BUFFER
ERREUR (error) — all actuators off, red LED + buzzer flashing, message on screen
Results and validation
The prototype was tested with the culture dish empty. Temperature, humidity and CO₂ stay within the target thresholds once running. Error handling works correctly: the actuators switch off and the alarm goes off as soon as a critical threshold is crossed.
Working prototype: display, control and safety features behave as expected in testing. Holding the temperature over a full hour has not yet been measured and logged.
Numerical simulation (not a measurement): 3-node thermal model with the firmware's real control law. Rises to 36.5 °C in ≈ 17 min, then oscillates between 36.8 and 37.5 °C; humidity above the 85 % threshold after ≈ 24 min, then ≈ 94 % (chart in French).
The simulation uses the firmware's control law (17.6 W resistor in on/off mode, 37.1 °C threshold, reading every 2 s) and a 21 °C ambient temperature. It shows two points to watch: slight overshoots above 37.5 °C, which justify moving to PID control, and measured humidity below 100 % as long as the air is warmer than the water in the sponge.
Next step: log a full hour of real measurements (the firmware already prints T and RH every 2 s on the serial port) to compare the model with reality.
Difficulties
Housing — aligning the biological unit with the connectors was hard, hence the adjustable base that leaves some positioning play
Sealing — the container had to be made airtight
Components — an ordering problem
The most demanding part: fitting the whole project into the case, protecting the CO₂ sensor from humidity, and going from a clean 3D model to the real assembly
What I take away
A real systems project under demanding biomedical conditions: combining precise control, embedded electronics, mechanics and the constraints of living cells, with a prototype that genuinely holds its parameters.
Outlook
Remote Wi-Fi monitoring — real-time T, RH, CO₂ on a phone during the journey (native ESP32 Wi-Fi)
PID temperature control to limit oscillations around 37 °C
Logging the parameters for the whole journey to validate cell viability
A Peltier module to cool as well — adapting to other cell types