Overview
Our software stack spans embedded C++ for microcontrollers and a lightweight HTML web UI. It controls two critical devices in our project: a 2‑axis clinostat for microgravity simulation and a PHBV filament extruder (built on Marlin firmware). The UI, interactions, and visual accents mirror our Entrepreneurship page—look for orange-highlighted key phrases and compact accordions throughout.
Clinostat Software
Introduction
To better prepare for human migration to Mars, our team designed a 2‑axis clinostat to simulate microgravity and mimic real space conditions for E. coli. This software component, written in C++ and HTML, works with our clinostat to provide a convenient way to access it via cell phones.
Coding can be a different world—especially for newcomers. For iGEM teams interested in space-related topics, that learning curve can be a barrier. We therefore developed software that simplifies communication with the clinostat so anyone can use a phone to control the clinostat and set the desired conditions.
Set up the Arduino IDE & Upload the Code
This software runs on Arduino‑compatible motherboards. Use the Arduino IDE to edit and upload the code. Some easy‑to‑miss but important steps:
- Be sure to select the exact Board and Port matching your motherboard.
- For Arduino ESP8266 Wi‑Fi, choose board:
LOLIN(WEMOS) D1 R2 & mini. - Adjust the Upload Speed if needed—hardware setups vary.
Once configured, copy and upload the code from our repository: GitLab repository ↗. The only parameter you must modify is the Wi-Fi credentials so the board can connect to the Internet.
Accessing the Web Server
After entering valid credentials, power on the board. It will connect to the specified Wi‑Fi or hotspot and display an IP address. Enter that IP in your browser to load the local web page.
Controlling the Clinostat (UI Options)
The web interface provides full control with three UI layouts to choose from. All include a master On/Off and Test Connection. Depending on the layout, you can:
- Individually drive each servo
- Adjust servo ratio
- Set RPM per axis
These cover the full range of typical clinostat applications.
Extruder Software
Introduction
To utilize the PHBV produced by engineered E. coli, our modeling team built a filament extruder to process it into uniform, high‑quality bioplastic filament for 3D printing. Our software builds on the Marlin firmware and manages the heater temperature, push motor, and winder motor to automate and stabilize extrusion while enforcing safety.
We chose Marlin because it is free, open‑source, and includes a comprehensive safety framework that guards against overheating and hardware damage. To suit our needs, we trimmed features to maintain a simple, focused build. Modified files are available in our repository: [Link].
VS Code Installation
Download from the official site: code.visualstudio.com.
PlatformIO Installation
Open the Extensions panel in VS Code, search PlatformIO, and install. An alien‑shaped icon will appear in the sidebar.
Install Marlin
Download Marlin from marlinfw.org. As of writing, the latest release is 2.1.2.5. Extract the ZIP, then open the folder in VS Code.
Key Modifications
1) Basic Settings
We used a Creality STM32F103RE board. Ensure the environment in platformio.ini and
Configuration.h matches your motherboard’s layout and pins. The chosen environment tells the firmware which hardware to talk to and how.
Marlin maintains example configurations for many boards: GitHub examples.
2) LCD Control
We simplified the default LCD menu to just what we need: Temperature,
Push Motors, and Shutdown. Modify Configuration_adv.h to enable a
custom menu (uncomment the relevant block and set menu_main_title, e.g., “Test 1”). Then update
menu_main.cpp to define the actual options and actions. For convenience, copy our version from the repository.
3) Thermistor
The thermistor is core to safety. In Configuration.h, set the sensor type to
1 to indicate a connected thermistor and enable temperature monitoring.
Available Functions (Test 1)
- Set Temp: 200 °C / 230 °C
- Push: Fast / Slow
- Safety: Turn Off Heater, Push Stop, Shutdown All
Selecting an option sends the corresponding G‑code to the board (e.g., M117 sets an LCD message;
M104 sets target temperature; G91/G90 toggles relative/absolute motion; long moves (e.g., Z/Y 999999)
support continuous extrusion; M410/M18 are quick stop / disable motors).
Other Applications
Beyond clinostat control, the same platform can set speed or speed ratios for devices like stirrers, incubator fans, and even 3D printers. With added sensors (light, temperature, CO₂, pH) and attachments, the system can plot data in real time to aid analysis and future iterations.
Key Design Choices
- Motherboard: Arduino D1 Wi‑Fi Uno ESP8266 with built‑in Wi‑Fi—no extra modules required.
- Language: C++ (Arduino IDE). Compiles to machine code for speed and low‑level control.
- Inputs: Intuitive sliders for ratios; direct RPM entry for advanced users.
- Control: A master On/Off switch ensures safe sample loading/unloading.
Future Directions
- ESP8266 supports only 2.4 GHz Wi‑Fi; consider newer boards for 5 GHz support.
- Wi‑Fi credentials must be updated per network—initial setup still requires a computer.
- Add an LCD screen for computer‑free configuration.
- Integrate sensors (e.g., accelerometer / tachometer) for real‑time velocity/acceleration feedback.
References
- Autsou, S., Kudelina, K., Vaimann, T., Rassõlkin, A., & Kallaste, A. (2024). Principles and Methods of Servomotor Control: Comparative Analysis and Applications. Applied Sciences, 14(6), 2579. https://doi.org/10.3390/app14062579
- mybotic. (n.d.). How to Use Arduino WeMos D1 WiFi UNO ESP8266 IOT IDE Compatible Board by Using Blynk. Instructables. Retrieved October 6, 2025, from https://www.instructables.com/Arduino-WeMos-D1-WiFi-UNO-ESP-8266-IoT-IDE-Compati/
- MarlinFirmware/Marlin. (2025). [C++]. Marlin. https://github.com/MarlinFirmware/Marlin (Original work published 2011)
- thinkyhead. (2025, October 5). Installing Marlin. Marlin Firmware. https://marlinfw.org/docs/basics/install.html