Skip to content

About

Centralized Graphical User Interface to control all components of a Miniaturized Molecular Beam Epitaxy (MBE) setup

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Forks Stargazers Issues License


miniMBE GUI logo

miniMBE GUI

A desktop app to run a Mini-MBE (molecular beam epitaxy) system from one window.
Move the sample stage, draw patterns from DXF files, and watch pressure, temperature, flux and camera feeds.

Report a Bug or Request a Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Project Structure
  5. Contributing
  6. License
  7. Acknowledgments

About The Project

miniMBE GUI, Main tab

The miniMBE GUI controls the Mini-MBE system of the Yang Research Group at the University of Chicago. It replaces the vendor's LabVIEW interface with one Python app. The app also adds logging, alerts and pattern drawing that the vendor tool does not have. The screenshots show the app with no hardware connected.

Main features:

  • Manipulator control. Move the X, Y and Z axes, home them, stop them, and see the position on a live 2D canvas. The axes use three SMCD14 stepper controllers over Modbus TCP.
  • DXF pattern execution. Load a CAD drawing, check it in a coordinate checker (bounds, large jumps, speeds), then run it. You can set separate print and travel speeds, pause and resume, and see progress and time left. A stop-and-go mode supports very slow deposition speeds.
  • Temperature and pressure. Read up to 8 temperature channels and 2 pressure gauges, log them to CSV, and plot them. The app can send an email when the pressure goes above a limit.
  • E-beam source. Set high voltage, emission current and filament current. Watch the flux and log it to CSV.
  • Camera. Live video of the chamber with exposure and gain sliders.
  • Modbus log. Record every Modbus message with timestamps to help debug the hardware.

miniMBE GUI, E-Beam tab

(back to top)

Built With

(back to top)

Getting Started

Prerequisites

  • Python 3.11 (the repo pins 3.11.3 in .python-version).
  • The hardware you want to use. The app starts without hardware, but the related panels show "Disconnected".
Device How it connects Default setting
3 × SMCD14 stepper controllers (X, Y, Z) Modbus TCP host 169.254.151.255, port 502, slave IDs 1, 2, 3 (controllers/manipulator_manager.py)
Temperature reader TCP/IP 192.168.111.222 (services/temperature_controller.py)
Pfeiffer vacuum gauge Serial (RS-232) COM4, 9600 baud
E-beam power supply and flux sensor Serial COM5 (services/ebeam_controller.py)
Allied Vision camera VmbPy needs the Vimba X SDK

Change the defaults in the files named above to match your setup.

Installation

  1. Clone the repo.
    git clone https://github.com/JacquesAttinger/Mini-MBE-Graphical-User-Interface.git
    cd Mini-MBE-Graphical-User-Interface
  2. Create a virtual environment and install the packages.
    python -m venv .venv && source .venv/bin/activate
    pip install -r requirements.txt
  3. Create the email credentials file (see Email alerts). The temperature tab imports it, so the app needs this file to start.
    cp email_credentials.py.template email_credentials.py
  4. Start the app.
    python app.py

To run the tests, install the development packages and run pytest:

pip install -r requirements-dev.txt
pytest

Email alerts

The Temp/Pressure tab can email you when the pressure goes above a limit. It sends mail through Gmail with an app password.

  1. Create an app password at Google App Passwords.
  2. Fill in email_credentials.py:
    ALERT_SENDER = "your-sender@gmail.com"
    ALERT_RECEIVER = "your-email@gmail.com"
    GMAIL_APP_PASSWORD = "your-16-char-app-password"
  3. Never commit this file. It is in .gitignore.

If you do not want alerts, leave the placeholder values. The app still runs, and the email step fails quietly.

(back to top)

Usage

A typical run looks like this:

  1. Start up. Run python app.py. Check that the three axes show as connected on the Main tab. Open the Camera and Temp/Pressure tabs to check the chamber.
  2. Prepare. Start the temperature and pressure log. Set the e-beam source and start the flux log. Move the sample to the start position on the Main tab.
  3. Load a pattern. Click Load DXF and pick a file. Enter the origin where the pattern goes. Read the coordinate checker: vertex count, bounding box, and large jumps (shown in orange). Set the print speed and the travel speed, then accept.
  4. Run it. Click Start Pattern and confirm the prompt. Watch the progress, time left and position. Click Pause Pattern to stop and later resume from the same point.
  5. Finish. The app stops logging when the pattern ends. Find the logs in logs/: temperature and pressure CSV files, flux CSV files, and Modbus logs if you enabled them.
  6. Emergency. Use the Stop button on an axis to stop it. Close the confirm dialog to abort before a pattern starts.

To log every motion command for debugging, start the app with:

python app.py --motion-log

(back to top)

Project Structure

├── app.py                  # Entry point
├── controllers/            # Hardware control (SMCD14 motors, multi-axis manager)
├── services/               # Camera, sensors, e-beam, data loggers, DXF loading
├── widgets/                # UI panels for each tab
├── windows/                # Main window
├── utils/                  # DXF parsing, speed and Modbus helpers
├── SMCD14_LV2020/          # Vendor LabVIEW project for the SMCD14 (reference)
└── tests/                  # Tests and hardware test scripts

(back to top)

Contributing

Bug reports and ideas are welcome. Please open an issue and describe what you saw or what you need. This project does not take pull requests at this time.

(back to top)

License

Distributed under the MIT License. See LICENSE for details.

(back to top)

Acknowledgments

  • The Yang Research Group at the University of Chicago, for the Mini-MBE system this app controls.
  • The SMCD14 LabVIEW project and manual from the controller vendor.
  • Best-README-Template

(back to top)

About

Centralized Graphical User Interface to control all components of a Miniaturized Molecular Beam Epitaxy (MBE) setup

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages