About AOI, AXI, SPI - Page 1
Forum section: electronics / general

author: pisoiu
author_rank: Regular Contributor
timestamp: April 24, 2019, 07:32:59 pm
content: Hi all,As I wrote on other posts, I am planning to purchase a smt line. I've done all my part from an engineering point of view but now I have to wait for other issues to be solved, such as resolving problems with the location where it will be installed, power upgrade, esd floor, business related issues, etc. In the best case, line will be purchased (if will be) in the second half of this year. The equipment considered for now is paste mixer, printing machine, pick and place, oven and some bits (conveyor, feeder carts, etc). No budget for inspection for now, it will be done manually. Maybe in the future, some inspection machines will be considered for purchase.Until then, I would like to ask for some help to better understand this subject with inspection because I have some gaps in knowledge.AOI, from what I have seen, mainly used at the exit of oven to inspect final product. SPI seem to be ignored in many cases and AXI for those who can afford and where is a must (BGA).My questions are:1. AOI and SPI seem similar tasks. Is is possible to use generic AOI machines for SPI ? Or is SPI some sort of 'extra' function or option for AOI machines?2. AXI is used definitely for BGA but recently I have seen some defects specific to QFN packages, which I use a lot (voiding on ground pad or inconsistent paste depositions on QFN edges) which are impossible to detect at AOI, they are under package. They can be seen on AXI only. Is (in this case) AXI preferred for QFN also? Or considering that many QFN specific defects are originated in paste process, a good SPI will solve problems in such a manner that AXI won't be necessary anymore?3. For paste printing/pick and place/oven there are chinese companies whose products are reliable enough to a certain degree for production. I would like to know if there are similar companies for AOI, SPI and AXI machines and who are those.Thank you.

author: nisma
author_rank: Regular Contributor
timestamp: April 26, 2019, 09:34:47 am
content: If the camera movement is not too slow, every AoI can do 2d SPI.Cheap commercial software,http://paksvv.com/eng/opticheck-software.htm,open source, just download and compile it from bitbucket.

author: Reckless
author_rank: Frequent Contributor
timestamp: April 26, 2019, 04:09:36 pm
content: I have a Marantz dl460 for sale. It does SPI and AOI both. Looking for $6,900, located in Chicago. Very easy to use and work on. Can learn in 10 minutes.

author: mrpackethead
author_rank: Super Contributor
timestamp: April 27, 2019, 04:30:33 am
content: Quote from: nisma on April 26, 2019, 09:34:47 amHave you got a link to the download? I coud'nt find it. That web site is quite old!

author: pisoiu
author_rank: Regular Contributor
timestamp: April 27, 2019, 05:57:10 pm
content: I was not able to download either but I have found some datasheets on one of the distributors websites. Thanks for the links.What intrigues me at this point is that (from what I've been able to see on net) there is no software for the simplest forms of AOI, something based on images coming from a flatbed scanner or a digital camera. I understand that many defects can be seen only with angled cameras, directional illumination, etc. But I believe that at least some of the simplest defects, ex. missing component, can be detected just by taking a simple picture and compare it with a 'golden board'. Of course, assuming that the same conditions (position, illumination, etc) are used when taking photos of the golden board and test board.

author: mrpackethead
author_rank: Super Contributor
timestamp: April 27, 2019, 07:29:12 pm
content: http://www.bobbaddeley.com/2015/12/06/creating-an-automated-optical-inspector-for-50/

author: nisma
author_rank: Regular Contributor
timestamp: April 28, 2019, 03:14:18 pm
content: One example for open source download is this:https://bitbucket.org/guenterneust/examinator/wiki/HomeIt was posted on this forum.SPI need one additional steps, unnecessary on other AoI. Finding difference of board rotation/offset and solder_paste rotation/offset. Based on components used and assembly class needed, the difference limit indicate if board is fail or ok. Clearly if the SPI uses component database including pins or the gerber files, the failure rate is a lot lower.This step is needed only if stencils are not aligned on fiducials for every board. There exist some manual frames that allow that too, beside of automatical alignment and motorized x1/x2/y stages.Actually, the epson 370 scanner is a good choice for spi if the lightning is a problem, otherwise RPI with 8MP camera and good illumination.

author: nisma
author_rank: Regular Contributor
timestamp: May 02, 2019, 04:28:16 pm
content: Do you have resolved ?if not i can share rudimental executable where the imput is a single pcb image that need to be rescaled to 635 dpi.It uses tiff images from gerb2tiff or from scanned and thresholded reference images.I can make available the win 64bit executable that does it.I have the rpi executable with some dependency and script that trigger the 20mpx camera, download the image, doing image distortion and resample to 635 dpi,but that is all not plug and play.

author: pisoiu
author_rank: Regular Contributor
timestamp: May 03, 2019, 09:02:36 am
content: Not yet, I have very little free time, as some of my colleagues are in holiday.But I will give it a try in the near future, I actually have a film scanner sitting around (epson 4990 photo).If you can share a win64 exe, it would be really helpful, thank you.

author: mrpackethead
author_rank: Super Contributor
timestamp: May 03, 2019, 09:19:22 am
content: Quote from: nisma on May 02, 2019, 04:28:16 pmI would be very interestined in finding out a littel more about this.I was wondering if a modify document scanner could be used to image the stenciled board, rather than a camera.

author: SMTech
author_rank: Frequent Contributor
timestamp: May 03, 2019, 09:27:51 am
content: Scanners are how FAI machines from Quinns, AOI systems and presumably the machine that PaksVV software was written for work.However on a pedantic note none of these, nor the basically non-existent open source versions (they all seem to be very dead projects) are AOI systems, they have a limited subset of inspection capability requiring constant human interaction and decision making, so I guess the A is Assisted not Automatic. Still useful but lots of annoying little things they can't catch.

author: pisoiu
author_rank: Regular Contributor
timestamp: May 03, 2019, 09:38:59 am
content: For me, at this point, I don't really need automatic. Assisted is fine and better than nothing, considering low volumes I will make.About document scanners I'm not so sure they will work. At least on my office scanner (canon mf8300c), scanning a board with components produces good clarity with the components on which the board sits on scanner, but fuzzy image on farther components (4-5mm away from scanner surface). Looks like a very shallow depth of field in the sensor system.I will try on the film scanner also, to see if there is any difference. On the bright side, with a scanner you won't need geometric corrections.

author: mrpackethead
author_rank: Super Contributor
timestamp: May 03, 2019, 09:53:19 am
content: The scanner i have on our office printer has a glass surface on which you put docuemnts. Obviously not very good for putting a PCB with solder paste on! ( before soldering ). I'm guessing you were using it for looking at a board that had already been soldered?the DoF will be small. Bu ti figure for most objects this wont' be an issue.I was thinkign of just getting a machine and taking the glass out and replacing it with a an ajustable carrier.

author: pisoiu
author_rank: Regular Contributor
timestamp: May 03, 2019, 10:06:28 am
content: I tested with a soldered boards, with components, sitting directly on glass surface. Of course, a board with paste will have to sit on some sort of support without touching the surface of scanner.I hope a film scanner have a wider dof. At least my scanner have some sort of plastic frames for films, and when scanning those, the film actually sits few mm away from glass surface. Will see.I would be a bit concerned about taking out the glass because of the dust, but if you have a clean shop, that won't be a problem.

author: mrpackethead
author_rank: Super Contributor
timestamp: May 03, 2019, 10:12:49 am
content: would you be able to post a link to your code?

author: SMTech
author_rank: Frequent Contributor
timestamp: May 03, 2019, 10:25:08 am
content: Quote from: pisoiu on May 03, 2019, 10:06:28 amFlip it upside down? No dust getting in there then.

author: nisma
author_rank: Regular Contributor
timestamp: May 03, 2019, 01:48:36 pm
content: You must use CCD Scanner, best to buy older one.Just a random example.http://www.microscopy-uk.org.uk/mag/artjan13/dw-scanner-type.htmlYes, upside down, like thishttps://mpetroff.net/2013/09/scanner-modifications-to-scan-large-documents/without modify the scanner.In case it is not using automatical transport, either attach use a hinge and put the scanner up and down, or use a ball guided drawer slider.Don't forget the option for two side pcb where one side is already assembled. In reality, using cheap 16-20MP camera, (important) that store the raw file (DNG, TIFF without embedded JPEG) works and it is possible to upscale in order to get the resolution, the illumination is more difficult. For two side option, if you'r pcb haveAs example the Epson Perfection 3170 Photo have 43mm DOF (sharp focus) above the glass. You can get it used for 20-50$/euro.

author: nisma
author_rank: Regular Contributor
timestamp: May 03, 2019, 04:59:40 pm
content: Quote from: mrpackethead on May 03, 2019, 10:12:49 amThe code is more a hack and not really intended for sharing. Further some plausibility checks is missing. I explain it here.It uses Tif Stripe processing in order to save ram, principally for rpi usage and two stripes are used in memory.There is not mutch differences on using 8Mb stripes and 32mb stripes for processing time.Basically it register the scan to the gerber image using round fiducials (hough circles), crop and translate it in order it is exaclty the same as the reference gerber or golden image.Then remove any color (hsv), filter out the pins (threshold), and threshold the image. The result is the solder paste.One addition step is to filter out any non color pixel, blur the image and compare it with reference image. If the blurred difference of this comparsion is greater then X pixel, thepcb is identifiead as defect inside the panel and it should not be assembled. This require having the gerber data, otherwise the single board cannot be separated from panel automatically.Now for every pin where solder paste should be present, increase the size by 1.5, make the sum of solder paste pixel, add the half of the countour length and multiply it with1900 (value depend on stencil thickness) and compare that against the gerber mask or golden board reference. 10000000 is 4.2 Gramm.Initially you should weigth 10 boards, 4x8 distancer and weight the same with solder paste applied in order to weigth the solder paste for correlate the real weight with2D measured weight.Additionally increase the pin size by 2, draw it inside blank bitmap, and add it to blank image with value 8.Now if the areas overlap (value > 10, just threshold and binary and with solder paste image) this is a big error as it produces shorts.Based on the peak of reflection of a single blob it could be possible to make a 3D estimation of the pad and doing better solder paste dispenced amount, for now the working solution is enought for me. This is the overall working principe, the details are a bit different and two stripes are processed at the same time, this means that if the stripe size is choosen too small, it don't work. On 210mm width, 8Mb Stripe size is equivalent of 26mm.This is the overall principle, in pratice it is a bit different, as example the 1.5 size increase, the solder paste blobs gravity center is compared if it fits inside that 1.5 times increasedpad size. Further all detected solder pads blobs are erased and if there remains some blobs, this is indicated as error.A lot of things are hardcoded or implictly parameterized, ... , and 10 stripes are opened the same time, eg. 8Mb Stripe size -> 80Mbyte usage, 32Mb means 320Mb of ram required,minimum suggested Strip rows is 512 Rows, this is 2,454Mb/stripe or less then 25MB of ram.Overall nothing so special.

author: mrpackethead
author_rank: Super Contributor
timestamp: May 04, 2019, 09:06:39 am
content: wow. that does sound like a lot of work that you've done.

author: pisoiu
author_rank: Regular Contributor
timestamp: May 17, 2019, 06:16:08 am
content: I'd say that's a decent image to work with, at least the DoF looks ok to me. On the first image, panel sits on those wurth caps, the're 6.5mm tall.I'm a bit concerned about that shadow on some components, I think it's because illumination is not on the same axis as sensor.Maybe it's good enough for some missing components and solder bridge detection. Image scanned with epson perfection 4990 photo.

author: mrpackethead
author_rank: Super Contributor
timestamp: May 17, 2019, 06:49:25 am
content: Interesting, looking at all those caps, they all seem to be slightly off axis? you can see one side of them, but not the other, and it seems to repeat itself both left and right. For a start i thought it was some kind of optical thing, but it seems maybe a placement.Does seem you'll get some pretty good resolution and imaging.

author: pisoiu
author_rank: Regular Contributor
timestamp: May 17, 2019, 07:36:46 am
content: They are definitely well implanted. I think it's an optical thing, the part that makes them look off axis is further from scanning plane. All caps on one side look tilted in same direction, opposite from the other side. Those in the middle are quite ok.

author: mrpackethead
author_rank: Super Contributor
timestamp: May 17, 2019, 08:20:46 am
content: The caps on teh left and right are 180Degrees rotated from each other as well. They are not in the same orentation. So i was not sure if it was a placement or optical issue.

author: pisoiu
author_rank: Regular Contributor
timestamp: May 17, 2019, 08:30:27 am
content: Yes, they are mirrored, it is because of that side connector, routing and vcuts, that required that boards on one side to be rotated with 180 degrees compared with boards on the other side.

author: mrpackethead
author_rank: Super Contributor
timestamp: May 17, 2019, 08:53:01 am
content: If its optical and you can see the sides , then is the image sensor not directly underneath each element?

author: pisoiu
author_rank: Regular Contributor
timestamp: May 17, 2019, 08:57:41 am
content: That's a good question. I don't know exactly how scanning head is built and what is the exact mechanism that causes this distortion.What I know for sure is that the components are placed correctly.

author: nisma
author_rank: Regular Contributor
timestamp: May 17, 2019, 02:44:24 pm
content: The scanner uses 45 degree mirror and this mirrors are not exacly 45 degree but a bit off in order to facilite the illumination with some manufacture tolerances.This causes this effect. It is possible to eliminate the mirror, but normally it is not necessary. In case it is absolute necessary, two runs could be used inserting the pcb in opposite directions. What here don't work is illumination. It is needed to add a led stripe with diffuser. Diffuser can be just white baking paper, white paper, using several layers if necessary.The image have jpeg artifacts and the resolution is low, so i don't know effectly how it is, the illumination from one side is missing. Here just a minimal preprocessing that show itshould work, with exception of the illumination from one direction that is too low.Nisma

author: pisoiu
author_rank: Regular Contributor
timestamp: May 17, 2019, 05:56:10 pm
content: Thank you.The image I attached in this post was resampled by me to a lower resolution and is heavily compressed because the forum won't let me attach big files. Of course, the images for analysis will be processed without compression.