Sunday, 1 April 2018

PCB vias solder mask tenting

Summary
This blog highlights some of the implications for PCB 'board' loaders during the reflow or wave soldering process when Printed Circuit Board (PCB) designers choose not to tent solder side vias.

PCB Manufacturer Tenting Limitations
With the advent of higher density devices such as microcontrollers with configurable logic, Field Programmable Gate Arrays (FPGA), System On Module (SOM), System On Chip (SOC) and high power FET drivers becoming more prevalent in commercial equipment and hobbyist designs, there comes a requirement to manage exposed pads and vias beneath these devices. 

In some instances high density components may have an exposed pad that require a connection utilising vias for a variety of reasons. The exposed pad may serve as electrical connection, such as an input power supply, output in the case of a switch mode regulator, the pad may be used for PCB mounting by providing bonding strength (due to the ever decreasing component footprint) or for heatsinking, by acting as a thermal pad such is the case for high power FET drivers.

In the image below are a few examples of different sized vias which have been used for different reasons on the same PCB.


Tented and Untented Vias
Tented and Untented Vias
Identified in the red box are vias which are used for standard TTL signal connections. The via hole size is 0.3mm. Vias with this hole size are commonly tented during the PCB manufacturing process using solder resist, unless they have been earmarked for alternative purposes such as test points, probing, programming or other similar purposes.

Shown in the light blue box are larger vias with a 0.7mm hole which are used for connections to the PCB internal power planes. Vias of this size are tented where possible unless there is a good reason not to do so or the PCB manufacturer is unable to mask to this via size. Reasons for not tenting may include thermal connections to exposed pads or a need to increase the current handling capacity of the via. Both of these reasons may require solder or a 'plug' to fill the via.

The purple box shows a cluster of untented vias with a 0.5mm hole. These vias reside below a microcontroller featuring an exposed pad. The vias on both sides of the board are not tented although these vias are usually tented on the solder (non-component) side of the PCB.

Lastly shown in the yellow box is an array of vias with a 0.381mm hole. The grouped formation of vias is commonly termed 'stitching' in software packages such as Altium Designer. For this design the top and bottom copper layer represent the ground plane which are stitched together using multiple vias. Vias of this size and smaller are usually always tented.

For the example board shown, almost all of the vias are listed as tented in the PCB file and the Gerber files. Clearly not all the vias appear to be tented in a thick solder mask. The reason for the discrepancy can lie with the capability of the PCB manufacturer. Not all PCB manufacturers detail their limits for tenting vias with solder mask or are able to open the latest PCB files from software packages such as Altium Designer (a good reason why Gerbers are used in the industry). This issue can be remedied to some degree by supplying the Gerber files to the manufacturer, in the format requested, and then asking to verify the machine Gerber files that the manufacturer intend on using in their PCB production equipment.

PCB designers should be mindful however that even the final Gerber files supplied by the PCB manufacturer may not always be what is actually produced. For example, mutlilayer boards with power planes to the edge of the board will have, in general, a 'pullback' rule applied to that layer even if the PCB does not have a pullback rule. To prevent these rules from being applied by the PCB manufacturer comments or notations should be explicitly noted on the PCB file or Gerber file as 'no pullback on this layer'. Somewhat off topic although this concept also applies indirectly to vias and solder mask.

With regards to the maximum size of via which can be covered with solder mask, for a standard manufacturer a 0.8mm hole may be too large where for the more experienced or better tooled manufacturer, a 1.2mm hole may be considered the upper limit. Asking the manufacturer will at least provide an idea of their manufacturing capability. This information can then be included in the PCB design file for the PCB manufacturer.

Via Placement and Tenting Issues
A single untented via rarely causes placement or issues for the PCB loader. The word rarely is used with caution however because a single, poorly placed via, without tenting can cause issues when located too close to another surface mount component, to the pad of a PCB mount metalised connector or the under the metal body of a mechanical component such as a HDMI connector.

The image below shows vias with an equidistant spacing of 1.1mm connected to a component with an exposed pad on the opposite side of the PCB. A via spacing down to 0.5mm should usually not cause a problem for the PCB loader whether the soldering process is reflow, as shown below, or solder wave.


Via Spacing
Via Spacing
Shown in the subsequent image is a higher density via placement with a spacing of 0.8mm. Due to the increased number of untended vias and possibly solder paste, the solder readily flows from the top side of the board to the bottom during the reflow process.


Higher Density Via Spacing
Higher Density Via Spacing
Although the protruding solder could easily be removed as part of the post manufacturing process, this additional work can increase the final PCB cost and is best avoided during PCB design by tenting the vias. It should also be noted that the solder protruding from the vias may not be excess solder but instead solder that should be between the exposed pad of the component and the copper pad of the PCB.

No Via Tenting
Where vias are used for other purposes, such as ground planes or heatsinking, the PCB designer has the option to leave the via with no tenting. During the PCB population process solder may fill the vias, although using solder to fill vias in this manner is not a guaranteed process. The image below shows the via arrangement under a high current switch where not all of the vias have been filled with solder.

Staggered Via Layout Connected to Polygon
Staggered Via Layout Connected to Polygon
The subsequent image shows the component side of the board without the physical component fitted.


Staggered Via Layout Component Side
Staggered Via Layout Component Side
Via Tenting
Although this blog focuses on vias without tenting, it should be noted and sighted in the image below, that even vias with a 1mm hole can be tented with solder mask by a sufficiently qualified PCB manufacturer.


Tented Vias Connected to Polygon
Tented Vias Connected to Polygon
Design Suggestions
Knowing the limitations of the PCB manufacturer and the PCB loaders soldering process would allow ideal selections to be made during the PCB design process.

This comment is idealistic, not realistic. 

More often than not people utilise online PCB manufacturers which do not fully disclose the capability of their PCB manufacturing equipment. Additionally the PCB manufacturer's website may be a PCB broker that farms large groups of common layer boards to the most suitable PCB manufacturer at that time.

With this in mind, the suggestions below for tenting and spacing, of through PCB vias, are for a typical PCB manufacturer and largely depend of the via size and use.

Max via hole size for tenting: 1.2mm
Min via to via land separation for untented vias: 0.3mm
Min via to via land separation for tented vias: 0.15mm

Tented Vias Connected on Multiple Polygons
Tented Vias Connected on Multiple Polygons

Saturday, 3 March 2018

Asus X202E with Lubuntu 17.10

Summary
In a previous blog an Asus X202E netbook was upgraded to Ubuntu Mate, however following the latest updates the netbook appeared to slow for specific tasks such as web browsing. For a comparative test the laptop was changed to Lubuntu.
Asus X202E
Asus X202E

Lubuntu USB Installation Disk
To create the installation USB drive, under Windows 10, the well known software package Rufus 2.18 was utilised.


About Rufus 2.18
About Rufus 2.18

The Lubuntu ISO was downloaded from from the downloads section of the Lubuntu site. Specifically the Lubuntu 17.10.01 AMD 64 ISO release was used.


Rufus Settings
Rufus Settings

With a USB drive installed, Rufus was opened. The Device selected was the USB drive as shown in the above capture.

For the partition type either "MBR partition scheme for BIOS or UEFI" or "MBR partition scheme for UEFI" were suitable for use with the Asus BIOS.

After configuring the File System for FAT32 the downloaded ISO file "lubuntu-17.10.1-alternate-amd64" was selected. 

The start button was then selected to begin the USB drive creation process.


Rufus ISO Hybrid
Rufus ISO Hybrid

Rufus did download some additional files then displayed a window, as shown above, regarding the ISO image and how it is written to the USB drive. The recommended setting were used.


Rufus Erase USB
Rufus Erase USB

Lastly was the obligatory erase drive confirmation message before the disk creation process was started.


Rufus Copying ISO Files
Rufus Copying ISO Files

Once the process was completed, it was over to perform the operating system change to the Asus netbook.


Rufus Completed Lubuntu USB
Rufus Completed Lubuntu USB


Netbook BIOS Changes to Boot with USB Install Disk
As mentioned in the previous blog while upgrading an Asus X202E netbook to Ubuntu Mate, the USB with the Linux file system format will not boot with the default BIOS settings. Original details for BIOS configuration and, originally for a Mac install, can be found at this thread www.tonymaxx86.com

In summary the changes that were required with this model X202E are listed below.

1. The Lubuntu USB drive was installed into the netbook while it was unpowered. BIOS was then activated by firstly pressing the F2 key then pressing the power button. The F2 key was only released when the BIOS was displayed on the netbook. Original reference in Asus website FAQ.

2. First change to the BIOS was under the 'Advanced' menu. USB Legacy support was enabled to ensure booting from the external drive was possible. XHCI pre-boot was also disabled.


X202E BIOS Legacy USB Activation
X202E BIOS Legacy USB Activation

3. Next in the 'Boot' menu settings, Fast Boot and Launch CSM were disabled.

X202E BIOS Boot Settings
X202E BIOS Boot Settings

4. Additionally the boot priorities were changed so that the Lubuntu USB was the first boot device.



X202E BIOS Boot Priority
X202E BIOS Boot Priority

5. Moving to the BIOS 'Security' menu, the Secure Boot was disabled to allow non-Windows drives to boot.

X202E BIOS Secure Boot Settings
X202E BIOS Secure Boot Settings

6. Lastly the BIOS changes were saved and the X202E allowed to reboot with the installed Lubuntu USB drive connected to the netbook.

Installing Lubuntu
Lubuntu booted with the well know GNU Grub bootloader.


Lubuntu Grub Start
Lubuntu Grub Start

The language option was then presented by the installer.


Lubuntu Language
Lubuntu Language

The Country was then selected.


Lubuntu Country
Lubuntu Country

For the subsequent step, which was keyboard setup, the automatic detection was tried by pressing keys specified by the installer. This did not appear to work and was not actually required as the netbook keyboard worked without issues after the installation was complete.


Lubuntu Keyboard Detection
Lubuntu Keyboard Detection

The Lubuntu installer was allowed to complete then the USB was removed.


Lubuntu Desktop
Lubuntu Desktop

After the reboot, Lubuntu booted to the screen as captured above.

Performance - Lubuntu vs Ubuntu Mate
The primary reason for changing between operating systems was to determine if a performance gain could be noticed. Shown below are the differences between the two operating systems using Hardinfo.

Computer
Processor
Intel(R) Celeron(R) CPU 847 @ 1.10GHz
Memory
1857MB (351MB used)
Machine Type
Notebook
Operating System
Ubuntu 17.10


Computer
Processor
2x Intel(R) Celeron(R) CPU 847 @ 1.10GHz
Memory
1860MB (423MB used)
Operating System
Ubuntu 16.10

For bench marking the built-in application Hardinfo was used. Relevant performance metrics for the two operating systems can be seen below. Note the higher scores denoting better performance in green. Looking at the results below Linux Mint mostly outperforms Lubuntu, for this Asus X202E and the setup used.

Benchmarks
CPU Blowfish
CPU Blowfish
Lubuntu - Intel(R) Celeron(R) CPU 847 @ 1.10GHz
2x 1100.00 MHz
18.411
Linux Mint - This Machine
1100 MHz
16.396

CPU CryptoHash
CPU CryptoHash
Lubuntu - Intel(R) Celeron(R) CPU 847 @ 1.10GHz
2x 1100.00 MHz
82.704
Linux Mint - This Machine
1100 MHz
91.171

CPU Fibonacci
CPU Fibonacci
Lubuntu - Intel(R) Celeron(R) CPU 847 @ 1.10GHz
2x 1100.00 MHz
1.835
Linux Mint - This Machine
1100 MHz
4.906

CPU N-Queens
CPU N-Queens
Lubuntu - Intel(R) Celeron(R) CPU 847 @ 1.10GHz
2x 1100.00 MHz
13.559
Linux Mint - This Machine
1100 MHz
19.652

CPU Zlib
CPU Zlib
Lubuntu - Intel(R) Celeron(R) CPU 847 @ 1.10GHz
2x 1100.00 MHz
0.147
Linux Mint – Not Tested



FPU FFT
FPU FFT
Lubuntu - Intel(R) Celeron(R) CPU 847 @ 1.10GHz
2x 1100.00 MHz
7.430
Linux Mint - This Machine
1100 MHz
5.927

FPU Raytracing
FPU Raytracing
Lubuntu - Intel(R) Celeron(R) CPU 847 @ 1.10GHz
2x 1100.00 MHz
9.457
Linux Mint - This Machine
1100 MHz
12.788

GPU Drawing
GPU Drawing
Lubuntu - Intel(R) Celeron(R) CPU 847 @ 1.10GHz
2x 1100.00 MHz
2003.950
Linux Mint – Not tested


System Monitor
The System Monitor for both operating system was captured just after restart. No additional software or updates had been applied to either of the operating systems.


Ubuntu Mate System Monitor
Ubuntu Mate System Monitor

Lubuntu System Monitor
Lubuntu System Monitor
Summary
Additional testing was performed with the Phoronix Test Suite. Phoronix was unable to run on Ubuntu Mate even after some gentle massaging. The error listed below was persistent.

xxx@xxx-X202EP:~$ phoronix-test-suite 

\PHP Fatal error:  Class ambient_temp cannot extend from interface phodevi_sensor in /usr/share/phoronix-test-suite/pts-core/objects/phodevi/sensors/ambient_temp.php on line 23

Some of the test results for Phoronix with Lubuntu are available in PDF at the link below.

Phoronix Lubuntu Test Summary
Phoronix Lubuntu Test Summary

At the end of of the comparison the test results turned out to be incomplete, therefore testing was inconclusive. 

For day to day operation Lubuntu with the LXDE desktop, in my personal opinion, does feel more responsive and visually cleaner than Ubuntu Mate with default install settings. There however are more tests and metrics that are outstanding for a complete comparison.

Monday, 12 February 2018

Win 10 Serial Terminal software max baud rate

Summary
This purpose of this blog was to identify the maximum baud rate of several Windows 10 serial port terminal programs when used with an FTDI USB to TTL adaptor which had a specified rate of 3Mbaud.

Addendum: PCTerm 3.7 added to test results for testing 3Mbaud.

Test Setup
A Cypress PSoC development kit CY8CKIT-042 was configured with a UART component to repeatedly send the sequence of capitilised letters A to Z. 


PSoC and FDTI Test Setup
PSoC and FDTI Test Setup
The associated transmit output and 0V reference from the development kit were connected to the receive input and 0V on the FTDI USB to TTL adaptor (TTL-232R-RPi).


FDTI TTL-232R-RPi Adaptor
FDTI TTL-232R-RPi Adaptor
The USB side of the FTDI adaptor was connected to a Windows 10 laptop for the duration of the software testing. Specifications for the laptop are shown below.


Windows 10 Test System Specifications
Windows 10 Test System Specifications

Validation Criteria
There were only two criteria that the software needed to fulfil in order to be accepted as a pass for this test.

1. Display the characters A - Z on the terminal software in either ASCII or HEX and

2. Terminal software should still be useable - meaning not crash, lockup or become unresponsive for the duration of the test


Test Software
Listed below are the ten Windows terminal applications that were tested.

1. Advanced Serial Port Monitor

2. CoolTerm

3. Hype!Terminal

4. Muterm2

5. Putty

6. RealTerm

7. Serial Port Terminal

8. TeraTerm

9. Termite

10. XShell5

11. PC Term 3.7


Test Results
It should be noted that this test was performed under the conditions detailed below.

1. The various Windows terminal applications were used for receiving characters only,

2. Some of the various Windows terminal applications were used in their trial installation mode or the latest Beta of the application,

3. Some Windows terminal applications did have faster baud rates which were not tested,

4. Only standard baud rates such as 115200, 230400, 460800, 921600 and higher were used while determining the maximum receive baud rate of the Windows terminal applications for this specific hardware setup.


Windows Terminal Software Max Data Rate Test Results
Windows Terminal Software Max Data Rate Test Results
PCTerm was added to this blog, post publishing and it was proven to be the fastest in data rate for displaying ASCII text. RealTerm was the fastest in data rate for displaying data in Hex.

Other notable mentions; Putty, Hype!Term and Advanced Serial Port Monitor.

Test Notes
During testing TeraTerm performed without any issues receiving data at 921600 baud.


TeraTerm Receiving Data at 921600
TeraTerm Receiving Data at 921600
Similarly with RealTerm the receive window configured to display in ASCII no issues were noted.

RealTerm Receiving Data at 921600 - ASCII Displayed
RealTerm Receiving Data at 921600 - ASCII Displayed
Changing RealTerm to display in HEX at 921600 resulted in slow performance and issues relating to the onscreen refresh. Reducing the baud rate to 460800 resolved the display issues. Similarly adding a 1us delay between characters at 921600 resolved the onscreen refresh.

RealTerm Receiving Data at 921600 - HEX Displayed
RealTerm Receiving Data at 921600 - HEX Displayed
PCTerm 3.7 performed at 3Mbaud without any issues to display ASCII.


PCTerm Receiving Data at 3Mbaud - ASCII Displayed
PCTerm Receiving Data at 3Mbaud - ASCII Displayed

Test Code
Basic test code with an option to add inter-character delays.

/* ========================================
*
* Example Terminal Speed Test PSoC4
*  
* Revision:    1.00
* Date:        10/02/2018

* 10/02/2018   1.00     Test release
*
* Released as GPL
*
* ======================================== */
#include <project.h>
#include <stdio.h>
#include <stdbool.h>


int main()
{   
    uint8 count_i;                               /* Define for loop counter var */
    uint16 char_delay = 0;                  /* Define intercharacter character delay in ms*/
    
    CyGlobalIntEnable;                      /* Enable global interrupts. */
    UART_Start();
    while (SW1_Read() == true);     /* Wait for button press */
    UART_UartPutString("Start");
    
    for(;;)
    {
        count_i = 65u;
        while (count_i <= 90u) {
            UART_UartPutChar(count_i);
            if (char_delay != 0u) {
                CyDelayUs(char_delay);
            }
            count_i++;
        }
    }
}

/* [] END OF FILE */


PSoC Creator Changes for PCTerm
The default HFClock 'HFClk' for the PSoC Creator UART is 24MHz. As this clock rate results in only 1.5Mbaud, the HFClock was increased to 48MHz.


PSoC Creator HFClk Increase to 48MHz
PSoC Creator HFClk Increase to 48MHz
Using the UART SCB component with an external 48MHz clock resulted in the required 3Mbaud data rate.


PSoC Creator Top Design SCB UART with 24MHz External Clock
PSoC Creator Top Design SCB UART with 24MHz External Clock
The properties of the SCB UART displayed the 3Mbaud UART data rate.


PSoC Creator SCB UART at 3Mbaud
PSoC Creator SCB UART at 3Mbaud

Summary
PCTerm, RealTerm and TeraTerm are noteworthy Windows based serial terminal applications which would serve hobbyists and professionals alike. Personally, i am habitual in installing software such as RealTerm and TeraTerm on computers involved in software or hardware development. Further to the recent addendum testing PCTerm, this application may replace TeraTerm in some instances.

It should be noted that each of the terminal applications mentioned in this blog were tested for the specific purpose of receiving with a high baud rate. When choosing a suitable serial terminal application, each specimen of software should be reviewed under its own merit to ensure its suitability for the intended task.

When a more comprehensive look at data is required then a protocol analyser is usually required. These solutions range from all in one devices such as the Analog Discovery 2 by Digilent to dedicated input only products such as the Saleae Logic devices to high end products from Keysight. From experience, even the low cost Digilent Analog Discovery 2 will efficiently record and display the character test performed in this blog!