About

A microscope on display

The OpenFlexure Microscope is an open-source 3D-printed microscope, including a precise mechanical stage to move the sample and focus the optics. There are many different options for the optics, ranging from a webcam lens to a 100x, oil immersion objective.

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 and a paper in Review of Scientific Instruments (open access).

Assembling Hardware

To build the microscope, go to version 5.20 release and download the STL files and instructions. Don’t just print everything from the STL folder, as there are a number of different configurations possible. The assembly instructions contain instructions on what parts to print and how to build it.

For more details, and full source files, see openflexure-microscope on GitLab.

Installing Software

On the Raspberry Pi (microscope server)

You can download the latest pre-built image with the OpenFlexure software installed here.

Alternatively, you can install all of the required software onto a fresh Raspbian installation using our quick-installer. It’s best to start with an SD card that has been flashed with the latest version of Raspbian. If your Raspbian installation is too old, it will probably fail.

From the terminal, run curl -LSs get.openflexure.org/microscope |sudo bash and follow the on-screen instructions.

Documentation for the microscope server can be found on Read the Docs. This includes documentation and tutorials on developing plugins for the microscope software.

On a client device (remote control)

We reccommend using the OpenFlexure eV client software for controlling the microscope, both on the Raspberry Pi, and on remote devices. OpenFlexure eV is available for Windows, Linux, and as a web app. Installers can be downloaded from our downloads page.

Full source code is available at openflexure-ev on GitLab.

Connecting and Using

Use directly on the Raspberry Pi

A microscope on display

Since the microscope uses a Raspberry Pi to control the hardware, by connecting a display, mouse, and keyboard, you can use OpenFlexure eV on the microscope directly. You can launch OpenFlexure eV from your application menu, under ‘Other’.

From here, ensure that the ‘Connect locally’ option is checked, then click ‘Connect’. After a few seconds, you should see a live preview of the microscope camera, and full software control over the device.

Controlling the microscope remotely

Through an existing network

OpenFlexure eV works by sending commands to the microscope over a network connection. This means that if the Raspberry Pi is connected to the same (wired or wireless) network as your laptop, for example, you can remotely control the microscope from that device. In OpenFlexure eV, on your remote device, select ‘Connect remotely’, enter the IP address of the Raspberry Pi in your microscope, and click ‘Connect’.

Direct via ethernet

On most modern computers, you can simply connect the Raspberry Pi directly to the device via an ethernet cable for simple, high-speed control. For many applications using a single microscope, this is a preferred setup. Generally, you don’t even need to know the IP address of the Raspberry Pi in this case. In OpenFlexure eV, on your remote device, select ‘Connect remotely’, enter raspberrypi.local as your hostname, and click ‘Connect’.

Direct via WiFi

Finally, the Raspberry Pi can broadcast it’s own wireless hotspot. By connecting another device to that hotspot, OpenFlexure eV can again be used for remote control. Generally, this is much slower than using an existing network, or a direct connection. However, it allows the microscope to be accessed wirelessly when no other network is available. Again, in OpenFlexure eV, on your remote device, select ‘Connect remotely’, enter raspberrypi.local as your hostname, and click ‘Connect’.