I work on a lot of PCBs, both at work and for my hobby. I'm fortunate (sort of) to be short sighted (myopia) so my close vision is excellent and above normal. Still, I sometimes need to get a really close inspection of a SMD solder joint because the reflection of light on the solder and also the flux leaves some unknown about the quality of the solder or a possible short.
Of course, if you have room and money, you can buy one of those inspection camera...
You can also turn your cheap webcam into a microscope using an replacement lens as featured as in this NICE hack-a-day article !
The way the lab is organized at home, the laptop is usually on one side of the bench and I didn't feel like using it for that purpose, especially because I don't need it often, then I don't want to move the laptop here and there. I wanted a more "portable" solution.
I *love* my Samsung Galaxy SII... it helps me organizing my busy life in so many ways... So I though I'll use it as a PCB inspector !
First I grabbed a cheap protection (hard) case on ebay, they cost just a few dollars. Then, I bought at deal extreme a x15 watch maker magnifier ($2.30). What is nice is that it does the magnification in the focal plane of the eye, which means that if you put a digital camera in front of it, it will see just normal (no macro mode or adaptation lens required).
I first tested with a spare (rubber coated) protection case and some car caulking.
Alignment with the phone lens is roughly done visually then fine tuned using a cross pattern (my cutting mat). The idea is to keep lines straight and tidy at the center of the picture.
Then I epoxied the lens on the final case, after sanding a bit the acrylic. That magnifier is nice as it has a clear plastic shell all around, so light can reach the object you observe. However, with the phone on top, light is more likely blocked.
I tried with the phone's onboard light (camera flash). I have an app that can control that led and puts it on as a flashlight but then the camera app won't load.
So I built a small annular lighting out of 10 x 0603 SMD white leds, all wired in parallel. With 8 mA each, it lights up perfectly. It has a little bit of an Arc Reactor :-)
To power the leds, I used a cheap OTG USB cable for my phone (really, just a micro to female B USB cable... $3) and grabbed the 5V there. I epoxied the wire on the case et voilà !
Result picture with a µSD card !
The phone keeps the focus after taking a picture, so it's easy to take a first dummy photograph, then move around your phone for inspecting the PCBs. Otherwise, you can press the camera trigger and keep it while you inspect, then slide your finger off the trigger button and release your finger, this way you don't take a picture (unless you need it).