Alright, well... after many failed attempts to start a blog I will, instead of starting and ending with an introductory post, get right into it. This will be kind of odd as I've already completed this project in full, but soon i'm going to be doing it again, so stay tuned for version two of this howto!
Anyways, I've always wanted a camera for my telescope but they were always too damn expensive! So, I did what any hacker would do: made my own. The good thing about something like this is that it can be used for any kind of optical system... in fact I will be making one for a microscope soon (and be using properly milled pieces).
So, for this project you'll need:
- A webcam (any kind will do, I got a cheap $8 logitec express from canada computers)
- Some sort of metal case. It should have at least an internal volume of 2.5x5x3.5cm (might be different depending on what webcam you get)
- Computer fan with heat sink (see image)
- Camera film tube.
And now to begin the fun! Find out how to open the webcam and do so. For my webcam there was a screw covered by a small plastic cap that held the whole unit together. You can always just smash it apart, but you don't want to destroy the delicate CCD or the circuitry!
Once open, disconnect the mic (you might want to keep it for later, it became really useful in my assembly) and take the circuitry out of the casing. Make sure the pins on the board for the mic are stowed away, some cameras are already quite compact (in the image below I had to fold the pins down, making sure not to touch anything else). Now take the lens off of the CCD (it unscrews). Be careful because you don't want the CCD to get dirty! You'll see that there is still a plastic piece where the lens used to be that is screwed onto the board (I'll call this the lens holder). Screw this off and break the glass off of it! This glass is an infrared filter and we don't want it. Make sure that everything is clean and screw this piece back on. Now you have a visible+infrared camera, but we want more!
Also, a good tip is to take the lens and glue something long to it... then you can use this as a lens cap so the CCD doesn't get dirty when you store it. Save this step for last so you can see what would best serve your needs.
Now, look at the main cable that connects the USB to the circuit board... you need to identify the ground and power. Voltmeters are useful for this (just plug in the USB cable and check where the voltage flows). Remember where this is for future reference.
Let's take care of the casing for now. First, decide what you are going to use as the front and back of the case. Screw the fan/heat sink securely to the back of the case. You want to make sure that it is secure so that you don't have any excess vibrations. Next, drill a hole in the front the size of the circle of the lens holder from before. This is where the CCD is going! Also, figure out how you want the wires to come out of the case... I drilled a hole in the side and had all the wires (USB+power to the fan) coming out of it. And finally, take that film canister and cut the base off so it becomes just a tube. Glue the lip side down onto the case so that it is centered on the hole for the CCD. I recommend using epoxy or something that gives a bit... more rigid glues (super glue and the like) seem to chip off after extensive use with things like this. And now the case is ready... almost done!
Now you want to get all the wires through the hole in the case you prepared. Solder the wires for the fan onto the correct parts of the USB wire (I found it useful to branch off the wires coming off the CCD board using the wires from the microphone so I had more room to do my work). Before reattaching the USB wires to the CCD board, apply some glue to the outside of the lens holder (being extra careful not to get any on the ccd... this is how i ruined my first CCD) and get it securely fitted into the hole in the case. Now, the final step: attach the usb cable and close the case up!
You are finally ready to take pictures! Use whatever webcam program you prefer. I personally use a script I made in python that uses openCV to control the webcam and find the FWHM (full width half maximum) of a selected region so you know everything is in focus. In a later post I will release this code! For now I'll leave you with a picture of the moon I took while testing this unit. I used gqcam to take the pictures and photoshop to put them together. They were taken off my 4.5" Astroscan telescope (not the best... in fact most distortion comes from the antique optics in the giant red beast, but when it clears up I'll take/post some pictures with my 8" Celestron!).
Hope everyone enjoyed this and please post pictures you take with the camera here! Oh, and if you have any question, just post a comment.