DIY PCB Microscope

George Ou
4 min readMar 11, 2017

UPDATE 4/7/2017 — I finally got the SDI camera board after a month shipping. Unfortunately there is no ePacket shipping option. But the wait was worth it because it is as good as I hoped. The image quality looks as good as a super high end Digital Microscope costing thousands of dollars. Low light performance seems decent even though there is the expected graininess but there is no perceptible shutter lag. With a small desk lamp all the graininess went away. I will have to hook this up to a HDMI capture board to capture same samples and I will set that capture board up soon.

Latency looks very good after I fixed the input processing lag on my Samsung 4K TV. Initial setup was hard because the camera was set to PAL mode which confused most of my monitors that only recognize NTSC format. I had to connect to my 4K TV to see the problem. The cable adapter for the camera board had a clickable joystick that let me change all the settings in the camera including switching it to NTSC mode.

So far I’ve only tested this $7 8mm F/1.4 manual CS lens which ironically has the widest focusing range from a few inches to infinity because the focusing ring is just a dumb front element that will keep turning until the whole thing comes off. This primitive style of lens even lacks an aperture control ring. I may try this 25mm F/1.4 manual lens next for $11 next but that will require a sliding camera that brings the lens closer and further to adjust zoom.

The fancier zoom lenses seemed to have normal focal ranges of 3–5 feet to infinity but you really need 6 inches to infinity. Trying to make a fixed 2–3 mm spacer is a bit tricky because you immediately lose the longer focal ranges and the range changes with the zoom! You get the benefit of zoom if you can solve the focusing problem.

I hate all the existing USB or VGA PCB cameras because of their latency, low frame rate, low shutter speed (high image ghosting) and poor to medium image quality even if you spend $200 on a higher end PCB microscope kit. The working distance of 4 inches is awful and the depth-of-field suffers.

Here’s my ultimate DIY setup with HD-SDI 1080P camera board with very high frame rates, shutter speeds, and enough low light sensitivity to work in ambient light. I ordered the parts and I hope to tune it to 16 inch working distance.

HD-SDI 1080P 1/3 sensor camera board — $23.26
Cables for HD-SDI sensor board — $6.08
CS mount with IR Cut filter — $3.96
5–100mm CS lens — $42.47
3G-SGI or HD-SDI to HDMI converter — $19.74

Note: There’s is a small discount in shipping for the first three since they are from the same store. This store was responsive to my questions and were helpful.

Apparently this HD-SDI board under utilizes the 1/2.8'’ MN34227 CMOS sensor because it seems capable of cropped 4K resolution when it’s paired with an IP Camera board interface using the H.265 capable Hi3516D chipset. This sample video shows the amazing quality of the sensor, but other samples of this sensor I’ve seen on YouTube show it limited to 1080P resolution. Note that the IP camera version is not recommended for a PCB microscope because of the 100–150 ms latency.

To use these components in a PCB microscope, I will 3D print a custom camera chassis and print a 2mm custom flange spacer between the CS mount and sensor. I may need to experiment with different spacer thicknesses. Why not just use a 5mm standard C/CS mount metal spacer? Because 5mm is too much additional flange spacing and it forces you to put the camera too close to the subject. Furthermore it makes it impossible to focus at most focal lengths so the zoom becomes useless and the amount of adjustment you can make with the focus ring becomes extremely limited. The spacers also makes the lens more awkward.

Without the spacer you’ll be forced to have around 1 meter of minimum focusing distance at 100 mm focal length which may not be enough magnification. The shorter focal distances can be closer even without the flange spacer.

DIY PCB Microscope/Telescope

Previously I tested a $57.48 VGA output camera and it was better than USB cameras but still let something to be desired. The claimed 1600x1200 resolution was bogus and it maxed out at 1024x768. The ambient light performance was barely OK but more light allowed the shutter speed to perform faster and you didn’t have to deal with as much ghosting when you moved in the video.

I mounted the VGA camera on a metal tube with a 3D printed camera mount and a base that I bolted to a wood board. The wood board and plastic base had to be covered in Kapton tape to prevent burns.

The end result was usable but I found that I need to be able to slide the camera up and down since not all focal lengths would focus at a given height when a 5mm C/CS mount spacer ring was added. The camera mount needs to be redone to be able to tighten and loosen to move up and down.

I also tested this $59.51 USB camera (OEM YW500) and that was completely unusable because its typical frame rate was 5 fps at most resolutions. The best it could do was 9.15 fps at 1280x720 and it was still too slow compared to the VGA camera.

--

--

George Ou

Network Engineer. CISSP #109250. Former Policy Director http://DigitalSociety.org Technical Director & Editor at Large @ http://ZDNet.com. Ballet Dancer.