Thursday, August 26, 2010

Webcam Details

Matching a web camera with a standard camera lens turned out to be an interesting task, there were several different methods i have seen but it wouldn't be very fun if i didn't do my own



I started out with a cheap pvc conduit box and built a mounting system that could be adjusted in all directions, i drilled out holes and epoxied  bolts down so that i could thread bolts in each corner. then thread locked bolts on each end and epoxied rare earth magnets. The idea was to hold a sheet of steel or plastic while allowing freedom to center the sensor. Regular epoxy did not hold very well to either the bolts or the pvc so i used jb weld. It worked out quite well since i need a fair bit of control over the amount of magnification. To prevent light reflecting on the inside i spray painted the entire thing flat black



I decided to go with a standard m42 lens, they use a standard threaded mount and it is easy to pick up a suitable lens for a decent price. I picked up a cheap adapter that allows a m42 lens to be used with a different camera mount, filed down the bayonet tips on the back and used it for a flange to mount the lens . I made the mistake of not having enough distance between the lens and had to use extension tubes to increase the distance.



For the lens i picked up a Helios 44-2 for 30 dollars including shipping, with a focal distance of 58mm and a manual aperture of f16 down to f2.8.



I went with a logitech c600 webcam, it was the best fixed focus one i could get. At 1600*1200 video resolution at ~15 frames per second im not complaining. After gutting the camera and removing the lens i simply mounted it on a square of thick plastic with some hot glue, it is held on by rare earth magnets on either side. For my first test subjects i used my large collection of eproms, my first tests allowed me to see the NEC logo and manufacturer's code on an old 8051 micro controller. Quartz windows do unfortunately give a bit of distortion, also the depth of field is very narrow. I'm building a cross slide to properly hold and focus with this thing. So far i have been focusing manually by sliding it back and forth until the target comes into focus and gently nudge the camera the rest of the way.

6 comments:

  1. would it be better to have drilled holes in the box slightly larger than the bolts, put springs on the bolts and put the bolts through the holes so the thread points out the back of the box and add the nuts on the outside, then epoxy the magnets to the lug on the non threaded end of the bolts, allowing you to assemble the device and then adjust the sensor with the lens attached?

    ReplyDelete
  2. pretty simple from the start. such an easy fix for a great product. great job!

    ReplyDelete
  3. You can use another lens in reverse. I used an Helios 58/2 + a Hexanon 40/1.7 (which is smaller and can use tape to fix)

    Here a sample :

    http://www.flickr.com/photos/jkxathome/4801588665/in/photostream/

    ReplyDelete
  4. also, well done :) good project, forgot to mention that, and if you didn't know, you're on hackaday

    ReplyDelete
  5. @ peter: actually that was the entire point of the bolts in the first place, the lugs are rounded so i had to use them backwards and thread locked nuts onto the other side to give a flat surface for the magnets

    i didn't have a 6-32 tap and drill set on hand to i had to jb-weld some bolts down, which was a bit wobbly so i added the springs

    i can adjust the sensor back and forth by turning each bolt (adjusting each bolt precisely to keep it level is slow and painful)
    a single bolt and a few polished rods would work much better

    it turned out i need the sensor as far back as possible making the entire thing pointless, the sensor doesn't really need to be perfectly centered either because the camera can just be offset to correct

    ReplyDelete
  6. Wow!!!! If you'd like to see some of my macro shots, email me
    jules dot hallam at gmail dot com

    ReplyDelete