Camera for viewing entire PCB - Page 1
Forum section: electronics / general

author: Mangozac
author_rank: Frequent Contributor
timestamp: December 14, 2020, 07:55:23 am
content: I'm really not very knowledgeable about optics and I figure someone here will have done something similar.After our pick and place we have an inspection conveyor. When the board comes out the PNP operator manually checks the board for any issues before pressing the button which sends the board into the oven. Obviously bending over the conveyor to look at tiny parts gets old pretty quickly so what I'd like to do is set up a camera and monitor.We have a nice inspection microscope camera but the focal length (not sure if that's the right term?) of the macro lens doesn't allow us to fit an entire board in the field of view. Let's say the maximum PCB size would be 200x200mm. Is all I need a standard HDMI video camera? Will it be able to get a short enough focal length?Edit:Smallest chip components we use are 0603.

author: SMTech
author_rank: Frequent Contributor
timestamp: December 14, 2020, 12:46:17 pm
content: If you take a look at the AgnosPCB cloud AOI system they will sell you a setup that uses a standard camera which you are also free to copy as its built using pretty standard partshttps://www.agnospcb.com/agnospcb-inspection-platform.If you are a camera nerd you may be aware of other cameras that have similar USB control with a decent mix of megapixels and price, pretty sure every big brand has such a thing.I think they may all be better than the weird phone camera in a box inspection magnifier type offerings in both features and value.

author: Gribo
author_rank: Frequent Contributor
timestamp: December 14, 2020, 03:12:07 pm
content: It really depends on the feature size you want to resolve. If you are using 01005 components, on a 200mm by 200mm board, you will need ~40 Megapixels just to be able to see the component. For bigger components, the task becomes easier (0402 will require ~10 Megapixel for the same board size). Now, that is the ideal case, without taking into account the various distortions and other sources of noise.

author: asmi
author_rank: Super Contributor
timestamp: December 14, 2020, 04:27:25 pm
content: Typically you don't really need to look at entire board with huge resolution, because there tend to be few "hotspots" where problems commonly occur, so you can set a few close up cameras for these regions of interest, and then use some CV algorithms to automatically flag some boards for further manual inspection.Although I can see utility of storing entire board images in archive for some more complex/expensive boards and/or some "special" customers (like military/government) who will give you a lot of grief unless you cover your backside with paperwork at least several times over.

author: phil from seattle
author_rank: Super Contributor
timestamp: December 14, 2020, 05:07:10 pm
content: If you don't mind assembling some parts, the RasPi 4 with the new HQ camera and a decent lens would run you about $150 and has HDMI output. It is 12 MPix. The advantage is there are a lot of different lenses to choose from so you can frame your board precisely. For a bit more money, there are zoom lenses that would allow you to adapt to different size boards. There is even a python interface that allows for automation - you could trigger a photo. And, the Pi sw allows sharing over the web so you could sit away from the production area.I have played with the HQ camera some. It is definitely not a toy. I like my Olympus cameras better but the quality of the Pi HQ Cam is surprisingly good.

author: Mangozac
author_rank: Frequent Contributor
timestamp: December 14, 2020, 10:24:45 pm
content: Quote from: SMTech on December 14, 2020, 12:46:17 pmI had seen those guys but not the camera setup. Indeed it should be easy enough to replicate.Quote from: Gribo on December 14, 2020, 03:12:07 pmGood point, I neglected to comment on that. We only go down to 0603.Quote from: asmi on December 14, 2020, 04:27:25 pmSurely dealing with parallax errors and distortion will make that a harder task then it would initially seem? Also, we do a decent mix of boards, so rejigging the camera positioning for each one isn't feasible.Quote from: phil from seattle on December 14, 2020, 05:07:10 pmI like the idea of this and the opportunity for automation in the future. I see that they have a couple of different lenses available - can you suggest which one (if any) would be most suitable for this application?

author: Mangozac
author_rank: Frequent Contributor
timestamp: December 14, 2020, 10:27:45 pm
content: Has anybody tried out this project named Examinator?https://bitbucket.org/guenterneust/examinator/wiki/HomeI stumbled across it on a single post here on EEVBlog. Looking at the commits it seems to be still very actively developed and it can run on a Raspberry Pi, so theoretically could be used with the above discussed camera. Unfortunately compiling a project with that high a level of complex dependencies is way beyond my experience

author: phil from seattle
author_rank: Super Contributor
timestamp: December 15, 2020, 01:19:35 am
content: I bought 2 lenses. One is complete junk - 25 mm f 1.4. It was maybe $12. The other is aYohii zoom 3.5mm to 8 mmand is quite nice considering how cheap it is - about $14. The PiHQ has a 12.5X crop factor so that works out to be the equivalent of a 44-100mm zoom lens for a 35mm camera. It might be ok with the right lighting. A ring light is probably called for here.It can use C or CS mount lenses of which there are quite a few. The 16mm lens the Pi foundation sells with it ($50) looks pretty nice but I don't know if it would work for you - it's the 35mm camera equivalent of 200mm. I suspect you will need to buy a few to find just the right one. I would get a zoom initially to figure what FL works best for your application but you might be able to figure that out with 35mm camera - using a DSLR, be aware of the crop factor. The other thing to be aware of is the min focal distance of the lens. A lot of them don't tell you what it is but generally the larger the FL the bigger the min focal distance. If you have a lot of space above the line, it may be ok. Probably good to have it fairly far above so it doesn't interfere with operations.I'm also looking at building a microscope with it using a Pi Zero. Pretty cheap. I have a little microscope I use for optical inspection of products I sell but it is very tedious. I really want something that is a bit easier to use. Slide the board under it, automatic snapshot and puts it on my screen.

author: Mangozac
author_rank: Frequent Contributor
timestamp: December 15, 2020, 08:58:35 am
content: Thanks Phil, that's some good info! I'll grab one of those Yohii lenses and try it out. We have essentially infinite space above the line but practically we probably want to keep the distance between camera and board as small as possible. Maybe 500mm?Indeed, if nice, even lighting is required then a ring light is a necessity regardless.Quote from: phil from seattle on December 15, 2020, 01:19:35 amI got an inspection microscope camera from the SEG markets in Shenzhen a year ago and it has been awesome. One of those things I don't know how we lived without! I just tried to find something similar on Aliexpress but no luck. The guy basically assembled the system from random parts while I was there at his stall trying them out - being able to see the differences in the image quality in person was invaluable. All in I think the setup cost me around AU$200 (plus a spare monitor we had laying around).

author: olkipukki
author_rank: Frequent Contributor
timestamp: December 15, 2020, 09:49:09 am
content: Quote from: Mangozac on December 14, 2020, 07:55:23 amIs it more or less you are doing right now (1) and upgrading to something like that (2)?(1)https://youtu.be/24ehoo6RX8w?t=384(2)https://youtu.be/VP1gRukB59Q

author: Mangozac
author_rank: Frequent Contributor
timestamp: December 15, 2020, 11:59:20 am
content: Quote from: olkipukki on December 15, 2020, 09:49:09 amYep, you've nailed it!Link 2 is interesting that the camera is still quite zoomed in and on the Cartesian arm like that. Still, for inspection pre-oven (where all you're really interested in is component alignment and not missing) I feel like a less zoomed view would be preferred. Maybe have the camera on an arm to swing it out of the way when you want to look at the board with your own eyes and nudge a part into alignment.

author: olkipukki
author_rank: Frequent Contributor
timestamp: December 15, 2020, 12:35:05 pm
content: "Obviously bending over the conveyor to look at tiny parts gets old pretty quickly so what I'd like to do is set up a camera and monitor."Wonder what is your main objective? Just save a person neck cracking?

author: Mangozac
author_rank: Frequent Contributor
timestamp: December 15, 2020, 07:21:56 pm
content: Quote from: olkipukki on December 15, 2020, 12:35:05 pmMore their back than their neck, but also saving their eyes from fatigue.