Surface Mount Connector Tester

by JonMackey in Circuits > Microcontrollers

35 Views, 0 Favorites, 0 Comments

Surface Mount Connector Tester

40 pin test board.jpeg

Manually soldering FFC connectors with a fine pitch using a hot air gun can be tedious to test. This Arduino STM32 project was designed to test connectors with up to 40 pins. This board will test each pin for:

- continuity of used pins

- expected bridging between pins

- unexpected continuity of unused pins

- unexpected bridging between pins


The software is designed to run on the "40 Pin Test" board shown above. This project also requires a 480x320 ILI9488 resistive touch screen connected via a 12 pin FFC cable. I designed three boards that could be used, a 4 inch 480x320 TFT Display board, a 3 inch 480x320 TFT Display board, and an ILI9488 Display Adapter board. The adapter board can be used to convert popular 3 and 4 inch display modules to use a 12 pin FFC cable. Any 480x320 TFT display option will work provided it uses a ILI9488 driver.

Supplies

The 40 Pin Test board is available here. Follow this link to get the board's part list.

One of the following displays are required:

  1. 4 inch 480x320 TFT Display board, available here
  2. 3 inch 480x320 TFT Display board, available here
  3. ILI9488 Display Adapter board, available here

(1) 20cm, 1mm pitch, 12 pin, FFC cable (A-B), available on AliExpress, etc.

(8) M2x5mm button head screws.

(8) M2x8mm nylon standoffs.

(1) Fine point multimeter probe, available on AliExpress. Note that the 4mm banana jack used on the test board doesn't accept a probe with a protective sheath over the male 4mm connector. The sheath will have to be removed using a utility knife (or you could hire a mohel. )

Assembly

Bare Test Board.jpeg

Assemble the test board and one of the display board options noted in Supplies.

I'm not going to go into any detail on assembling the test board other than my recommendation that the mcu should be soldered and tested for continuity before adding any other parts to the board. The STMF32F429 mcu has 100 pins. I use a stencil to apply the solder paste, and even then it's difficult to solder without a few solder bridges and pins not making contact. Test each mcu pin for continuity with its pad and check for solder bridges. The 40 pin FFC connector on the board is easy to test using the board's own software.

Setup

Arduino Tools Menu.png

This project uses an unmodified version of Bill Greiman's SdFat library. Copyright Bill Greiman 2011-2024 (currently using version 2.2.3) This can be loaded using the Arduino IDE's library manager.


Power is supplied via the board's USB-C connector. The board and display draw only 155mA when the display is active. The draw drops to 56mA after about 90 seconds of inactivity when the display is put to sleep.

The software as configured will use the TTL serial pins for serial communication. The TTL baud rate is 19200. If you prefer USB, you can enable USB serial via the Arduino IDE Tools menu.

Attach a USB serial to TTL module to the 3 pin serial header located near the USB connector.

Using the switch next to the CR2032 battery holder, apply power by sliding the switch away from the battery holder.

Download the Arduino project here. Set the URL in the Arduino Settings window to point to the folder containing the folder FFCTester. Set the settings in the Arduino Tools menu to the settings shown above.

Compile the sketch. If there are no errors, upload the sketch to the board using a STLink connected to the 4 pin SWD connector on the board located next to the SD card socket.


When the board is powered for the first time you should see the following:

Starting...

OscillatorType = RCC_OSCILLATORTYPE_HSE|RCC_OSCILLATORTYPE_LSE

RCC_OscInitStruct.LSEState = RCC_LSE_ON

prefsRead

MCU Frequency = 168000000


If there is no response from the AT24C64 IC, you will see: "AT24C64 is not responding."

Otherwise you should see: "prefsRead" followed by the mcu frequency.

The software will ignore any uninitialized prefs.


The display will be initialized. Because the display is write-only, there is no software check to determine if it's working. If it's not working properly you'll get a white screen, and/or garbage, or nothing.


If the display is working you should see an empty grid of numbered gray squares.

No Pin Sets


The board has a few case sensitive single character serial commands. All commands must be terminated with a linefeed.

The touchscreen needs to be aligned the first time the display is used. Try loading the file TSettings.txt found in the project folder by copying it to the root folder of an SD card. Insert the card in the SD card slot on the board. Once inserted, serially send the load command, a lowercase L .

If the settings file loads successfully the board will restart. The serial startup text should now include the tsMinMax, and tsZCalibration preference values.

Using a stylus pen, verify that the touchscreen is working. If it isn't accurate enough you can try to improve the accuracy by pressing the Enter button on the board or by serially sending a lowercase E. This will display the alignment screen. Follow the instructions displayed. As noted in the instructions, you can press the board's Cancel button to quit without saving. You can also cancel serially by sending a lowercase C.

The time needs to be set so that file creation dates are accurate. The time can be set using the Utilities screen or by sending the current epoch Unix timestamp as a hexadecimal value preceeded by a greaterthan character. e.g. ">6A89C31A" will set the time to Aug 22,2026 at 15:41:14.

The full list of serial commands can be found at the end of the routine FFCTesterSTM32::Update() in the file FFCTesterSTM32.cpp.

Defining Pin Sets

A pin set needs to be defined for each connector to be tested. Each pin set can define up to 40 pins. From the main screen, select Manage Pins from the drop dowm menu displayed by pressing the button on the top right of the screen.

The Manage Pins screen will display the following when no pin sets have been defined:


First Pin Config

When you have one or more pin sets defined the current pin set will be displayed.

For each pin of the pin set you're defining, the pin needs to be set as unused, used, or used+bridged.


Config Colors


Unused (Gray) means the pin should be electrically floating, not connected.

Used (Blue) means the pin will be used for I/O and is not bonded/bridged to adjacent pins.

Used+Bridged (Light Blue) means the pin is used for I/O and is connected to the pin on its left or right. This is common for pins used for configuration or power.


Below is an example of a full 40 pin set for an ILI948-SPI connector. Note that several pins are unused/floating/not connected (gray), and some are bridged to neighboring pins (light blue.)


ILI948-SPI Pin Config


Give the pin set a name by clicking in the Pin Set name edit field. Clicking in this field will display a keypad.


Pin Set Name

Save the pin set by pressing Save. The saved pin set becomes the current set used in the main screen for testing.

Add additional pin sets by modifying the current pin set, change the name, and press Save.

Select a different pin set by choosing a pin set from the drop down menu at the top of the Manage Pins screen. The selected pin set becomes the current set used in testing, for editing, and for creating a new pin set.

Testing a Connector

he only components on the board containing the connector to be tested should be the connector and other inert components. There should be no ICs, capacitors or resistors on the board. Because this project is for testing manually assembled boards, this shouldn't be an issue. Mount the connectors to be tested and basically nothing else.

Attach a test lead with a fine probe needle to the 4mm banana jack socket on the board.

Connect the FFC cable to the board. Use an adaptor if it's less than 40 pins or has a different pitch.

From the Manage Pins screen, select the pin set that corresponds to the connector being tested. Switch back to the main screen. Initially, all of the used pins are colored red. The unused pins will be gray.


ILI848-SPI Pre Test

On the board containing the connector being tested, use the test lead to select pads or vias connected to traces that lead back to the connector pins. Ignoring the pads of the connector being tested, find a pad or via that leads to each connector pin pad. As you select different pads or vias on the board, the corresponding grid squares will change color.


The possible colors are:

Test Colors

Gray means this pin is designated as unused.

Green means this pin passed testing. There are no unexpected bridges detected.

Light Green means this pin passed testing. As defined in the pin set, there is an expected bridge with one or more adjacent pin.

Yellow means there is an unexpected solder bridge between this pin and an adjacent pin.

Orange means the expected bridge defined in the configuration isn't detected. This pin is connected to its pad but there is no connection to an adjacent pin.

After you've moved the probe pin through all of the pads and vias leading to the connector pads, any remaining red cells means this pin failed. There is no connection between the connector pin and the pad on the board. Using a fine point soldering iron, carefully apply a minute amount of solder to the connector pin and pad and test again. Press the Clear button to start over.


ILI948-SPI after test


Using an adapter

As noted earlier, an adapter can be used for other pin configurations. The image below shows a 12 pin FFC connector ready to be tested.


12 Pin Test.png


The class XPinTesterGrid

This class should give you some insight into how the pins are efficiently scanned.

XPinTesterGrid is displayed in the main screen. This class interprets the probe readings. XPinTesterGrid is a subclass of XGrid. XGrid draws either the entire grid or individual grid cells whenever the status of a pin changes.

This project, as defined, can test up to 40 pins. The 40 pins used for testing on the mcu are defined in the file Config.h, kPortPinMap array. Each entry in this array maps the FFC pin with the corresponding mcu pin. Each entry contains the gpio port the pin is on, and pin index within the gpio. The Px_x enumerations are defined in the STM32 library file PinNames.h. The high nibble for each is the gpio index, and the low nibble is the pin index, 0 to 15. The GPIOPort array is declared in the STM32 library file PortNames.h. GPIOPort is an array of GPIO_TypeDef pointers corresponding 1:1 with the gpio index in the high nibble of each kPortPinMap entry (after shifting.)

XPinTesterGrid::begin() defines groups of pins to be configured as GPIO_PULLUP. The pin function is set as a group of pins rather than individually calling the Arduino pinMode() function. These groups determine what pins are periodically read when testing a connector.

XPinTesterGrid::Update periodically reads the defined pin groups. Similar to reading a button state, you have to wait for the probe connection to stabilize before interpreting the pin states when the probe is moved to another pad on the board being tested. Once stabilized, all 40 pins are interpreted at once. See XPinTesterGrid::Update for the logic used to interpret the state of each pin as they relate to adjacent pins.


Conclusion

I hope you enjoyed this Instructable. Contact me by private message if you have any questions.