Making a Homemade Webcam?
Space-Bot asks: "I remember back in high-school photography the simple and very basic homemade cameras that we made that surprisingly worked fairly well. Amazing how something so great started so basic. These days we have all these high tech gadgets that do it all so quickly you never really think about any of the work behind it. Well I would like to start to understand the modern digital cameras more and I figure what better way then to make a homemade webcam of some sort. Might some of you Slashdot guru's have some ideas or experience for my project?"
Not "guru's". There's no need for an apostrophe there, you twit.
That's about as home-made as you can get, given how cheap "real" (but crap quality) USB webcams are these days.
Got time? Spend some of it coding or testing
Step 1: Buy a webcam.
Step 2: Take webcam apart.
Step 3: Make a webcam out of parts from step 2.
A webcam is a lot more electronics than optics, so your high school photography class won't help much here. A lot of the stuff that goes into a webcam is going to be surface mount only and very tiny. I understand you want to learn about them, but you might be better off buying one and taking it apart and studying that.
...like this guy. You can't get much closer to making your own webcam than this. It's not like you can print a CMOS Image Sensor from your bubblejet.
There was an improper usage of an apostrophy, and Everybody was sure that Somebody would point it out.
Anybody could have done it, but Nobody did it.
Somebody got angry about that because it was Everybody's job.
Everybody thought that Anybody could do it, but Nobody realized that Everybody wouldn't do it.
It ended up that Everybody blamed Somebody when Nobody did what Anybody could have done.
09F91102 no, 455FE104 nope, F190A1E8 uh-uh, 7A5F8A09 that's not it, C87294CE no. Ah! 452F6E403CDF10714E41DFAA257D313F.
It'd be quite difficult to make a digital web cam. Sure, basic photography is simple. The reason? All you need to do is capture the light, and you've got a nice chemical compound that does that fine. You don't have to delve into the actual process of getting it to capture (yea you have to develop it, but the chemical compound on the film does the capturing).
With anything digital, you have to use a matrix of photo-sensitive sensors, process, and send them out to the computer. Which means you either need to buy a CMOS board, or that other kind of photographic digital thing. Figure out how it interfaces, connect a USB interfacing chip onto it (I think they're pretty cheap, Buffer->USB->Program, you handle the arrows and the Program, everything else you'd practically have to buy. I guess you could create the USB interfacing yourself, but that would be tedious, and not important. Using the serial or parallel ports would be easier if you're going to do it yourself, btw.)
Anyway, what another poster said. Go buy a cheap rebate webcam, take it apart, play with the parts some, and put it back together. I'm pretty sure there's nothing that's going to be hurt by light or by touching in a webcam (though not positive, IANADigiPhotgrapher).
This post is getting kinda long, but I wanna share this. I had this idea on a way to make a cheap, possibly portable, digital camera....well, not film camera at least. I'd take three photodiodes (diodes that block when there's light, and don't block when there's not), put the three primary color filters over them, have the light coming in through a slit, and hitting two mirrors, then going to the photodiodes. When you hit the button to take the photo, it rotates the first mirror horizontally, back and forth, as fast as possible, and the second mirror slowly scans down. The output from the photodiodes would directly going to a cassette tape. Later, I could read the cassette tape on my computer, and write a program to analyze it and extract the picture. I thought it was neat because the parts were cheap, but highly impractical. Especially considering it'd take about a second to take the picture with standard photodiodes (~25ns per reading, IIRC). Anything longer than 1/15th of a second *requires* a tripod...imagine the shaking going on with the motors as well.
Anyway, yea, happy learning and stuff.
A normal memory chip is actually light sensitive, in a nasty gray-scale sort of way. :) and write consistent values out (all ones or zeroes) then display what you read back in.
So, take an old memory chip, like a 1-meg or so. Carefully split the top off of it (might take a half-dozen tries to get one with pins still intact after).
The one I saw was plugged directly into a memory card. These days you'd probably have to rig up a parallel port interface.
Then all you do is put a lens over it for focus (watch out for the sun!
I know what I have learned back in grade school will apply to this project.
step 1. get shoe box
step 2. get needle
step 3. get charged coupled device CCD
step 4. make small hole in box
step 5. put CCD in box.
Step 6. Connect shoe box to PC
Step 6. aw crap, go to Circuit city.
...::----::...
I am in no way affiliated with this sig.
Take the linear CCD array from it, add some mechanics, and with some luck you can get nice (in the range of megapixels) images.
These guys did it already: here and here
Better than a webcam, and pretty good for understanding how digital imaging works.
I know this is probably tough if you don't know much about electronics etc... but as a EE in our labs we learned a little about custom programming microprocessors, general electronics etc... If you are interested in webcams, chances are you would also like other digital/electronic toys you might take some EE classes. I know they teach a ton of theory and some practical stuff, however some of our lab classes were golden, like VLSI where we had to design a chip that would be manufactured for us for free(MOSIS) while using some opensource layout tools (I think it was called ELECTRIC or somthing like that) however that versus a more digital programmer choice like DSP and Field programmable gate arrays(XILIX makes good stuff, and PIC) where you can make the chip in your hobby lab. these classes were fun but very time consuming. On the flip side you could also take up hobby electronics where magazines like poptronics, and nuts and volts basically teach pure application on things like BASIC and some elegant yet cheap PIC controllers. I have had the luck to do both schools of thought so i have formal training and some good application skills so i have created some pretty slick systems like using perl as a signal analyzer and custom coding linux mp3 harddisk player things like that are fun but not too expensive to accomplish. As for the webcam, one approach is to get together with some people in the know and flow chart out exactly what is happening, you can disect existing ones, and break down the logic but from a basic analysis standpoint i can tell you that a web cam would be pretty easy to make from scratch (atleast using off the shelf components!) so you would need somthing to take the picture, so this could be a CMOS image sensor, or maybe some other kind like CCD, but my canon EOD 10d has a cmos and i read good things about it. who knows for sure? it could just be for still pictures so CCD would be the way to go. then you trace the image through the logical components needed, so if it is analog signal you need an Analog to Digital converter, etc.. some signal conditioner stuff, then to power it some DC voltage, i think you could use USb for interface and also for the power so that is cool, i know they have kits for USB/PIC controllers and this investment would also help in future endevours. I am probably missing some vital parts, but any kind of research on the topic should yield good results. A big challenge would be the software side, need to figure out a protocol to use to get that video signal to display, and i dont' know off the top of my head how that would be done, in linux just accessing the usb port probably and make some Tcl/Tk or GTK front end would probably need some custom programming, Or you could look for some opensource software that works on the different usb webcams, i am sure there should* be some standard. I think advanced features like zoom, capture, etc.. would take some slick custom programming, a good start on this would be to rsearch out the different parts you need and simply order samples from the different suppliers, i know LINEAR makes a good precision gain OPAMP, and National Semiconductor is another known source for good semiconductors you could spec out. Recently SOC (Systems on chip) seems to have taken the industry by storm and some might offer a bundle of these features through this. Making it wireless might just take a PLD or some integrated wifi controller. Just be sure you are having fun. :)
A home-made webcam is so far different from the type of pinhole camera that was likely made in school that it's not even funny.
It's one thing to make a cardboard box which uses some fairly standard physics to project an image on a chemical-coated piece of paper which can then be processed. Everything is big, can be made and handled by hand, etc.
With a webcam, it's not exactly like you can whip up a CCD, various other ICs, the code to run it, etc. Almost none of this can be done by hand, and it requires a extremely high level of knowledge to do it all. In fact, it's very unlikely that any one person has ever possessed all of the knowledge to make such a device.
This is like saying "well, since it's not hard to make a simple steam driven piston type engine in a metal shop, why doesn't anyone piece together an electronically controlled fuel injection engine?
It's possible to achieve interesting things just by removing a webcam's built-in lens/filter assembly, and replacing them with lenses and filters from 35mm camera. See Lundycam for examples. You can build an extreme telephoto camera in this way for very little money.
You can also change the webcam's behaviour (improving low-light performance, for example) in software by using something like the Java Media Framework.
If your interest is purely academic, you might check out the CCD Camera Cookbook Webpage. The CCD Camera Cookbook is a book covering the design of two CCD cameras for Astrophotography. The resolution of these cameras is not high, and they do not come out being cheap. I am currently reading the book and will probably build the TC245 camera as a prelude to trying to design my own higher resolution CCD camera for Astrophotography. I think the book alone would be a good start in an attempt to understand CCDs.
At least I wanted to make the same comment... ;-) And remember 'Funny' does not give one karma points...
Paul B.
Don't forget about the home-made pinhole paper camera, the Dirkon. Somewhere out there there is a pdf file that you can print on tagboard, cut out, and glue together.
If you can't find it, or the site gets slashdotted, and you have some bandwidth to spare/share, I'll email you a copy and you can host it. Approx. 416KB.
moox. for a new generation.
Apostrophy?
your smoking
"you're".
This site has quite a few links to people's NBTV projects and software: Narrow-bandwidth Television Association
Oxford Dictionaries Online
For taking stills or moving pictures?
:-)
You might want to research how Radio Amateurs do SSTV (Slow Scan TV) and NBTV (Narrow Band TV) (and how they did it in the days before comuters).
NBTV uses mechanical equipment similar to Baird's original TV equipment which would be a really interesting project
Otherwise its playing around with the same components commercial web cams are made from.
Its also very likely you'll have to write or adapt software...
Like here: limpens.net
Using a plain old sony hi8 camera, hooked up to a video grabber running the famous bt8x8 chipset.
Nothing fancy, however the camera is able to pan and tilt via the webinterface (also some video-effects can be toggled).
Check out the apache module, written to interface between the website and the camera software on limpens.net/camera
This all works quite good, one 'engine' to grab frames when needed, and an Apache module takes care of supplying the data to all the clients and handles the video-effects.
Just buy any good old camera camera, put lots of bells and whistles on it, much more fun.
Everyone keeps talking about how you can't make your own CCD chip. I don't know that that's what the poster intends. There's a lot more to creating a web cam than simply the CCD chip. First of all, you can buy CCD chips from a number of sources. You'd then need the associated logic.
Actually, a number of Astronomy hobbiests are into doing just this sort of thing because astronomy quality cams are quite expensive. A number of people have used regular web cams for astronomical work, usually with long-exposure modifications to the cams, with a great deal of success.
A team of French hobbiests created this Genesis cam from scratch. It's very impressive and better quality than most of the hobbiest level cameras you can buy since it's based on a very high-resolution and very light-sensitive CCD chip.
But if you want to create just a basic web cam, there are much cheaper CCD chips. The datasheets will probably give you enough of an idea for how to get started with a project.
The CCD Camera Cookbook provides an excellent overview of the construction of an astronomical camera from scratch. Amateur Telescope Makers (ATMs) do this all the time to obtain high performance cameras with greater sensitivity and dynamic range than conventional webcams and Digital Cameras. Such designs not only incorporate superior ADCs but often have such features as peltier coolers.
I can still rememmber when the first reply to a problem involving hardware was, 'yes we can build it!' Now the bulk of supposed 'hackers' reply that you have to go out and buy whatever you need.
Ok...but why is parent "informative"?
:-)
Looks like Somebody did do what Nobody should have and Everybody complains about!
http://efil.blogspot.com/
Have a look here
This should give you a fair idea about CMOS, Image sensors, how colour is created etc... that should be a good starting point
http://efil.blogspot.com/
You'd pop the cover off it. Sampling the memory would get you a primitive black and white image. Maybe even grayscale, with software trickery. A parallel port interface isn't out of the question, would be as simple as an electronic camera could be, I'd suppose... look it up on google, used to be in a bunch of amateur robotics books of the 1980s.
Does your missus, er, does your missus like... photography?
Seriously stop this insanity now. If you want to make a homebrew webcam then you really should thing about how "homebrew" you really want to go. If you go out and buy a CCD and all the chips necessary then you really aren't doing anything more than some solder work and if you don't have some sort of specialized interface chip then you will probably be doing a lot of coding work. I mean you can't make a webcam without interfacing with a PC, and that requires drivers to handle actually getting the image from the CCD to a usable state on the PC.
If you wanted to be insane you could take all those crazy EE courses I took in digital design and create your own chips and interface tools and make more work for yourself, but this can get really expensive really quick. You could use microcontroller but they might not be fast enough which sends you to DSPs. Either way it might prove to be a lot more work then you would ever want to do. I mean companies have engineering teams for these things.
To be honest and comes down to how "homebrew" you really want this to be. If you think you like photography this will make you hate it and to be honest this has 0 to do with photography. This is an EE related thing and unless you like electronics a lot and want to do design I would avoid this like the plague. Otherwise, enjoy yourself, I am an EE and wouldn't do anything beyond soldering premade chips together, at least not alone.
---
What do you think happens if I cross this red wire with this black one? *ZAP!*
"Some days you just can't get rid of a bomb."
Lots of people are saying you can't build the chip yourself. That's not exactly true.
Go through CMP and you can get say the AMS C35B4C3, a 0.35um 4 metal, 2 poly CMOS process, for 650 Euro/mm2. I'm sure lots of people will cringe at the 0.35um, saying that it is ancient. Well, maybe in digital terms, but it is quite nice for analogue/mixed chips imo. 0.8um is still around (290 euro/mm2)!
Alternatively, if you are part of an Educational Institution or Research Laboratory, how about the ST Microlelectronics 0.18um CMOS process for 990 euro/mm2?
Now get hold of a copy of Electric some spice or other and learn how to design design electronic circuits. geda may also be of interest.
That last step might take a while.
Design your chip, submit it to CMP, wait three or four months and you'll get it back. Now go on to do what the other comments are talking about with pin hole cameras etc.
Let's do a rough price breakdown. Suppose you want VGA (640x480) in grey scale. Let's also suppose you can get your pixel element down to 5um*5um (which would be quite small imho). This gives:
Width: 640*5um + 2*400um = 4mm
Height: 480*5um + 2*400um = 3.2mm
The 400um gaps are for the pads on each side. This doesn't include any other electronics, so let's just say it is 4mm*4mm = 16mm2.
You need packaging as well and are probably limited to JLCC packages because it needs to be exposed to the light. Let's assume a JLCC68 package. You get 20 chips back and each package costs 48 euro.
So, 16*650 + 20*48 = 11360 euro. Put another way, 568 euro per chip. Don't forget to add VAT if you pay it. For the UK, this means 9343 or 476/chip.
Now consider that 16mm2 is still a small chip (and colour would be at least 3 times larger). If you have access to a webcam and can get inside it to look at the light sensitive area, measure it and figure out how much it would cost!
Cheers,
Roger
Do you have any better hostages?
And remember 'Funny' does not give one karma points...
IT DOESN'T? Crap! Now I know where I've been going wrong!
I don't think a true do-it-yourself webcam is a possibility these days, any more than making your own chip. But there are a lot of entertaining things you could do with the optics. For starters, replace the lens with a pinhole. You might be able to get a really wide-angle view that way, with minimum geometrical distortion. (Or, then again, you might not).
Go buy a pair of, say, 2-diopter reading glasses at a drugstore. Replace the webcam's lens with a tube about 500 mm long and the reading glass lens at the end. Now you have an extreme telephoto lens. Not sharp? Once again, stop it down...
Is the webcam chip sensitive to UV? Is there an easy way to filter out the visible? Then you can go out and get a bees-eye view of flowers, some of which have dramatic patterns on them visible only in ultraviolet.
"How to Do Nothing," kids activities, back in print!
The sensor array will be a bit tedious to construct (especially if you want more than a trivial number of pixels), the response time may be slow (ISTR some photoresistors haveing recovery times in the multi-second range), and you may need to spend some real cash for peripheral equipment (if you are going to build the thing using a microcontroller, you will need something to burn the MCU's program with, which will run you at least US$100). On the upside, you can build a true greyscale device (if you use a ADC to sample the pixel photodiode/photoresistor pixels).
The resulting camera will be bulky, slow, and have absolutely terrible resolution (we're talking 1 Kpixel, tops), but, if you have a spare month or two, it sounds like a fun project.
because the +1 Funny mod doesnt add anything to anyone's karma... read the Slashdot FAQ (and lots of people's sigs)
Obviously, not to the desired effect.
You could've hired me.
Sigh. Karma isn't a game, whose goal is to maximize your score. If you make a great post and it gets modded +5 Funny, you weren't robbed of anything just because Funny doesn't give karma points. Don't take the whole karma thing so seriously.
Disclaimer: I hit the karma kap not long after it was first implemented and so you might consider there to be a bit of hypocrisy up above, if you're that sort of person.
Mod down posts with a "Free Mac Mini/iPod" sig, they're spam!
Disclaimer: I hit the karma kap not long after it was first implemented and so you might consider there to be a bit of hypocrisy up above, if you're that sort of person.
;-)
Me too, but maybe that guy who posted the original comment have not yet!
Paul B.
1. Get 100, equal webcams
2. Put in an array of 10x10
3. Feed input to several computers (USB)
4. Apply respective parallel image processing, including mosaic techniques that will get rid of overlap
5. Feed resulting data to a single computer
6. Play with the resulting ~30 Mpixel image.
Don't forget to point it to the sky. You may arrange things so you have complete sky coverage, then track aircraft and meteors. Adjust software accordingly.
Step 7. ???
Step 8. Profit
I have mod points and I am not afraid to use them
eh I really don't give a shit about karma. I just post what I post; I don't post to get modded up. I get modded down sometimes and modded up sometimes so it doesn't matter much to me.
Yeah, man, but still that was a good comment (one I thought of making myself, must be good, huh? ;-) ) and if you were one of the newbies on /. I guess you'd deserve a bit more of some positive karma... See, the other guy in the thread did not know that +5 Funny moderation does not bring positive karma to people and was feeling "cheated" for his lost points, so no waste of keystrokes here (and no electrons were harmed either... ;-) )
Paul B.
I have one of those in my closet.
Totally awesome.
I can hook it up to a beat up old Yashica camera. Strap on a zoom lens...
Oh... Wait... It's slow and doesn't take images non-stop. damn
[Fuck Beta]
o0t!
As each hole passes the light sensor, you get a "scan line" from the image. It's curved, and it tapers into the middle, but you can get very recognisable pictures with around 60 or 70 scan lines. This involves drilling *lots* of holes though.
For these purposes, you could drill timing holes at the edge of the disc to indicate a new scan line, and grab the analogue values with a simple A-D converter.
after my first 3d experience was published in 2600 I decided to further the sport. Myself and a friend mounted two cameras side by side, and with a custom modded spca50x driver (had to add these cameras since they weren't supported by default) we could record left eye/right eye. Then we run them through a couple quick ImageMagick filters and mencode, and the result? 3d webcam video. Check it out: here.
twitter.com/gravitronic