USB microscope - scratch build D.I.Y. (now "pic heavy")

EDITORS NOTE: i will be adding pics slowly, and maybe last thing… slowly working on laying out the project. I mean, its easy and clear to ME, i have to stop and remember what someone new to this wont think of that i take for granted.

Step 1 - Basic description of the project

AT first blush, this would seem to be a complicated project, indeed, it really isnt. It would also appear to be a little time consuming or even expensive? It isnt. Also, this project is goin to open your eyes to a whole HOST of other projects you will then take on and tackle easily, and projects you will dream up yourself.

at the HEART of this project, are mainly 2 things…

1) a USB webcam
2) nearly any lens you get your hands on

Lets start with the USB webcam. Almost everyone has one laying around. Even if you dont? they can be had cheap. VGA webcams on the slow boat are price-bottomed-out on EBAY for somethng like 2 dollars new. When WARHAWK got his unit in? He was dismayed to find that he could take high resolution PICTURES, but, soldering requires a live video feed… whereupon his unit went to VGA (640x480).

To make my first unit, I decided to stay “budget” and get myself a VGA USB webcam… I ripped myself off by going to discount stores until i found one for ten dollars… because i was too excited to wait on a 2 dollar identical unit from china. You likely have one laying around, or its a whole 2 bucks.

I would RECOMMEND you get the “little square: CAM… its a little easier to work with. (the ”original” project online? started out with a 70 dollar webcam.) I am comfortable ripping into a 70 dollar webcam? But, you might not be, and, why not do a “2 dollar dry run” to get your feet wet. Works, and you can upgrade later.

carefully and slowly take the thing apart. A small #0 screwdriver will probably do fine. You will be left with a small square circuit board with what security camera guys call a “board lens”, and a rats tail that is a USB line. you will find that a couple more screws will remove the “board lens” and the “lens holder”… you want to be holding a BARE circuit board with a USB dangling off of it.

Go ahead and “touch” the glass covered sensor… if you dont scratch it? you really wont hurt it. You can just wipe it off with the edge of your tshirt. If you dont scratch it? You cant hurt it. I regularly do this with 100 dollar security cams. Dont fear. The only thing to really watch out for in my opinion? Is not to rip out any of the several wires soldered onto the board attaching the USB line… so what you really want to “watch out for” is the USB wires, not the sensor itself.

NOW? you need a lens. You can use almost ANYTHING. I started off with a chunk of glass, and my second unit I used a “real” camera lens. Both work fine. My first glass lens? Was just an old gun scope main objective… they screw right off. If i hadnt used that? i have old binoculars torn apart; you want the “big main lens” off of something.

EUREKA MOMENT time! to convince yourself how easy this is? simply take a sheet of white paper, and hold a magnifying lens over the paper, and “aim it” at one of those cheap “twisty” lights in your house… the humble CFL. They are easy to focus up. When the light, the lens and the paper are all in a line? move the lens in and out carefully, and you will see the twisty light focus up in amazing detail on the white paper!

if you HAVE a real camera lens? do the same trick… works the same.

ALL we are going to do now? is the SAME thing… except we are going to replace the PAPER with the CAM SENSOR. You probably cant hold the lens steady enough, but, we already know this works, so, take the square board cam, and put it on somethng, I used a piece of PVC pipe. I taped the corners down.

Take a larger piece of PVC pipe? and fix your lens or camera lens on the end of the larger PVC tube. You will want to “shim” the smaller pipe with some winds of electrical tape, or weatherstripping, or duct tape wrapped around paper towel. You are going for a “loose sliding fit”.

in the home built telescope world? This is called “slide focus”, and it exists for a reason… it works and its bulletproof.

=

you are more or less “done” at this point with your “mock up” unit, which could ave been made out of electrical tape and paper towel tubes. PVC pipe is cheap and works better.

you want “long” pieces of tube to start out with? because as the distance to the subject gets closer to the lens? the distance between SENSOR and LENS starts to grow exponentially long. Real photography guys call this “macro photography”, and they use special long tubes to mount their camera lens further and further out from the camera.

You dont NEED special photographic mounts and accessories, heck, you dont even need a real camera lens.

==

I “c-clamped” my PVC telescope device, to the edge of my computer desk… it “aims” down at the desk surface. The only HARD PART, is its initially frustrating to watch the webcam on the computer screen, sliding the tube in and out to “focus”. The trick is, going real slow? you will see a “flash” on the dark screen?? THAT was the focus!

if you cant do it? you are either not patient enough, or, your tubes are not long enough. And, the closer you get to the work surface with the lens? the LONGER back the sensor needs to be.

=

Once you focus up a “twisty” CFL onto a piece of white paper across the room? You will be “hooked”… the rest? is nothing more than patience and arts and crafts time… real telescope builders? Use cardboard mailer tubes to good effect, and we can too.

=

to “hold” focus? i temporarily jammed a piece of cotton between the tubes and wedged it in fairly tight with a fingernail sanding board. simply drill and tap a hole in the PVC, and use a bolt to hold focus with friction.Works fine for a mock up, later on you can refine your “arts and crafts” any way your imagination lets you.

==

so… where does the magnification come from? several places…

1) the focal length (FL) of your glass lens, or camera lens. A 135mm lens? is a 135mm lens… doesnt matter if its a 135mm “cannon EOS lens” or a 4 dollar “surplus shed” 135mm FL “objective lens”. Both will work identically here.

because we are using any length of PVC pipe we need to? anything works. (2 feet “plus” is a good starting point, you can cut off later when you know what you will need. I’d leave the extra on though… the closer you mount to the work surface? the LONGER the focus will get, and it grows in length QUICK

the HIGHER the FL of whatever lens you picked? will give you higher magnification.

2) the size of your sensor on your CAM… theres a camera rule called “crop factor”. When you draw your first image up with white paper? you will notice that the “image” is way bigger then the sensor,most of it is “wasted”… the smaller the sensor, the higher effective magnification you will get. I use 1/3” sensors in my OTHER projects all the time, i would get LESS magnification than when i use my cheapie USB webcam… cheap wencam sensors will tend to be tiny. If you THINK about it, thisd makes sense from a photography viewpoint. the SAME lens on 2 different camera? will give drastically different magnification… if the cameras have different size film or sensor.

so… the SMALLER your CAM sensor is? the HIGHER the magnification will be. Ironically for us, the cheaper webcams? have TINY sensors, which will yield high magnification… which is great for us, free extra magnification.

3) distance to the work surface., the CLOSER you can focus up (assuming you have the extra tube length, lol)the HIGHER the magnification will be. This is easy logic… take a picture of your cat 1t 100 yards, then take a picture of your CAT from 6 inches away… which one has more magnification?

for your TRIAL RUN? focus on somethng across the ROOM, it will be slightlyless “demanding” to focus up. Choose “2 feet” as a working distance to start out on the work surface… you can practice “coming in” and focusing longer as you go. I keep ending up somewhere around 12 inches or so on both of my units, and i have too much magnification (a good problem to have, lol)

=

i will continue this, by adding pictures of various stages of my “build” to make it easier… and some tips and tricks i have picked up, because i do this all the time for other stuff, i am used to it.

but, if all you DO, is focus up a “twisty CFL” with a few lenses around your junk bin onto a piece of white paper? You know all you need to know, to succeed at this.

OK… this is arguably the most important pictures to this project. First up? This is just a lens that i found on the sidewalk? Its a LENS out of a pair of simple READING GLASSES. Nothing fancy…

=

THIS is a “control picture” of nothing on of all things, a CREE REEL box…

===

And finally? Theres a “twisty” light, AKA a CFL light… on the ceiling more or less right above me… you can SEE how a lens will “project” an I-M-A-G-E when you get the focus distance right. Rough guesstimate HERE, it ended up something like 4 feet to the LIGHT, and maybe a foot or two to the BOX we are projecting the image onto.

==

honestly? instead of projecting the IMAGE onto a CREE BOX label?? You’re obviously going to do the same thing, and project the image onto the USB CAMERA, after you remove the casing and the tiny “board lens” off… you simply do the same thing as in the picture? with YOUR lens whatever one you picked, and project the image onto the bare sensor of the CAM.

I’ll do pictures of my setup next… but really? NOW you know how to do the project. Its childs play, there’s no “tech” to it… its just arts and crafts time, really.

PS - you can project an image just like i did here? With a real camera lens you are holding in your hand… with a bare glass lens… anything.

PPS - honestly? when you use a ZOOMIE, and you project a image of the emitter out? you are doing the exact same thing, just in reverse.

and? here’s the PICS of the build itself.

first up? heres the complete unit, in operation… of the things to notice? Thats a 2-liter empty bottle of MtDew, and its demonstrating WORKING HEIGHT. If you look CAREFULLY? you can just make out the PENNY i show pictures of, and the green thing is the old PC memory card. The way everything is sitting? is EXACTLY where it actually was when the super high magnification pictures i posted were taken. “too much” magnification, with an entire 2-liter bottle of “working room”. (this isnt “where i would work soldering”, it was just a handy place to MOUNT IT to get it working. When i make a bracket to hold and adjust height? I will post pics of that too)

next up…heres the 2 tubes separated. The fat tube? is for lack of a better word the “lens tube” because thats all it is… a long fat tube with a LENS at the end. The gray thing is 2 “couplers” taped together to hold the camera lens. A-N-Y lens i can cram into a 2” coupling? i can swap them in and out in seconds. I could, if i wanted to? glue the “eyeglass lens” in a coupler, and slap it on there. The “thin tube”? Thats again for lack of a better word, the “camera tube”. The USB cable comes out the top, the bottom contains the CAM board. 2-liter bottle of MtDew for size scale. NOTE that the tubes are laying exactly as they were together when taking the pics you saw of the penny… gives you a clear idea of how far away the camera from the lens is.

front view of just the “lens carrier”. Its simply a pair of 2” couplers taped together, and one is machined out to accept the lens body, which i also machined down. I dont NEED the “body” of the camera lens, nor any focusing mechanisms… focus is by moving tubes in and out, the body and focusing mechanism are just dead weight and un-needed girth. Whatever lens you put there? will work.

===
rear view of the lens carrier…

heres a close up of the “business end” of the “camera tube”. NOTE that the camera board is naked, and has the webcam lens taken out… the pink square is the “sensor” that gets the image. also note the coupler on the end of the camer tube, it holds the camera similar to how the other coupler held the lens. I would cement this in when i was sure i was happy with it? but… it will get replaced by “hi def” to replace this VGA unit. also note, that the CAM board is slightly recessed in. This way? if i DROP it on the floor working on it, or, drop it “down the tube” it wont smack off the rear of the lens, which the lens is also recessed in its carrier. i think this tube is 1-1/4” with a 1-1/4” coupler to hold the camera. I “shimmed” it with a few winds of tape, to a sliding fit. I dont want the tube too cockeyed, this keeps things reasonably lined up straight. (alignment? not critical… minor slop and misalignment within reason is fine) NOTE also, that the CAM board is easily held in with 2 tiny pieces of pipe, one below and one above. Easy and secure enough.

===

like i said? theres really very little to this.

Future upgrades as i work on this? I will make a simple bracket to hold the tube assembly, and facilitate changing work height. I have too much magnification, so, i will have to INCREASE the working height, just to get the magnification DOWN to where its “reasonable”, lol… (which is a nice problem to have)

i am also going to drill and tap the very top of the “fatter lens tube” to accept a small plastic bolt… it will get finger tightened to hold focus. Right now? I cram a piece of cotton in tight to hold focus, LMAO. (works fine, though)

also, on the theory of “because i just can”? i will get a “real lens camera mount” to facilitate swapping C/CS mount lenses in and out more often than i change underwear. WHy? wellllll, because this thing just happens to accidentally also be a “digital spotting scope” as well as a microscope, lol…

if theres anything anyone doesnt understand? feel free to ask… but really? this is about as straightforward as it can get, i think.

===

final note: if you go on EBAY and look at a-l-l the “USB microscope” for sale? if you look hard enough, you WILL see a few “not entry level” higher end commercial units… they start at 600 and go way up from there… the 600 dollar unit i looked at a little bit? Seems to have similar working height to mine… uses real camera lenses, like i am showing here… also, the “real commercial units” mostly seem to be using “long focus tube build style” like mine is made. Theres probably a reason for that? It simplifies the engineering and development, it simplifies the focusing mechanism, it reduces the number and complexity of lenses. it simplifies changing lenses in and out (both design or end user)… and really, this isnt a “EDC” item, its a “workshop device”.

ha ha… i slap a 5MP webcam in here to replace the 2 dollar VGA unit? I am then having a comparable unit to the BIG units that are very expensive…

for the price of warhawks entry level unit? you can easily make a unit that “keeps up with the jonses” that might own a 600 or 1200 dollar unit…

since i can SWAP lenses as simply as slapping a different coupler on the end? i could make themagnification even higher, but, theres really no point… i am already past “silly magnification” anyways… but still, it can be hot rodded even more…

i plan on making a small wooden or plastic “X-Y” table i can turn a screw and move the work piece in 2 dimensions… you know, ultimate in convenience even though i dont need it?

Awesome!

In the immortal words of the interwebz

yes… i am getting to the pictures… lol

there is a certain irony in play here? that i dont own a half decent camera, lol… and my new cellphone doesnt hook into my computer easy like my old cell did.

Thanks sedstar. It’ll be exciting to see some of your pictures. I have a computer monitor that I think has a webcam. I may dig into that. Not sure what will yield me a nice lens though. I’ll have to think about that one for a while.

If you have android get ES File Explorer, you can view windows shares on your phone…setup a writeable directory on your computer…upload thru your network
.
https://play.google.com/store/apps/details?id=com.estrongs.android.pop&hl=en

And NICE on the night vision…that is going to be way cool to look into!

well, if you do THIS project, and see how EASY it is? the night vision will make a LOT more sense. I have more issues with the “nuts and bolts” than i do with the “tech” aspect (of this or the NV projects)

okay. I found another phone, one i never activated? its way cooler than the phone i use. (why? i dont know, lol) anyways, i can now take decent pictures, and this phone is easy to get onto the computer.

i put the most important pictures to the project up. NOW if you read it? and look at the pictures? it’ll make more sense.

i think, most people, are “overthinking” this… its REALLY straightforward.

===

a 2 dollar webcam from HongKong on ebay? will get you VGA 640x480… which is the resolution WARhawks 70 dollar system runs at… i have the same resolution for TWO DOLLARS. If you WANT the high resolution? you will be buying a more expensive WEBCAM… Next i will post some images of the actual build…

EDITORS NOTE: the “soft focus” and slightly fuzzy images of mine in use? are just because the IR filter was inside the crappy tiny board lens we get rid of… as soon as i find one of my IR filters, i will fix that.

This sounds real interesting. I will read at home when I have more time. Thanks sedstar. :)

:+1: