DIY microscopy

From Hackteria Wiki
Jump to: navigation, search

Nice Instruction

The Chapter about the DIY microscope can be downloaded here.

Home Made Bio Electronic Arts Do-it-yourself: Microscopes, Sensors, Sonifications - Christoph Merian Verlag / Migros-Kulturprozent: Dominik Landwehr, Verena Kuni (Ed.), 2013

The Chapter about the DIY microscope can be downloaded here.

DIY microscopy chinese.png

And available now with Chinese translation included! Thanks to I-Chern Lai and Dimension+! Download it here


See the other chapters of Book: Homemade Biological Art

DIY microscopy

Arrangement of microscope.jpg


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

Webinar on DIY microscopy English / Portuguese

Video Examples

Movie recorded with modified webcams: Hackteria in Berlin

see more on wetPONG

Laser-cut microscopy stages

Laser-cut microscopy stages are here.

SwitchableMag DIY-microscope MaryWard.jpgTaiwanStyle MicroscopeStage.jpg


The Chapter about the DIY microscope can be downloaded here and available now with Chinese translation included! Thanks to I-Chern Lai and Dimension+! Download Chinese


Thanks for helping us translating this instruction. If you don't have an account on this wiki, contact dusjagr.

DIY Mikroskop Anleitung (Deutsch)

DIY Microscopy Instruction (Chinese)

DIY Microscopy Instruction (Portuguese)

DIY Microscopy Instruction (Spanish)

DIY Microscopy Instruction (Italian)

DIY Microscopy Instruction (Bahasa Indonesia)

DIY Microscopy Instruction (French)

DIY Microscopy Instruction (Japanese)

DIY Microscopy Instruction (български)

DIY Microscopy Instruction (Finnish)

DIY Microscopy Instruction (Slovenian)

DIY Microscopy Instruction (Hindi)

DIY Microscopy Instruction (Serbian)

DIY Microscopy Instruction (whadever language)

0. Introduction and Materials

Making the DIY MICROSCOPE includes converting an ordinary webcam into a microscope. The webcam’s conversion can be quickly effected manually. The electronics remains unaltered, only the position of the lens is changed. A solid platform enables fixing and accurately focusing the tiny study objects. The objects are illuminated with a light-emitting diode (LED).

The DIY MICROSCOPE consists of three components, assembled in this sequence:

  • Converted webcam
  • Stable platform for observation
  • Illumination with a light-emitting diode (LED)

Parts/Material List

DIY-Microscope Instructions Materials.png


  • 1 webcam
  • Cardboard (thick) / wood, 20 x 30 cm
  • Foamboard, 20 x 30 cm
  • M4 adjustable screw, approx. 15 cm long, with fitting screw nuts
  • Duct tape
  • Blu-Tack adhesive
  • Hot glue
  • Rubberbands


  • Cutter / sharp knife
  • Screwdriver, small
  • Hotglue gun
  • (optional) Soldering iron

Optional external LED light source

  • 1 switch
  • 1 white light-emitting diode (LED)
  • 1 battery (9V)
  • 1 wired battery connection
  • 1 resistor (1 k Ω )
  • 1 potentiometer (20 k Ω )
  • 30 cm insulated wire
  • Garden wire

Microscopy and Micro-Hunting equipment

  • Some transparent plastic cups
  • Glass slides
  • Petri dishes, made of plastic or glass
  • Disposable pipettes
  • Waterproof pen
  • Small chrome steel spoon
  • Tweezers
  • Sealable plastic containers for samples

1. Conversion of the webcam Part A: Small enlargement

Step 1 get stuff.jpg

  • A selection of standard webcams. Best suited are models allowing for manual adjustment of focus by turning the ring on the lens. The only solution is by trial and error.
  • Before the camera is modified, it needs to be tested. For that it has to be connected to a computer, and additionally the necessary drivers have to be installed. Webcams run with Windows, Mac, or Linux.

Step 2 screw lens outwards.jpg

  • Already with this configuration the webcam can be used to inspect objects up close. You only need to screw out the lens a little and move closer to the object. A pocket lamp improves lighting conditions.
  • Pointing the webcam on tiny objects produces surprising effects: Even without modifications one begins to see things hidden to the naked eye.

1. Conversion of the webcam Part B: Maximal enlargement

Step 3 invert lens.jpg

  • Now we begin dismantling the webcam. The screws are removed. Partly such screws are hidden beneath labels or rubber caps. With a solid tool – in this case the screwdriver of a Swiss Army knife – the webcam ’s cover is removed.
  • The appliance ’s interior can now be seen: it consists of optics and an electronic switch. We can do without the light-emitting diodes (LEDs). We shall later construct our own light.
  • The optics is partially glued on. By careful twisting we can detach it from the electronics. The optics’ outer ring (at the right of the picture) will no longer be used later. It only serves as decoration.
  • With the use of a strong side cutter we cut through the plastic casing. Now the electronics including all wires and the USB cable can be removed from the casing.
  • The webcam’s interior: on the left side of the picture we can see the internal microphone, which, however, is not needed for our project.
  • Now we place the optics upside down on the fitting. It can no longer be screwed on and must therefore be firmly secured. The optics is attached with a piece of duct tape.
  • To test the equipment we connect the modified webcam with the computer and point the lens towards the screen. Now the individual

RGB pixels on screen become visible.

2. Construction of the platform

Step 4 make stage.jpg

  • Using small lumps of Blu-Tack adhesive, the webcam is attached to a solid pasteboard of about 15 x 15 cm.
  • The platform’s side wall consisting of scale model cardboard. With a pencil we draw the height of the lens on it and cut off the cardboard along that line. We use hot glue for pasting.
  • Using a carpet cutter, we cut a rectangular opening into another piece of scale model cardboard. This piece too is attached with hot glue.

Step 5 adjustable focus.jpg

  • The adjustable screw requires a hole. We attach the screw nut right at the top with a small drop of hot glue. Then we insert the adjustable screw. It must reach down to the lower platform.
  • Rubber bands provide more stability to the platform. With the screw the scale model board can now be moved up and down by a few millimeters.

3. The light source

Step 6 add ligthing.jpg

  • Our microscope also has a light source in the form of a light-emitting diode (LED). The lighting can be easily produced by oneself.
  • In this easy way, the wires can be twisted together. But it is safer if they are solded on.
  • The centimeters long feed of our light source is wrapped with garden wire. The wire thus becomes pliable and later can be attached in any position.
  • The light source, potentiometer and battery are attached to our construction with hot glue. Our DIY MICROSCOPE is ready for use.

3.B Hacking the LEDs from the Webcam (to be documented)

  • Coming soon

4. Using the Microscope and Hunting for Microorganisms

Step 7 go hunting.jpg

  • The USB cable of the converted webcam is connected to the computer. Now we can begin with our examinations.
  • The study objects are placed on a glass slide and can be shifted by hand. The microscope’s focus is regulated by the adjustable screw.
  • As with a professional microscope, with our DIY tool we are able to take electronic photos and even films. Photos and films are digitally available, can be further processed and of course be easily published on the Internet.

The Stage

Microscopes overview.jpg

More info about stage designs and laser-cutting files are on Laser-cut microscopy stages are here.

Other Instructions

Different samples

Webcam micro images.jpg

old stuff

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
Webcam easy hackable.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

Booklet for printing and folding (for kids and only in german)

File:Zine empty layout nina2.pdf

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)

Makerversity DIY version

Selection 906.png

Links on Microscopy


General Resources

DIY Microscopy


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.


Pd microscope.png

We have developed several patches for the pd_microscope

or see more here: New pd-microscope patch

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


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.

ffmpeg FFMPEG

Command line converter of all video formats and all platforms. <a href="">ffmpeg howto</a>