This is an overview of my contributions to ATX’s NH Software. Below is a small introduction into the world of adapter building, since many things only make sense if you understand the basics.
Excourse: Adapaters 101
Developing curcuit boards is difficult, but making sure they work can be even trickier. If a computer mainboard isn’t working, then the company has to replace it with a new one, but what if a board of a smoke detector is not working? A malfunctioning curcuit board can be quite devestating!
There are many reasons why a company might want to test the boards the produce, which is why there are companies that build machines that test them, called adpaters (see pictures below). ATX Hardware GmbH is one of the only companies in Germany that produces them.
The way chips are tested, is by checking many contact points on the board for electric flow. This is done using needles. Because one needle creates about 1NM of pressure and there are often thousands of needles needed, this quickly adds up. There are adapters that produce multiple tons of pressure on a rather thin and small curcuit board.
This is where so-called “Niederhalter” (from now on called NHs) come in: They provide the necessary “counter-weight” from the other side, they ensure that the board doesn’t break. A big part of the work to build an adapter is figuring out where to place them, since most boards are tightly packed and many NHs are needed to counteract the pressure of the needles. This process therefore has it’s own section and part in the workflow of the company.
Because this is such an important and vital part, the company decided to develop a software dedicated to improving this process. The goal was to make it easier and safer, especially by preventing human error. If a NH is accidentally placed over a very small component, this could break every board that is tested. This is a realistic issue that can and has happened.
The NH-Software
The in-house software for placing NHs (creatively called “NH-Software”) is used by both the marketing as well as the adapter developement teams. It’s main use for marketing is to determine quickly whether a project is difficult to implement or not, since that increases the price and time needed to complete it. The software provides an easy and quick solution for adequate time and price estimates.
The benefits for the adapter developers are manifold, but the most important one is that it enables them to safely place NHs. This is done by providing a visual representation of the board with added safety information. This includes, among other things, a 2D model of the provided data, an image of the board as well as something called the “carpet“.
The carpet is a color-coded overlay that tells the developer whether or not it is safe to place a NH on a certain part of the board. The carpet calculation is rather intricate and property of ATX Hardware, hence why it is not further explained or provided.
The software has several other functions, but this certainly is the most important one. This software, in addition to other qualities, makes ATX internationally on of the best company in the field of curcuit board testing.
My contributions
While working at ATX, both as a student trainee and full time, I implemented several additions to the software:
I contributed to the calculation algorithms by implementing the functionalities for Line-Arc. Line-Arc is one of the many shapes that DXF (most boards come with a DXF file) uses, others include e.g. rectangles and circles. Since a lot of calculations need data about whether for example something is inside or outside of the board, it was crucial to support all DXF shapes, which now is the case.
Another contribution of mine was implementing an algorithm that can detect the carpet outlines and automatically builds a Line-Arc representation from them. This is necessary to be able to 3D-print NHs in the exact shape of the outline, since it is especially difficult to place NHs in areas where there is very limited space available. In those cases a printed NH provides much better and safer support. In the past it was not possible to utilize those small spaces, since the required data was not available.
The carpet is built similar to an image, so there are colors (pixels) representing the available safety distance. The algorithm I developed is based on square marching the carpet first, and then using the 2D data to determine where arcs and lines should be. The process is quite recourse intensive, but the results are very good.
The outline (red) in front of the 2D model The outline (red) in front of an image
My biggest addition though, was implementing the 2D engine that powers the rendering and content handling. The NH Software used to exclusively use VB.Net GDI+ for rendering, which did not yield a good performance and proofed to be the bottleneck more often than not. This in fact rendered the software for big projects almost useless. Each image render took several seconds, while freezing the computer in the meantime, which was unacceptable.
My implementation uses a heavily modified version of the SFML 2D engine. This version features many additions like stencil tests and concave shapes. Most of the improvements where implemented in the C# wrapper, some direcly in the C++ source. I developed several shaders to incorporate features from the .Net drawing library such as drawing selected shapes “bold” or “dashed“. SFML is only used as a baseline for rendering, with a custom engine that handles the content built on top directly in VB.Net.
The engine takes care of content generation, handling, drawing and cleanup. The system was built with performance and future extensability in mind, and replaced the entire old drawing mechanism with a few exceptions. While resource handling is still done in VB.Net and therefore not very performant, the other improvements are very significant nevertheless.
The performance increase is almost 100x in comparison to the old system, while freeing up additional CPU resources that are now available for computations. This makes for a very responsive and pretty user experience while also speeding up the development by enabling the employees to work faster. The feedback I recieved for the improvements was very good, people enjoy using the software a lot more and are more productive.
Conclusion
Although I did not build the software in its entirety, my contributions to it were major nevertheless. The full spectrum of DXF shapes is now supported, enabling full usage of the data provided by the customers. It is now possible to 3D-print NHs and use gaps on the board that weren’t usable before. Last but not least, the software is now fully usuable even for big projects, because of the heavily improved rendering architecture.
There is still more work to be done, as the custom cursors in the software have not been ported to the new renderer yet. The calculations for the carpet are majorly slowing the process down, while also requiring a large amount of memory for big projects. This could be improved utilizing the power of CUDA and exporting the calculations onto the GPU. As it stands right now though, the software is in daily use and proving its worth.