Wednesday, 11 January 2012

Xbox 360 WebCam for Astrophotography

Xbox Live Vision (green LEDs on)
My Christmas present this year was a telescope, and after successfully using it on the first couple of clear evenings to observe Earth's moon, Jupiter and its four biggest moons, I wanted to try and take some photos - without spending hundreds of pounds if I could help it. From some reading online, connecting a web camera seemed to be the best plan.

From internet background reading it seemed a CCD (charged coupled device) sensor webcam would be ideal, however these days most web cameras use a CMOS sensor instead which is far less sensitive in low light where every photon counts.

You can still find a few CCD webcams highly rated for astrophotography on eBay and so on, often pre-modified for telescope use, but their rarity is pushing up the prices - and I wanted to try something inexpensive to begin with.

The Microsoft Xbox Live Vision web camera intended for the Xbox 360 has been reported to give reasonable astrophotography images. This webcam is widely available from as little as £5 delivered - I got mine from eBay. The USB cable was surprisingly long at 2.75m (or 9 foot for any Americans reading), which should be helpful for sitting near the telescope with a laptop.

Xbox Live Vision (underside label)
Camera Software

My camera from eBay didn't come with any box or manual, but to check the exact ID of a USB device you can use the lsusb command on Linux, or on a Mac system_profiler SPUSBDataType. Product names are somewhat fuzzy, but the USB IDs 0x045e 0x294 identify this unambiguously on the macam webcam list as the "XBox Live Vision (XBox 360)" which matches the label on the camera's base, and this works "out of the box" on Mac OS X 10.7.2 "Lion" which was a good start. 

One major tasks ahead of me is working out the best software to capture and process images from the webcam under Mac OS X "Lion" - sadly several of the older tools I looked at like AstroImager were PowerPC only, and all Mac computers nowadays use Intel CPUs instead and Apple has dropped their Rosetta compatibility library.

Camera LED Modification

Based on the description and photos from Cliff Tate on the Star Gazers Lounge forum, I was able to open the web camera - although it wasn't very easy and there are now plenty of screw driver teeth marks all the way round, and the two catches on the bottom edge got damaged.
First pop off the grey focus ringFront removed (and lens reattached to keep out dust)

I found the top (three catches) and sides (one catch each) much easier to open - you can see the seven catches in the photo below where the open webcam is live showing the four green LEDs very clearly if you run the camera open.

Showing the four LEDsThe four green LEDs removed

One reason I opened the camera was to disable the LEDs in order prevent any stray light which might affect image capture, and any possible heat release. Here is a close up photo after I removed the four LEDs using my smallest jeweller's screwdriver by placing the flat tip along the long edge of edge LED and twisting gently to prise off the LED. I was relieved to find this doesn't seem to stop the camera working at all.

Webcam with nose cone cut off
Telescope Mounting

The black lens assembly just unscrews - although this isn't possible with the white front piece in place. The fitting appears to use a 12mm thread, with 0.5mm teeth which I'm guessing makes it the standard M12 x 0.5mm thread used on many webcams (update - it does, see below). This should provide the best way to attach a telescope adaptor and ensure the sensor is centred and perpendicular, although the outer casing will need cutting or replacing. Sadly the white nose cone part of the casing doesn't seem to separate easily from the clear plastic ring which shows the green LED light - so I just cut it off with a junior hacksaw, and sanded down the edges. I can now unscrew and remove the black lens fitting without obstruction, and am reasonably confident a standard telescope adapter nosepiece could be screwed in its place. Note with the nose cone removed, you must be careful not to over tighten the thread.

However, not yet owning a proper webcam nosepiece adapter, and wanting to test the webcam out with my telescope ASAP, I improvised with the closest thing I could find to a 1.25" diameter tube - which turned out to be a plastic tube of effervescent vitamin C. The tube is actually a few mm too narrow, but the thumbscrews on the telescope seem to tighten enough to hold it reasonably steady. Again, out with the junior hacksaw and file, plus some Sellotape and here is my jerry rigged adaptor ready for action:


Luckily there was a full moon out tonight, even though it was a bit cloudy, which gave an easy target for the first test run:
Moon via Xbox Live Vision webcam attached to telescope
Very first image captured, via Apple's Photo Booth application (mirrored)

That was a success I'd say - although it does seem I have got at least one bit of dust somewhere which is a shame, and there is also something of a purple tinge to the left hand edge of the image (actually the right edge, Photo Booth flips things) (update - this purple fringe is probably something called 'amp glow'), but still not bad for a first attempt. If anyone is curious, this was taken though the window pane - it was too windy outside to keep things stable.

Future Plans

I'm waiting until I have a proper mounting system before I remove the red glass IR filter (you must unscrew the PCB in order to unscrew the black sensor cover - update - I've done this now), since if leave the glass in place for now it can protect the CCD from dust. I plan to order a pre-made adaptor to attach via the screw thread on the webcam, probably with an 1.25" infra-red filter. Hopefully a rigid mounting like this will reduce the wobble in the image during focus, since the tape had some wiggle in it. Another potential hardware project is adding some form of cooling to avoid hot pixels.

I also need to explore my software options, and learn about tracking for multiple exposures and video - right now the moon moves out of frame at a very visible rate, requiring frequent aim adjustment.

But for now, I have something that seems usable, and only cost me £5 in materials and some experimentation over an evening - which was fun in itself.

Update

A standard webcam nosepiece does screw on nicely (once the white plastic cone is cut off) in place of the provided lens (update - The exact model I bought is the 1.25" Astro Engineering AC378 adapter).
Xbox Live Vision camera with telescope nosepiece
Now I need a free evening with clear skies for the moon or planets to see if the screw on adapter makes a noticeable difference

Update

I have now removed the red glass filter - and it makes the camera much more light sensitive! The proper adapter is also much more robust and a worthwhile investment.

19 comments:

  1. This is great! Thanks for the info. Have you had any better luck? have you learned more about the hardware specs on the camera? Also, what settings are you using now?

    ReplyDelete
  2. While it was still visible at night, I got some much nicer moon shots. I've also taken some Jupiter movies and started trying to do image alignment/registration and stacking - nothing worth sharing yet.

    Have a search on the forums I linked to for some very nice examples of astronomy images taken with the Xbox 360 camera.

    ReplyDelete
  3. Hi,

    What lens mount does the Xbox live Vision camera have? Is it M12 x 0.5?

    ReplyDelete
  4. Yes, it does appear to be the standard M12 x 0.5mm thread as used on many webcams. The adapter I bought (and shown in the photo above) is an Astro Engineering AC378 webcam to 1.25" nosepiece.

    ReplyDelete
  5. Thanks to your info, I have now modified an XBox cam for asto imaging.
    I found a way to remove the hot pixels, I mounted the board on a GPU cooler from a laptop. The cooler has a heatsink with a copper tube attached which runs up to a large aluminium heatsink and when the chip gets hot, it gasses the enclosed liquid which then runs to the large cooler, cools, then returns to it's liquid state.

    I can run the cam all night without the slightest amount of heat and no hot pixels show in my images.
    The whole unit weighs less than 60 grams (excluding cable) and fitted nicely in an old 4 port USB hub case.

    [IMG]http://i275.photobucket.com/albums/jj307/bja1608/P1100521.jpg[/IMG]

    ReplyDelete
  6. Hi,

    About the LEDs, were they SMD or through hole?
    Would you know by any chance if the LEDs are addressable or do they just turn on whenever the webcam is plugged to USB?

    Just in case you don't know what I mean,
    These are SMD LEDs: http://4.bp.blogspot.com/-GU8Plc02cY8/UFz7Cx-pBwI/AAAAAAAACJs/CSXSECchMPU/s1600/ay58rb.jpeg
    And these are through hole LEDs: http://www.hitechledlights.com/lamp.jpg

    Thanks for your answers

    ReplyDelete
    Replies
    1. The Xbox webcam has four green surface mounted LEDs (SMDs), and they normally turn on when the camera is active (being used to capture an image), not just when it is connected to the USB and drawing power.

      Delete
  7. is there a way to remove the nose piece or does it need cutting off?

    ReplyDelete
    Replies
    1. The whole front piece comes off (as should be clear from the photos) but if you want to reuse the case you will need to cut the nose cone off. A junior hacksaw works fine for this, but do it away from the PCB to avoid getting any bits of plastic on the lens/sensor.

      Delete
  8. Thanks,
    I got the front case off but was confused as the nose piece has that plastic ring around it and was thinking it may just be clipped on, but appears to be molded.
    Cut it off anyway with hacksaw, fitted the adapter and tested, seems to give a colour cast now the IR glass has been removed, can remove that in processing later I expect,
    Excellent guide though.
    Many thanks

    ReplyDelete
    Replies
    1. Yes, the colours will look very strange once you remove the red glass. No filter means more light, but the downside is some telescope designs don't focus all frequencies equally - so the IR light will not be quite be in focus at the same time as the blue end of the visible spectrum. Therefore the consensus on the astronomy forums is to replace the red glass with a proper 1.25" IR filter on the nose piece instead. Some time I'll try a head to head comparison of this.

      Delete
  9. Hi Peter,
    Your spot on, I just tried it with a 1.25 filter and colour back to normal,
    just need some clear night sky to give a proper testing.

    Many thanks
    Mark

    ReplyDelete
  10. Nice write up Peter, just noticed you can get these XBox Live cameras for £1 from CEX instore for anyone that is yet to buy one http://smartpound.com/story.php?title=xbox-360-live-camera-%C2%A31-00-cex

    ReplyDelete
  11. Massive thanks for this. So do you put an eyepiece or a Barlow within the tube that is attached to the camera or is it empty?

    ReplyDelete
    Replies
    1. Usually I use the XBox camera (with no lens) via the nose-piece directly in place of the eyepiece, that works nicely for the moon. For planets I've tried a x2 and x3 Barlow as well to magnify the image. Have a look at the various Astronomy forums for more in depth discussion, I've not yet mastered the image capture & processing.

      Delete
    2. Brilliant, thanks for replying so helpfully

      Delete
  12. Thank you again SO MUCH for your help! I followed what you wrote and got some pics plus a short video of the Moon's surface last night - http://www.youtube.com/watch?v=68X70a9OOrQ

    ReplyDelete
  13. Hi, Great informative post! Appreciating that this is a really old post but i've tried this technique previously with a quick cam pro 5000 and just got blurry out of focus moon. I've since picked up the xbox cam discussed here and modified it tonight so will try that on the next clear night. The question i have is...If i put the supplied lens in and turn it, i can focus it. If i take the lens out and screw in the nose piece for my skywatcher (same as above) i can't focus on anything, its just blurry. Are you a. putting the webcam into a lens to get it to focus or b. straight into the telescope. if b, how are you getting it to focus please? Any help appreciated as i'm a complete beginner. Thanks, Nick.

    ReplyDelete
    Replies
    1. In this approach the telescope REPLACES the original webcam lens. To focus it, you use the telescope focus controls. If you are unlucky, you might find the camera needs to be further away from the telescope than the eyepiece, in which case an extension tube might be needed. Or with some combinations the camera needs to be closer, see my blog post about moving the mirror for using a DSLR with a Newtonian telescope.

      Delete