Printed Circuit Board (PCB) Defects: A Deep Learning Approach
With the evolution of modern computing, Printed Circuit Boards (PCBs) are critical to modern life. It’s no wonder that the PCB industry is expected to grow by nearly $13B by 2025.
As overall demand for PCBs grow, fabricators will need to upgrade quality control to maintain standards. Fortunately, Simerse has an AI inspection solution that can help manufacturers keep pace with rapid growth.
First, let’s cover some basics. The PCB industry is in a state of change. One of the most recent changes has been that PCBs are no longer printed on paper, but instead are made with PCB fabricators. This shift to PCB fabrication has created new opportunities for defects in PCBs.
In this blog post, we will explore deep learning approaches to detect these defects using images from optical microscopes and how they can be used for PCB defect detection.
What are Printed Circuit Boards?
Printed Circuit Boards (PCBs) are electronic assemblies that consist of a substrate, copper traces, and components mounted on the PCB. The PCB is used to electrically connect these components together. PCBs are usually rectangular in shape and have a variety of different footprints depending on their application.
The most common type of PCB is the single-sided PCB. This PCB has one copper layer that is used to connect the components on the PCB. The double-sided PCB has two copper layers, and the multi-layer PCB has more than two copper layers.
The substrate of a PCB can be made from a variety of materials including fiberglass, epoxy glass cloth, and polyamide film. The type of substrate used depends on the application for the PCB. For example, PCBs used in high-frequency applications usually have a low dielectric constant (low-k) substrate to minimize signal loss.
PCBs are usually manufactured by either screen printing or photolithography. In screen printing, ink is applied to a mesh screen and then the PCB is pressed against the screen. This allows for a more efficient process than photolithography, which uses light to expose and develop chemicals that create PCB patterns on copper-coated fiberglass boards.
Why are PCB Defects Important to Detect?
As PCBs become more complex, the number of potential defects also increases. PCB fabricators are under pressure to meet tight tolerances and deliver PCBs that meet or exceed their specifications. PCB defects can cause PCBs to perform poorly, fail prematurely, and even cause PCB-based equipment to malfunction.
Fundamentally, AI-powered PCB defect detection can:
- Save time – Replacing defective PCBs can be time-intensive. Problematic boards must be picked out from the rest, and this is generally a manual process.
- Save money – Early identification of a PCB defect is critical. If a circuit board becomes embedded in a larger product, a faulty PCB can ruin an entire product.
- Ensure customer satisfaction – PCB defects that cause equipment failure could lead to a loss of business for the manufacturer, and could also damage the reputation of the PCB supplier.
What are the most common PCB Defects?
PCB defects can be caused by many different factors during PCB fabrication including residue left over from previous PCB processes or contamination of incoming materials used in PCB production.
Every year, sensors are improving both in quality and easy-of-deployment. Cameras, for example, are continually improving in resolution allowing Computer Vision algorithms to spot smaller and smaller defects.
Sensors are also becoming multispectral, allowing for automated quality control in multiple electromagnetic domains. Multispectral sensors include:
The most common PCB defects include:
- Missing or incomplete traces
- Misaligned components
- Poor solder joints
- Shorts between traces
- Burnt components
PCB defects can vary in size from a few micrometers to several centimeters. Because these defects are small, automated optical inspection is often needed to identify anomalies.
Now that we have a basic understanding of PCBs and PCB defects, let’s take a closer look at how deep learning can be used for automated defect detection.
Deep Learning for PCB Defect Detection
There are many deep learning approaches that can be used for PCB defect detection. One popular approach is a convolutional neural network (CNN). A CNN is composed of several convolutional layers. The input to the CNN is a labeled image of a PCB with defects.
How a CNN works
In this approach, the input image is first passed through a series of convolutional layers that extract features from the image. These features are then pooled together in a pooling layer. This layer reduces the number of parameters in the network while retaining the important features of the image. The last fully connected layer is used to classify PCB defects in an image, and this output can then be passed on to higher-level systems for analysis.
Benefits of Deep Learning
1) High Accuracy Rates – One major benefit of using deep learning approaches is that they have high accuracy rates. For example, a study compared CNNs with traditional machine learning algorithms (support vector machines) for PCB defect detection, where CNNs outperformed SVM across all metrics tested.
2) No Manual Feature Engineering – Another advantage of using deep-learning frameworks is their ability to automatically extract information from images without manual feature engineering. This means less time spent during PCB development working on extracting key features within PCB images, which allows engineers more time developing board designs instead.
3) Robust for Varied Factory Deployments – Deep learning can often account for changing environmental factors. If you move a machine vision camera from one manufacturing line to another, the lighting conditions, resolution, and camera sensitivity might change. Conventional image processing approaches might not be suitable for such changes, but deep learning generally is capable of such optimizations.
How to Implement Deep Learning for PCB Detection
Let’s say you want to do a proof-of-concept around PCB defect detection. Great! There are a couple of ways to go about doing this. First, there’s the do-it-yourself way. Frankly, this is going to be the more difficult route of the two, but we will explain the steps anyway. Second, there is the partner-with-a-vendor way. That’s what we do at Simerse: help you develop a proof-of-concept that turns into a full deployment. But let’s walk through both options.
Option 1) Do-It-Yourself Deep Learning
The first thing you will need is a budget. Data scientists aren’t cheap. Data collection can take time, and data labeling is expensive. But with an enduring spirit, any PCB fabricator can overcome the odds and create a successful deep learning proof-of-concept. The process for do-it-yourself deep learning looks something like this.
1) Collect pictures of PCBs – Deep learning requires thousands of images. That means that you will need to take thousands of pictures of printed circuit boards.
2) Hire someone to find the defects in the PCB images – You will need a trained expert who can identify whether a PCB image contains a defect or not.
3) Label the defects in each image – A trained expert will need to examine each image and annotate the defective region of the image. Generally this will take the form of bounding boxes, but pixel-level labeling can also be performed for more precision.
4) Hire a data scientist – This person will use the labeled data to train an AI algorithm capable of PCB defect detection.
5) Deploy the AI algorithm to a camera with a processor – The trained model can now be deployed to a camera in your production environment and used to predict PCB defects.
This first option is entirely possible. However, PCB fabricators often find that deep learning is not a core competency, and would rather partner with an AI vendor. Fortunately, Simerse has an option for that.
Option 2) Partner with an AI Vendor (Preferred Option)
Simerse can leverage its experience in PCB defect detection to provide an AI inspection solution. Working with an AI vendor can minimize expense, save time, and be more convenient than the do-it-yourself approach. In Option 2, you would do the following:
1) Partner with an AI vendor – Simerse has PCB defect detection experience and can provide a deep learning solution that is robust and tailored to your needs.
2) Provide the AI vendor a small sample of PCB images – Simerse will need a handful (usually around 30) of defective PCB images in order to train a deep learning model for PCB defect detection. This is several orders-of-magnitude of fewer images than the DIY option.
3) Get an AI algorithm for PCB inspection – Simerse will deliver a tailored algorithm that can be deployed to any camera or machine vision system. All the hard work is done for you!
A partnership with an AI vendor will be more convenient, and it often saves money compared to in-house AI development. Since Simerse has expertise in-house and works with a variety of manufacturing customers, there are efficiencies in technology and process that simply cannot be replicated. If you’re looking for an AI vendor, we highly recommend setting up a meeting with us.
In this blog post, we looked at the use of deep learning for PCB defect detection. We discussed the advantages of using deep learning approaches and looked at how Simerse can speed up inspection AI for printed circuit board defects.