Hardware assembly at small scale, i.e. when you need more units than just a few proof-of-concept prototypes but not enough for mass production, is usually done with Pick-and-Place machines that place SMD components on Printed Circuit Boards. This automated or semi-automated assembly is then followed by reflow soldering and verified by means of visual inspection performed by a technician or a machine to identify potential errors such as soldering defects or missing parts. A thorough visual inspection before starting with device bring-up is essential, as it helps ensure a smooth and efficient process while minimizing the risk of PCB component damage.

In a new addition to the transparent, open source-based hardware design and assembly flow Antmicro has been developing around popular tools such as KiCad and Blender, we present a solution for Automated Optical Inspection (AOI), using a setup based on an Opulo LumenPnP machine, OpenPnP software, and custom scripts that capture images of every PCB component and generate assembly reports.

In this article we describe Antmicro’s new PnVision tool, show how it complements our existing hardware development process, and demonstrate how it can be used to detect hardware assembly errors.

Automated Optical Inspection with PnVision

Automatic visual PCB inspection

For prototyping and small-scale PCB production batches, Antmicro has been developing an in-house assembly pipeline adopting an open source LumenPnP machine that works with the OpenPnP project under the hood. This approach gives us faster turnaround on prototypes and significantly better control over their assembly process.

The core assumption when creating PnVision was its tight integration with OpenPnP to be able to reuse the same physical setup and software stack for both assembly and inspection rather than introducing a separate inspection station and a parallel toolchain.

PnVision leverages the PnP machine’s mechanics to hover a camera attached to its carriage over each component, and capture an image that is then cropped down to the specific point of interest for that part. Alongside each captured image, it logs the specific assembly data needed for traceability, such as PCB serial number, tooling version and detailed component properties cross-referenced against Antmicro’s open source KiCad component library. This means every inspected image is automatically tied to a specific board unit, process configuration and component definition. For more details on how to use PnVision, refer to its README.

With PnVision, we can reduce inspection time and ensure full hardware traceability thanks to automatically generated assembly reports. The collected images also serve as training and validation data for AI-based algorithms for anomaly detection such as PatchCore, YOLO and DINOv2.

Additionally, the generated reports and component photographs can be analyzed by state-of-the-art LLMs to help detect and classify soldering defects, missing components, and other assembly issues, without the need for training dedicated detection algorithms. Combining automated image collection with AI-assisted analysis helps streamline quality assurance, reduce time that would otherwise be spent on manual PCB inspection, and improve the consistency and reliability of the PCB assembly process, while preserving original data for verification and traceability.

Identifying PCB assembly issues with PnVision

To showcase the capabilities of PnVision, we tested it with various open hardware boards. The interactive report below shows examples of different types of assembly issues we were able to identify using PnVision.

The boards were first inspected with PnVision, which generated a database of photographs of each component. PnVision’s output was then analyzed with an LLM that was able to quickly detect and identify defects such as position offsets or unpopulated footprints. The resulting report provides an easy to read overview of all inspected components, with clear indication where further action from the user is required. This approach can be freely adjusted to accommodate specific use cases, with advanced filtering, more detailed defect descriptions, cross-referencing with other inspection results, various file export options, and more.

Open source-driven hardware design, testing, assembly and inspection

Antmicro’s PnVision is another component of a larger, fully open source and automated hardware design process that starts at the concept stage and leads all the way to the validated physical product. This approach allows us to offer our customers rapid on-demand prototyping that remains fully transparent and reproducible.

We have already automated several steps of this pipeline, starting from KiCad production file generation using our component database, through design verification with thermal and signal integrity simulations, to the assembly process itself and PCB bring-up using our ICT tester and Protoplaster framework. Now we are expanding this workflow with an open source PnVision tool that will help detect assembly issues before bring-up.

Antmicro's hardware design process

End-to-end hardware development with Antmicro

With the new PnVision tool, we can provide efficient and cost-effective quality control of any hardware we develop for our customers, whether it’s assembled in-house or using external Electronics Manufacturing Services. Combined with other open source tools and workflows in our portfolio, it allows us to help bring your project from an idea to a final product, ensuring transparency and traceability at every step of the way.

If you would like to develop your next project with Antmicro or are interested in learning more about our engineering services, reach out at contact@antmicro.com.