Writing a PCBA Functional Test Specification
Part three of the FixturFab PCBA Functional Testing series.
The Printed Circuit Board Assembly (PCBA) process has multiple types of testing such as AOI, AOX, ICT, Smoke Testing, Black Box Testing, and Regression Testing. Functional Testing (FCT) powers the device and validates expected operations.
The Printed Circuit Board Assembly (PCBA) process has multiple testing stages, each with its specific implementations and goals. Functional Testing (FCT) powers the device and validates expected operations.
PCBA Functional Testing series
In this part, we will write a Functional Test Specification for the TeachMePCB badge project. We will use a schematic to identify test cases, required nets, and instrumentation needed to implement functional tests in a turnkey test system. This is what FixturFab uses to design turnkey test systems.
TeachMePCB is a free online course that covers designing a custom PCB. If you are unsure of what to include in a PCBA Functional Test Plan, our Overview of PCBA Testing may help. Towards the end, we also cover selecting test instrumentation.
To follow along with this post, you will need:
Also helpful:
The first step in creating a functional test specification is to go through every sheet in the schematic and identify the various systems that need to be validated on the PCB. The block diagram of the TeachMePCB Badge circuit is shown below.
This schematic consists of 8 separate blocks including an MCU sheet which contains the microcontroller that is used to control the system, sheets for various sensors and connectors, and then a sheet for Power which is not included within the hierarchy.
When analyzing a schematic and creating a functional test specification, we have found it best to use the following methodology:
With this methodology in mind, we will look through the schematic, skipping around to various sheets so that short circuits, voltage rails, and MCU’s are programmed first.
The first sheet we will look at is the Power sheet. This will allow us to test for short circuits and verify the voltage regulators at the very beginning of the tests.
The PCB can be powered by a battery or USB. This enables the 5V0 net to be powered in the following ways:
Voltage regulator U201 then generates 3V3 from the 5V0 net. Transistors Q201, Q202, Q203, and Q204 are used to switch 5V0 to VUSB when VUSB is available.
From analyzing this circuit we can identify the following tests:
We typically separate the Short Circuit tests from the Voltage Rail tests. This allows for a very quick Short Circuit test to be performed at the beginning of the test.
In your Functional Test Specification sheet:
This sheet contains the ATMega328P MCU, along with the crystal oscillator, debouncing capacitors, and a programming header.
This MCU controls all of the peripherals on the Badge PCB. To help with testing all of the hardware, a custom firmware image will be used to set various IO to validate different peripherals. Before we are able to perform any other tests on the PCBA, we need to program the ATMega328. To do this, a SAMD11 is used to bootload the MCU over USB. Skip to the SAMD11 USB Bootloader sheet next.
U501 is a SAMD11 32-Bit MCU, this MCU has a USB peripheral, which is used to bootload the ATMega328p (main MCU).
To program the PCBA, there will be 3 main steps:
To program the SAMD11 firmware, SWD will be used. This requires a programmer such as a J-Link or an Atmel ICE.
In your Functional Test Specification sheet:
The ATMega328 is programmed using SPI, and since no test points were shown on the MCU sheet, we are now looking at the LCD sheet.
To program the ATMega328, the MOSI, MISO, CLK, and CS pins will be used, along with the MEGA_RST test point from the SAMD11 USB Bootloader sheet.
In your Functional Test Specification sheet:
This sheet contains the level-shifting circuit that is required to communicate with the LEDs from the MCU.
To verify that the level-shifting circuit functions correctly, we will implement a command on the MCU to set the level high and low, instrumentation can then be connected to the TP_ADDR_LED_HV test point to verify that this pin can be set high and low.
This sheet also includes an LED and a buzzer. These devices could be tested, however, we will skip testing them for now.
In your Functional Test Specification sheet:
This sheet contains the circuitry for each switch that is on the Badge.
Each switch has a test point that can be used to validate that the MCU can read the switch state. These test points will be hooked up to instrumentation that will allow us to set the test point to either high or low, and then validate that the correct state can be read by the MCU.
In your Functional Test Specification sheet:
The BME280 schematic sheet is shown below.
This sheet contains only the BME280 sensor and it’s decoupling capacitors. To test this sensor, a reading will be taken by the MCU.
In your Functional Test Specification sheet:
This sheet contains the BNO055 IMU and it’s support components.
Test points are available on the I2C pins, as well as the reset and interrupt pins, however these test points are required for testing the device since we can use a command from the ATMega328.
In your Functional Test Specification sheet:
The RTC sheet contains an MCP79400 and all of the components required for the RTC to operate correctly. To test this device, the ATMega328 will be used to communicate with it.
Now that we have reviewed the schematic and developed a list of the basic tests that will need to be performed, we can work on selecting the instrumentation for running the tests.
For the tests that are defined, we will need to use instrumentation that can do the following:
You need robust instrumentation for a test fixture that will be used to produce 100K+ units. For this style of fixture, we would probably use the following:
The Acroname MTM-USBStem is ruggedized and ready for use in an industrial environment. This will reduce the risk of an IO pin being blown out due to a bad device being tested.
You can use more entry-level instrumentation for fixtures used during hardware development and small production run tests.
For the TeachMePCB Badge fixture, we’ll use the following:
A well throughout test specification is incredibly helpful when planning to manufacture your circuit boards. Planning this while developing a new PCB will help improve the quality of your products and make manufacturing and test run smoother. With a schematic, you can identify the required tests, nets needed, and start thinking of what instrumentation you will need to implement your Functional Test Plan.
Part 1 of the FixturFab Test System Development Process series
How to design safe Test Fixtures for high-voltage testing.