Fitting a cheap webcam to the foldscope

on

Taking photos and movies with a mobile phone or tablet attached to the foldscape works very well and is great fun. Here I am looking for a cheaper alternative, so that I can let everyone have a go without worrying about the phone. I tried one of these cheap 640×480 pixel webcams with 6 LEDs, which I bought for £4.60 from eBay, here I already removed the little stand (it is not a megapixel camera and has no zoom):

webcam_1

With the lens focused to infinity and the camera as close to the foldscope as possible the result was very disappointing:

webcam_before

The problem is that the actual lens is too far away from the ball lens of the foldscope so that the image fills only a tiny bit of the screen. First I tried to replace the webcam lens with a simple lens, but I found that the original lens design is actually quite clever and consists of several elements:

lens_webcam

With the original lens now destroyed, I looked for an alternative and found this one on ebay for £4.80 (3.2mm Focal Length M12xP0.5 Camera Lens for Raspberry):

new_lens

It can be screwed into the circuit board of the webcam. It is shown here without the casing, you can see the CCD chip, it is only about 1.5 mm x 1.1 mm)

webcam_2
I also removed the LEDs and a little bit off the plastic, putting everything back together with the lens focused to infinity it looks like this, the lens protrudes much less:

webcam_modyfied

I attached the magnetic stripe with a bit of blue tack and the double sided tape, adjusted so that the hole is centered on the image:

webcam_magnets
Attached to the foldscope it looks like this:
webcam_on_foldscope

Now I can record movies on the computer e.g. with the quicktime viewer:

screenshot2
Below is a still image with the low magnification foldscope and LED illumination. The object is a stem cross section from limewood (http://www.brunelmicroscopes.co.uk/prepared-slides.html). One problem at the beginning was the saturation of the image, it was mostly white. Putting a piece of paper folded several times between the condenser lens and the stage to attenuate the LED light solved this problem. These cheap webcams also compress the images a lot, which cause artefacts. Anyhow the image is much improved compared to the one at the beginning.
webcam_modified-1
This is an image of the same sample taken with my Lumina 520 mobile phone:
mobile_phone

One can see the larger field of view showing more of the sample. The mobile phone has a 3.2 mm x 2.4 mm CCD chip, which is four times the size of the webcam chip. The phone has a focal length of about 2.6 mm, the focal length of the foldscope is 1.7 mm (large lens), which would mean the image is only magnified 1.4x on the CCD chip. In the case of the webcam we have 3.2 mm focal length which results in a little higher magnification of 1.8x. The reason both work so well with the foldscope is because of the small pixel size of the CCDs, 1.2 micrometers for the mobile phone and 2.2 micrometers for the webcam.

When using the original webcam lens (I bought a new one), it is possible to unscrew the lens, so that it is quite far away from the CCD chip. This way it is possible to focus on very close objects. A computer screen is very good for testing. Below is the same sample viewed just with the webcam (no foldscope). The outer ring is about 4.5 mm diameter.

MAX_test

This is the same sample photographed through a simple 2x magnifying glass and with a ruler:

magnifying_glass

It might have been easier just to cut of the front part of the original lens. Has anyone experience with a better webcam?

8 Comments Add yours

  1. Manu Prakash says:

    That’s really nice. We have played with some other webcams; I will try to post some of our findings. I like the idea of web cams for long term imaging as well; since you can leave it for long. Leaving your phone for several hours (or days) would be hard 🙂

    Finally – I can “watch daisy grow” ..

    cheers
    manu

    cheers
    manu

  2. David says:

    Hi

    Neat experiments and one of the fun aspects of using a microscope. Have you tried using the lensless webcam with the Foldscope for direct projection. Sometimes the best way to use a single lens microscope with a digital camera is to directly project the image onto the sensor without any additional lens.

    So your lensless webcam may be the ideal one to experiment with.

    I haven’t been able to try it as unfortunately my beta tester Foldscope never arrived to UK (neither did an example to a fellow UK colleague) but the image below shows direct projection with my replica single lens Leeuwenhoek microscope straight onto a camera sensor. This is a large APS sensor, the webcam sensor will be much smaller so won’t need as much extension.

    http://www.microscopy-uk.org.uk/mag/imgoct12/dwDSC02152.jpg

    The parameter to experiment with is the Foldscope lens to sensor distance (no other lenses in optic train) which could be varied with spacers like card tubes of different length. Try distances so that the image size is just big enough to fill the sensor size.

    David

  3. Niramay Gogate says:

    I liked the idea very much!
    I am thinking of doing the same thing 🙂

  4. Manu Prakash says:

    Recently, I was running a time lapse imaging with my phone coupled to Foldscope. After an hour; someone called and my phone vibrated – messing up my imaging 🙂 webcam will help..

    Cheers
    Manu

  5. Andreas says:

    Thanks for the good comments.I tried without the webcam lens, but with the housing around the webcam, i could not get it close enough to the foldscope. While the whole chip was filled, the magnification was too large and focusing was difficult. But with a bit but effort this will work.

    Cheers
    Andreas

  6. dmeunier says:

    I like your engineering ingenuity, adapting the webcam for a different purpose. I also had an issue with the Foldscope LED. I did not like the illumination it provided, so I removed it from the Foldscope and instead I shone a bright light at a white piece of paper and aimed the Foldscope at the white paper. The illumination was very good.
    Don

  7. Ronak Hati says:

    This idea is really amazing. One can do uninterrupted video recording of live samples. Especially helpful when you wish to see something developing.

Leave a Reply