Skip to content

xuqi2024/openflexure-microscope

Repository files navigation

OpenFlexure Microscope

项目概述

The OpenFlexure Microscope is a 3D printable microscope, including a precise mechanical stage to move the sample and foc* Robotic microscopy for everyone: the OpenFlexure microscope, Biomedical Optics Express 11 2447 (2020) (open access).

Building a microscopecs. There are many different options for the optics, ranging from a webcam lens to a 100x, oil immersion objective.

快速开始

了解项目

核心功能

1. 3D打印显微镜机身

  • 柔性机构设计: 使用塑料柔性机制实现亚微米级精度(~10mm范围内)
  • 模块化设计: 主体、光学模块、照明系统、载物台等可独立设计制造
  • 高精度运动控制: 无摩擦、无振动的精密定位,步进精度可达100nm以下

2. 多样化光学系统

  • 基础光学: 使用网络摄像头镜头(如树莓派相机模块)
  • 高分辨率光学: 支持标准RMS螺纹显微镜物镜(最高100x,油浸)
  • 可互换设计: 光学模块可快速更换以改变放大倍率和分辨率

3. 自动化控制

  • 电机驱动: 支持步进电机实现XYZ三轴自动控制
  • 远程控制: 基于树莓派的服务器软件,支持网页端控制
  • 精密定位: 机械杠杆系统提供精确的运动控制

4. 多种照明模式

  • 透射照明: 标准显微镜底部照明配置
  • 反射照明: 可选的顶部照明系统
  • LED照明: 低功耗、长寿命的LED光源

项目架构

目录结构

openflexure-microscope/
├── openscad/                    # OpenSCAD源代码文件
│   ├── microscope_parameters.scad  # 核心参数配置
│   ├── main_body.scad              # 显微镜主体设计
│   ├── optics.scad                 # 光学模块设计
│   ├── z_axis.scad                 # Z轴设计
│   ├── illumination.scad           # 照明系统
│   ├── feet.scad                   # 支脚设计
│   ├── gears.scad                  # 齿轮系统
│   ├── compact_nut_seat.scad       # 致动器座设计
│   ├── cameras/                    # 各种相机模块适配
│   ├── accessories/                # 附件设计
│   └── utilities.scad              # 实用函数库
├── build_system/                # 构建系统
│   ├── json_generator.py           # STL配置生成器
│   └── util.py                     # 构建工具
├── docs/                        # 组装文档
│   ├── 0_printing.md               # 3D打印指南
│   ├── 1_actuator_assembly.md      # 致动器组装
│   ├── 2a_basic_optics_module.md   # 基础光学模块
│   ├── 2b_high_resolution_optics_module.md # 高分辨率光学模块
│   ├── 3_illumination.md           # 照明系统组装
│   ├── 4_clips_and_wiring.md       # 夹具和布线
│   ├── 5_motors.md                 # 电机安装
│   └── 6_motor_controllers.md      # 电机控制板
├── design_files/                # 设计参考文件
├── build.py                     # 主构建脚本
├── build_docs.py               # 文档构建脚本
└── requirements.txt            # Python依赖

技术架构

1. 设计系统 (OpenSCAD)

  • 参数化设计: microscope_parameters.scad作为核心配置文件
  • 模块化架构: 每个组件独立设计,通过标准接口连接
  • 柔性机制: 基于塑料弹性变形的无摩擦运动机制

2. 构建系统 (Python + Ninja)

  • 自动化构建: build.py脚本使用Ninja构建系统
  • 多配置支持: 支持不同硬件配置的STL文件生成
  • Web配置器: 通过JSON配置文件支持在线STL选择

3. 核心组件设计

  • 主体结构: 集成XY载物台和Z轴系统的一体化设计
  • 致动器系统: 基于螺杆-螺母机制的精密致动器
  • 光学系统: 可适配多种相机和镜头的模块化光学设计
  • 照明系统: 可调节的LED照明和聚光镜系统

4. 电子控制系统

  • 硬件平台: 树莓派作为主控制器
  • 电机控制: Sangaboard等专用电机驱动板
  • 通信接口: 网络接口用于远程控制

预设配置

项目提供了三种标准配置:

  1. 高分辨率配置 (high_resolution_raspberry_pi)

    • 树莓派相机 + RMS物镜
    • 电机化控制
    • 适用于医学应用
  2. 基础配置 (basic_raspberry_pi)

    • 树莓派相机 + 简单光学
    • 手动控制
    • 适用于教育和低分辨率应用
  3. 低成本配置 (low_cost_webcam)

    • USB网络摄像头
    • 最经济的选择

相关项目生态

软件组件

硬件组件

支持工具

开发和定制

开发环境

  • OpenSCAD: 用于3D模型设计和修改
  • VSCode: 推荐的代码编辑器
  • Python: 构建系统需要Python 3.x
  • Git LFS: 用于管理文档中的图片文件

构建流程

  1. 安装依赖: pip3 install -r requirements.txt
  2. 运行构建: python ./build.py
  3. 生成STL文件到builds/目录

自定义参数

主要的自定义参数在openscad/microscope_parameters.scad中:

  • big_stage: 载物台尺寸(必须为true)
  • motor_lugs: 是否包含电机安装座
  • camera: 相机类型选择
  • optics: 光学系统选择
  • sample_z: 载物台高度
  • leg_r: 支腿半径(影响载物台尺寸)

A trio of microscopes

The trick of making a microscope out of a webcam has been around for a little while, and produces good results. However, getting a nice mechanical stage to focus the microscope and move around on the sample is tricky. This project is a 3D printable design that enables very fine (sub-micron) mechanical positioning of the sample and the lens, with surprisingly good mechanical stability. It's discussed in various media articles.

If you use the OpenFlexure microscope in you work please consider citing one of our papers:

快速开始

了解项目

Building a microscope

For up-to-date build instructions, STL files, and pre-built Raspberry Pi SD images, please head to the build a microscope page.

Instructions

The latest release of our assembly documentation can be found from the build a microscope page on our website. The editable instructions are Markdown format, in the docs folder of this repository. If you have a problem accessing the images after cloning the repository see the section on LFS files below.

Printing it yourself

Configure your microscope hardware and download the STL files through the microscope STL configurator page. The assembly instructions contain instructions on print settings and putting it together.

If you've built one, let us know. You can let us know on our forum, add yourself to the wiki page of builds, or submit an issue marked as a build report. This is a really helpful for us even if you don't suggest improvements or flag up problems.

Come join us!

Most of the development of this design has been done as part of various research projects - if you would like to join our research group at Bath, and you have funding or are interested in applying for it, do get in touch. Check the University of Bath jobs site, or findaphd.com, to see if we are currently advertising any vacancies. The team is bigger than Bath, though, and there are contributors in Cambridge, Dar es Salaam, and beyond.

Kits and License

This project is open-source and is released under the CERN open hardware license. We are working on bring able to sell kits through OpenFlexure Industries Ltd., and will update here once we have a good way of doing it.

Get Involved!

This project is open so that anyone can get involved, and you don't have to learn OpenSCAD to help (although that would be great). Ways you can contribute include:

  • Join our forum
  • Get involved in [discussions on gitter] (we use this less than the forum)(https://gitter.im/OpenFlexure-Microscope/Lobby) Join the chat at https://gitter.im/OpenFlexure-Microscope/Lobby
  • Share your microscope images (of both microscopes and what you've seen with them) on social media - you can mention @openflexure on Twitter.
  • Raise an issue on the helpdesk if you spot something that's wrong, or something that could be improved. Helpdesk issues can be about anything to do with the project including the instructions/documentation, the software, etc.
  • Suggest better text or images for the instructions.
  • Improve the design of parts - even if you don't use OpenSCAD, STL files or descriptions of changes are helpful.
  • Fork it, and make merge requests - again, documentation improvements are every bit as useful as revised OpenSCAD files.

Things in need of attention are currently described in issues so have a look there if you'd like to work on something but aren't sure what.

Developing

If you want to play with the OpenSCAD files or change the documentation, you should fork the repository. You can edit the documentation online in GitLab, or clone the repository if you want to edit the OpenSCAD files. You will need to clone the whole repository as the OpenSCAD files are dependent on each other.

Development environment

We mostly use VSCode to edit the OpenSCAD files, and then use OpenSCAD with the editor hidden and the "automatic reload and compile" option ticked. This is much nicer for a big multi-file project like the microscope than relying on OpenSCAD's built-in editor, and also works nicely with version control.

You can edit microscope_parameters.scad to change which options you build in the OpenSCAD window, but it's best not to commit changes to that file unless you need to change the default values.

Automatic builds

The build system is based on Python and Ninja, see compiling for more details.

Release flow

We use GitLab CI to manage builds and deployment.

The CI will build STL files that will remain on GitLab for 1 week when:

  • A merge request is submitted
  • A merge request is modified

The CI will build and deploy STL files and documentation to build.openflexure.org when:

  • A build is manually triggered from GitLab web
  • A release is tagged

The build server will mark a release as "latest" (build.openflexure.org/openflexure-microscope/latest) when a release is tagged, with a full semantic version and no suffix. For example:

  • v6.0.0 will replace "latest"

However, incomplete semantic versions will not replace latest. For example:

  • v6.0.1-beta.1 will not replace "latest" (pre-release suffix)
  • v6.1 will not replace "latest" (no patch version specified)
  • 6.0.1a will not replace "latest" (non-standard suffix)

LFS files

This repository stores images using Git LFS. This means that cloning the repository without Git LFS installed will only download placeholders for the images. Follow these instructions to install Git LFS.

With LFS installed Git will download the latest version of the images used in the documentation. If they are still missing try running:

git lfs fetch
git lfs checkout

Download all files

To make Git always download everything in the repository run the following commands in your terminal:

git config --local lfs.fetchexclude ""
git lfs fetch
git lfs checkout

Related Repositories

Other repositories relating to the Openflexure Microscope are in the OpenFlexure GitLab group. Particularly useful ones are:

Repositories for compatible motor controllers:

A number of other related projects include:

Some open flexure repositories still remain on Richard's Github.

Compiling from source

If you want to print the current development version, you can compile the STL from the OpenSCAD files - but please still consult the documentation for quantities and tips on print settings, etc. You can use Ninja build to generate all the STL files (run pip3 install -r requirements.txt and then ./build.py in the root directory of the repository). More instructions are available in COMPILE.md.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors