DIY microscopy

From Hackteria Wiki
Revision as of 23:43, 10 February 2011 by Dusjagr (talk | contribs) (Image Processing and Analysis)
Jump to: navigation, search

DIY microscopy


To use a simple usb webcam as a microscope, only a few modifications are needed.

Diy microscope steps.jpg

In short, a small hack to the optics of a standard webcam with an adjustable focus-lens, allows to create video data, with a magnification of around 100 to 400x (depending on the model) at a working distance of a few mm. The highest magnifications can be achieved by inverting (putting upside down) the lens. Addition of good lighting by the use of leds allows to create images using a bright-field method (shine through the stuff) or dark field method (look at the reflections and scattering).

dark-field image sequence (4 sec) of an amoebae recorded on a modified webcam
bright-field image sequence (4 sec) of an amoebae recorded on a modified webcam

Video Examples

Movie recorded with modified webcams: Hackteria in Berlin

see more on wetPONG


Hacking the webcam


Step1: get a standard webcam, make sure u got the right drivers for your OS


Step2: break it open. of course take care not to destroy anything


Step2: break it open. of course take care not to destroy anything


Step2: break it open. of course take care not to destroy anything


Step2: break it open. of course take care not to destroy anything


Step2: break it open. of course take care not to destroy anything


Step2: break it open. of course take care not to destroy anything

Further modifications

mounting the microscope

There are many ways to finally build the microscope itself. here are a few examples from the workshop hackteria & lab_hacking @ NK, Berlin.

Simple microscope setup


Fixed, massiv and stable setup


Silicone embedded setup


Tape and cardboard setup


Magnification and Field of View

See: fieldofview for more details.

after completing the hack with the lenses, the magnification can be increased upto a field of view of 0.7 mm.

InversedMagnification.jpg Nematode.jpg

Where to get them, and which models

Ebay webcams.png

Am besten auf ebay aus hongkong bestellen (5-10 CHF). Billige modelle eignen sich generell am besten. an sonsten in mediamarkt oder pearl vorbei schauen (15-20 CHF).

deal extreme

hacking a digital camera

Cam ani big.gif

some notes about DIY microscopy

For more enlargement, you can not only invert the lense but also put some (iron) rings between the lense and the "webcam" and fix it with duct tape. The more rings you put between the more light you will need that you can see something. 5mm works without problems, the light from 1-2 LEDs will suffice to see the things.

For savers: A cheap solution is a standard logitech webcam, which can be bought for about 25.- SFr. --> videos(500x600), pics (3MPixel)

Links on Microscopy


Anthony van Leeuwenhoek Self-made Scientist, Father of Microbiology & Microscope Inventor

General Resources


Sehr guter und interaktiver Überblick der Lichtmikroskopie

Microscopy-UK Resources

ROTHAY HOUSE: Using the Digital Microscope, Brian J. Ford

File:Fords digital

DIY Microscopy

Hackteria DIY Microscopy

Hackteria DIY Microscopy wiki

SYNBIO - Link Sammlung zu Mikroskopie im Selbstbau


Pure Data


pure data

Pd (aka Pure Data) is a real-time graphical programming environment for audio, video, and graphical processing. It is the third major branch of the family of patcher programming languages known as Max (Max/FTS, ISPW Max, Max/MSP, jMax, etc.) originally developed by Miller Puckette and company at IRCAM. The core of Pd is written and maintained by Miller Puckette and includes the work of many developers, making the whole package very much a community effort.

Image Processing and Analysis




ImageJ is a public domain Java image processing program inspired by NIH Image for the Macintosh. It runs, either as an online applet or as a downloadable application, on any computer with a Java 1.4 or later virtual machine. Downloadable distributions are available for Windows, Mac OS, Mac OS X and Linux.


Ccv nui.jpg

CCV Community Core Vision, CCV for short (aka tbeta), is a open source/cross-platform solution for computer vision and machine sensing. It takes an video input stream and outputs tracking data (e.g. coordinates and blob size) and events (e.g. finger down, moved and released) that are used in building multi-touch applications. CCV can interface with various web cameras and video devices as well as connect to various TUIO/OSC/XML enabled applications and supports many multi-touch lighting techniques including: FTIR, DI, DSI, and LLP with expansion planned for the future vision applications (custom modules/filters).

This project is developed and maintained by the NUI Group Community, We encourage you to get involved.

Webcam and Video




VideoLAN is a project, run by volunteers, backed-up by a non-profit organisation, which produces free and open source software for multimedia, released under the GNU General Public License.




AMCap is a small yet fully functional video capture application compatible with Microsoft DirectShow.




macam is a driver for USB webcams on Mac OS X. It allows hundreds of USB webcams to be used by many Mac OS X video-aware applications. The aim is to support as many webcams as possible.


GTK+ UVC Viewer

This project aims at providing a simple GTK interface for capturing and viewing video from devices supported by the linux UVC driver, although it should also work with any v4l2 compatible device.