Higher resolution (but inexpensive) "microscope" camera - Page 1
Forum section: electronics / general

author: forrestc
author_rank: Unknown
timestamp: September 27, 2018, 10:59:47 pm
content: On the manufacturing line, I'd like to add a step where we take a high resolution picture of each board/small panel just before it gets the connectors put on. Possibly do some vision inspection at the same step.To accomplish this, I'm hoping to find an appropriate high resolution camera/lens combination which can be easily mounted on a stand. I'm tempted to pull the trigger on the $500 microscope camera Dave just did a video on, but I really would like something where I can snap a bit higher resolution picture and then store that image with the traceability data on the products. I note that there are several non-autofocus cameras out there up to 16mp, perhaps more. At the bare minimum I could take one of these, stick a wifi card in the sd slot (possibly using an adapter), and grab the images automatically that way. But I'd rather be able to do it through usb or other less-finicky options.Cost is always important, but tempered with the fact that time is money too....Anyone have good luck with any particular cameras doing this type of stuff?

author: mrpackethead
author_rank: Super Contributor
timestamp: September 28, 2018, 12:41:19 am
content: I'd love to put several of these in my line.. One post solder paste, one before reflow and one after reflow. Software is a real challenge as well.

author: mrpackethead
author_rank: Super Contributor
timestamp: September 28, 2018, 01:02:41 am
content: Quote from: blueskull on September 28, 2018, 12:50:09 amIN deed. But it comes at a price that is way too high.

author: forrestc
author_rank: Unknown
timestamp: September 28, 2018, 03:03:52 am
content: Quote from: mrpackethead on September 28, 2018, 01:02:41 amAnd the ones which are at least somewhat in reach price-wise tend to be way too slow. I've done various analysis of cost savings/defect savings/etc, and we just don't have enough volume or a high enough defect rate that we want/need a full AOI or an AXI. If I ended up with a decent higher resolution camera, I might consider writing a bit of code in opencv to look at the common fault locations in an automated way, but that's just a bonus.Right now, I just want an image of the board to add to our existing ATE data we collect for every board which goes out. But it needs to be high enough resolution so that you can actually see the individual pins on reasonably fine pitch TQFP's and the like.

author: mrpackethead
author_rank: Super Contributor
timestamp: September 28, 2018, 05:29:45 am
content: Quote from: forrestc on September 28, 2018, 03:03:52 amWhy do you want to collect image data? That intriges me.

author: Berni
author_rank: Super Contributor
timestamp: September 28, 2018, 06:01:07 am
content: Having photos can be useful later when things go wrong.You can look at the serial number of the problematic board and go find photos of it in the production process. Especially if the boards are given to a client for final installation.

author: forrestc
author_rank: Unknown
timestamp: September 28, 2018, 07:38:30 am
content: Quote from: mrpackethead on September 28, 2018, 05:29:45 amA few times a year we get a return which we wonder for various reasons we would like to know the status of the board before we sent it to the customer. Mainly it's things which are causing flaky in-field failures which sometimes are caused by something we missed during inspection, such as a missing regulator cap or a bridge in a spot which doesn't cause the board to fail test, but causes an in-field failure. We've found that having a customer send a picture of an in-field circuit board helps greatly with troubleshooting, assuming they can get enough resolution. I'd like to be able to supplement this with these images (perhaps to look at before we get to that step).My hope is to find some way to collect the images in a low-time-impact manner. I'm still working through the details, but one thought would be if we can replace the pcb barcode scan step at certain spots in the process with a high resolution camera (which also captures the barcode information) then we can gain this imagery effectively for free time-wise.Another place where we think this might be useful is if you capture pre- and post-rework imagery, and you have a problem, you can not only see that the board was re-worked but what might have changed in before and after images. I'm sure there are lots of other applications which will present themselves. One in particular I might end up playing with is described athttp://www.bobbaddeley.com/2015/12/06/creating-an-automated-optical-inspector-for-50/One thought I've come back to a couple of times is to get an older DSLR and an appropriate lens and mounting apparatus. For instance canon DSLRs have fairly decent USB support in python which would allow me to capture an image. But I'd really rather get something a bit simpler to deal with.

author: mrpackethead
author_rank: Super Contributor
timestamp: September 28, 2018, 09:17:45 am
content: Im going to be moving our factory line soon, and i'll be inserting some slightly longer conveyors inbtween the machines. A bit of thought for this, now might save some time later.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: September 28, 2018, 09:36:16 am
content: Maybe a consumer digital camera would be useable for this ?

author: Domagoj T
author_rank: Frequent Contributor
timestamp: September 28, 2018, 08:59:17 pm
content: A project I've been working on for the last year or two (read: has been sitting in a drawer in half assembled state) is a USB web cam with a manual SLR lens.You can pick and choose which USB camera you want to use, but its lens should be removable. Some are glued in a way that it's hard to detach it from the sensor without damaging it. Avoid those.A manual full frame (it could be APS-C lense too, it really doesn't matter) 50-100 mm prime (not zoom) lens will give you exceptional magnification and working distance. Nothing I've seen on the market comes even close to the Canon 100 mm Macro lens regarding magnification capabilities and focus distance. Unfortunately, it's not manual so it's tricky to adjust aperture. The manual lens l have is, IIRC, 85 mm which is a bit less flexible in terms of focus range, but still more than serviceable (the Canon one has unusually large focus range).I've also tried zoom lenses, but the ones I've tried had much narrower focus range and were less suitable.The downside is the USB connection on the web cam I have, which has a bit of a lag. Also the image quality is not as crisp as you can get, but the camera was only about $30, so what could you expect, right?

author: Kleinstein
author_rank: Super Contributor
timestamp: September 28, 2018, 09:42:08 pm
content: A board inspection is more really microscope, maybe not even a true macro. A reasonable close up function should be sufficient. Good lightning is also important.There is a chance some consumer camera could work (e.g. 16 MP sensor). It's just finding one that also works well as a web cam, e.g. picture transfer and supply via USB. Even an older/low end DSLR model might work. With a large SD card one may even consider just changing that card every day / weak, after a few 1000 pictures.

author: mrpackethead
author_rank: Super Contributor
timestamp: September 29, 2018, 04:26:12 am
content: Quote from: forrestc on September 28, 2018, 07:38:30 amI had a play with that software suggested above, but other than that, i have yet to find anythign else. I DIY AOI system would be awesome.

author: Berni
author_rank: Super Contributor
timestamp: September 29, 2018, 09:32:54 am
content: Using it a sensor as a webcam starts to become problematic at such resolutions.Getting 1080p 60fps to fit over USB pretty much requires USB 3.0 already. You can fit 1080p 30fps over USB 2.0 with enough compression, but having too much other crap on USB can screw it up already. And this is only 2 Megapixels.At 16 Megapixels that's a lot more data, even with fast transfer speeds its difficult to get more than just a few frames per second. So consumer digital cameras have a good reason for not supporting webcam mode. Its not as simple as connecting USB to the CPU and writing a bit of software.The best bet is probably using a cheap DSLR or mirrorless camera. They often have remote control capability where they can be connected to a PC in some way and allows remote setup and shutter triggering and then retrieve the final image. Photographers sometimes use such functionality when shooting on a set to make things more convenient. You can probably trigger the camera pretty precisely so that the board doesn't have to wait for long for its photo. If very bright lighting or a flash is used then the board can be imaged while its still moving on the conveyor. The camera can likely spit out JPEG rather than RAW too so you already have the image in a good format for archival. Yes JPEG is lossy, but it does a great job of shrinking down photographs while still looking good enough when the quality is set reasonably high. When you take thousands of photos per day it really does matter a lot if the photos are 5MB or 200MB

author: Smallsmt
author_rank: Frequent Contributor
timestamp: October 01, 2018, 11:14:41 am
content: QuoteWe are doing just nowhttps://twitter.com/SMALLSMT/status/1046411818959343617

author: mrpackethead
author_rank: Super Contributor
timestamp: October 01, 2018, 07:43:13 pm
content: You've been doing a lot of things for a long time. We've seen lots of high resolution renders, and lots of pics of Chinese machines that you import and rebrand. With the 20+ staff you've got in your facility in Germany plus the extensive network in China, you should have this done soon I' sure. Right after you've finished the machine that will only be another month away. :-) What the heck was the point of your post.

author: Smallsmt
author_rank: Frequent Contributor
timestamp: October 01, 2018, 08:19:50 pm
content: Nice you are my new product manager

author: mrpackethead
author_rank: Super Contributor
timestamp: October 01, 2018, 08:43:02 pm
content: My first job would be to peformance management delivery of promises.

author: Smallsmt
author_rank: Frequent Contributor
timestamp: October 01, 2018, 09:02:32 pm
content: I think we delivered already a lot of good products and ideas.No other chinese PNP manufacturer has wider product range.If you need to buy our german PNP machine you should look for ATN in Berlin they prepare a new machine soon using our mechanics.And believe me if I will finish the development too step by step!But now we are able to deliver a very good machine called VP-2800HP-CL64 doing mostly the same job.We finished the development in summer this year when I stayed in China for 3 weeks.Now we add PCB inspection systems and reflow oven to our product range´.Yes the reflow oven is rebranded like all other factories do too but we improved the oven to meet the CE!And finally we do the customer service and care the warranty.

author: Kjelt
author_rank: Super Contributor
timestamp: October 02, 2018, 08:28:46 am
content: Back ontopic, will one picture tell the whole story?As could be seen in Daves $500 camera video the tombstoned cap could not be identified from a single picture from above.You need at least one more picture from an angle, better a few different angles.

author: mrpackethead
author_rank: Super Contributor
timestamp: October 02, 2018, 08:35:23 am
content: on all but the smallest boards, its going to need more than one picture to be able to look at the entire board, to spot issues, it strikes me that it may be more cost effective and a whole lot easier to have an array of low cost USB cameras, than to have one that moves around...

author: Smallsmt
author_rank: Frequent Contributor
timestamp: October 02, 2018, 08:41:44 am
content: QuoteWe use multi angled and multi color light first.One option is to move the PCB in different angles under the camera.The next upgrade is a 4 camera system but it's not a cheap system.

author: Kjelt
author_rank: Super Contributor
timestamp: October 02, 2018, 08:53:09 am
content: Quote from: mrpackethead on October 02, 2018, 08:35:23 amYes or rotate the board while it passes the camera, could be an option.If time is critical combine it with another step in the process like after loading it in the flying probe tester or exiting the reflow oven.

author: b_force
author_rank: Super Contributor
timestamp: October 02, 2018, 09:01:49 am
content: I don't see the problem?Get some macro extension tubes (for 30 bucks incl AF) with a decent lens and decent mirrorless or DSLR.Nowadays there is plenty of software that let you control everything.Especially just taking stills is not a big issue at all.Don't forget to mount a polarizer as well.

author: mrpackethead
author_rank: Super Contributor
timestamp: October 02, 2018, 09:07:12 am
content: Quote from: Kjelt on October 02, 2018, 08:53:09 amI figure a Panel of up to A4 size could be imaged by 12 USB ( 4 x 3 ) cameras very cost effectively. I imagine them being around 200mm above the pcb.. The cameras are cheap ( 20-30 USD in china ).

author: b_force
author_rank: Super Contributor
timestamp: October 02, 2018, 09:15:05 am
content: Here an example how you can even control it with a raspberry.Hook it up to you LAN and you can even use it remotelyhttps://youtu.be/1eAYxnSU2awAnother idea is using a USB capture card.Or use a dedicated card if you build a system anyway(Which are a lot cheaper)

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: October 02, 2018, 09:18:12 am
content: Quote from: mrpackethead on October 02, 2018, 09:07:12 amAIUI it's hard to use multiple USB cameras as they all have the same IDs, if nothing else they may enumerate in different orders.

author: Kjelt
author_rank: Super Contributor
timestamp: October 02, 2018, 09:36:12 am
content: Quote from: mrpackethead on October 02, 2018, 09:07:12 amAbout that, the rest of the process including the endmilling/breaking of the pcb's is than not captured.

author: Smallsmt
author_rank: Frequent Contributor
timestamp: October 02, 2018, 09:42:37 am
content: We started talking about a cheap system first.So the microscope cameras are really great now and the first step is a manual inspection where a person is moving the PCB under Kamera and deciding it's good or bad.Next step is to do a PC software to do the job of the operator.And finally the PCB need to get moved automatically ore a multi camera system do the job.But first it need a base system.

author: mrpackethead
author_rank: Super Contributor
timestamp: October 02, 2018, 09:44:31 am
content: Quote from: mikeselectricstuff on October 02, 2018, 09:18:12 amThat can be quite a challenge!

author: forrestc
author_rank: Unknown
timestamp: October 03, 2018, 04:47:38 am
content: Quote from: Kjelt on October 02, 2018, 08:28:46 amIt really depends on what you are looking for.I've seen various tools where a 3d map is built either with stereo cameras or often with focus stacking. Or some combination thereof. Then you can 'see' any tombstoned components just because they are thicker on one end.For what I would look for, a lot of it would show up with an adequate resolution short from above. Incorrect resistors. Missing parts. Bridges, and so on.The top view is sort of the low hanging fruit which will get a lot of the way toward usable. Beyond that you do need angles and/or 3d views, with 3d seeming to be fairly common anymore since with a good 3d AOI system you can even estimate solder fillet volume.