To My Readers



If this is the first time you're visiting my blog, thank you. Whether you're interested or just curious to find out about PCB reverse engineering (PCB-RE), I hope you'll find something useful here.

This blog contains many snippets of the content in my books to provide a more detailed overall sampling for my would-be readers to be better informed before making the purchase. Of course, the book contains more photos and nice illustrations, as evidence from its cover page. Hopefully, this online trailer version will whet your appetite enough to want to get a copy for yourself.

Top Review

I started doing component level repair of electronics with (and without) schematics more than 40 years ago, which activity often involves reverse-engineering of printed circuit boards. Although over the years my technical interests have shifted into particle beam instrumentation, electron microscopy, and focused ion beam technology fields, till this day——and more often than not——PCB repairs have returned multiple multi-million-dollar accelerators, FIB, and SEM instruments back to operation, delivering great satisfaction and some profit.

Many of the methods described by Keng Tiong in great details are similar to the approaches I've developed, but some of the techniques are different, and as effective and useful as efficient and practical. Systematic approach and collection of useful information presented in his books are not only invaluable for a novice approaching PCB-level reverse engineering, but also very interesting reading and hands-on reference for professionals.

Focus on reverse engineering instead of original design provides unique perspective into workings of electronics, and in my opinion books by Keng Tiong (I've got all three of them) are must-read for anybody trying to develop good understanding of electronics——together with writings by Paul Horowitz and Winfield Hill, Phil Hobbs, Jim Williams, Bob Pease, Howard Johnson and Martin Graham, Sam Goldwasser, and other world's top electronics experts.

Valery Ray
Particle Beam Systems Technologist

Friday, March 31, 2017

Datasheets

We now come to the last part of the basic preparation work—collecting component datasheets. I cannot emphasize enough the importance of having the necessary information ready on hand as you work on the PCB. There is nothing more frustrating than getting stuck with a component and not knowing its pin-outs or functions to meaningfully relate its role to that part of the circuit it is located at. Doing PCB reverse engineering is more than just blindly tracing out the inter-connectivity of the components on a PCB, it is the ability to make sense of the board's topology and organize the various pieces of the puzzle as they form, and finally to recreate the schematic diagram as close to the original design, and as usable (and readable) as possible.


In this respect, component datasheets serve a number of purposes:

*  In terms of PCB layout, provide the physical dimensions of the package so you can:
    a. Create the layout symbol if it's not found in the Visio stencils,
    b. Accurately represent the component to scale on the layout diagram.

*  In terms of the PCB schematic:
    a. Provide the component pin-outs to help you determine possible connecting points, and whether
        the traced out paths are logical and correct,
    b. Provide the truth-table functions or signal properties (input, output, bidirectional, etc.) should
        the pin-outs are not obvious or self-explanatory in themselves,
    c. Provide design application notes that give hints on how the component can be used in relation
        to other components.

Monday, March 27, 2017

Conformal Coatings

As the term implies, a conformal coating is a thin film (25-75μm) of protective chemical substance (or membrane) that coats over a PCB or electronic assembly by conforming to its contours and components. Conformal coating in effect applies a layer of insulation on the PCB against moisture, dust, heat, fungus, and corrosion, etc.

Not all PCBs are conformal coated—motherboards found on personal computers and laptops usually aren't, including circuit boards that are installed in most mobile phones. In fact, many PCBs found in commercial household products like TV, washing machines, fridges, and hi-fi sound systems seldom are, except in countries where the weather and environment warrant its use. Military circuit boards and PCBs used in aeronautical designs, on the other hand, because of the harsh and often extreme conditions in which they operate in, must of necessity be conformal coated to ensure they continue to be functional and reliable.

PCBs that are conformal coated usually have a glossy shine on both the component and solder sides, and will exhibit a luminous blue glow when placed under ultraviolet (UV) lighting. The table below lists five types of material you will most probably encounter:


Most conformal coated PCBs I worked on so far use some form of acrylic resin as the medium, which is quite easily removed with solvents like the Humiseal 1080, a VOC-compliant, non-ozone depleting
chemical.

There are rare instances where the coating is epoxy or polyurethane, in which case I resorted to running a fine-pitch file gently over the tips of the component legs to lightly scrap off the coating to expose the conductive solder, and then brushing off the flakes using an anti-static brush.

Thursday, March 23, 2017

Bill of Materials

The bill of materials (BOM) associated with a PCB provides a complete listing of the components present on that board, as well as possible optional ones depending on the PCB revision and configuration. It would be great to have the BOM readily available as it definitely cuts down the amount of work to create one yourself, and eliminates guess work and further effort to determine the values of components such as resistors, capacitors, and other surface-mounted devices (SMDs) which are too small to be marked.

On top of that, most military-grade PCBs have one peculiarity—the ICs used are of military specification (MIL-spec) type that do not exhibit the familiar standard industrial part numbers (e.g. SN74LS00), but have cryptic and hard to decipher NATO or national stock numbers (NSN), or MIL-STD-883 part numbers (e.g. M38510/30001).

To create a BOM for the PCB, you need not go into details the way the manufacturers do for their products. It's meant to be for your reference so keep it simple with just the two essentials—part number and reference designation. Below is a sample BOM which I made from a military PCB:


Notice the MIL-STD-833 part numbers for most of the ICs ending in /833 or /833B? Even the discrete components are MIL-spec grade! The values of the resistors can actually be determined from their part numbers, but the capacitors will need referencing to the manufacturer's look-up tables based on their groupings (i.e. M39003/01, /03 and M39014/01, /02).

Identifying the components on a PCB, however, will require some knowledge and familiarity about their appearances and takes a bit of practice.

Tuesday, March 21, 2017

Assessibility

Generally, PCBs can be grouped into four types: through-hole, surface-mounted, mixed, and flex-print. Prior to the appearance of ball-grid-array (BGA) components, majority of the PCBs have little or no accessibility issues since the component leads or pins are visibly soldered to the board by machine or by hand. There are exceptions, however, when a manufacturer decides to apply some kind of epoxy compound over certain parts of the PCB to provide support for weak spots or socketed components, or simply to mask off sensitive information to keep prying eyes away or discourage repair and rework.

SMT technology has, however, evolved to the point where even more precious board space savings can be achieved on the PCB, by transforming the through-hole pin-grid-array (PGA) a step further to the surface-mount BGA. Such progress is seen as inevitable and necessary in engineering expediency and business sense, but not necessarily appreciated and welcomed by the test and repair communities, since it severely hampered the ability to test and repair this type of PCBs using traditional methods and equipment.

The often hyped alternative solution to this predicament is boundary-scan or JTAG testing. Granted, many new ICs including the BGA types have in-built JTAG circuitries, but ensuring that a PCB meets the JTAG requirement will take additional efforts on the designer's part to implement to realize the design-for-testability (DFT) goal.

Accessibility of probe points is thus an important factor to consider before reverse engineering work can commence. You should therefore make an estimate of how much of the PCB's component leads or pins are accessible, compared to those that have been obstructed, hidden, or even buried intentionally. One other factor that adds to the problem of accessibility is conformal coating; we will look at it separately since it's quite a broad subject in its own right.

Monday, March 20, 2017

Basic Preparation Work

"If you know both yourself and your enemy, you can win numerous (literally, a hundred) battles without jeopardy."
Sun Tze, The Art of War, c. 544-496 BC

The same is true when it comes to reverse engineering a PCB. I have mentioned previously the background that is expected of you—that's knowing your abilities and the areas you may be lacking for a start. Not that you can't start right away. It'll be good though to make an inventory list of the areas you need to brush up and get back up to speed, and where you really need to put in effort to build up that knowledge.

As for knowing your enemy—well, that's what Chapter 2 is all about!


Getting to Know Your PCB

I don't know about you, but as an electronics engineer, being able to look at a PCB and appreciate the ingenuity of the designer that brought it into existence, from initial ideas to implementation, from its baseline specifications to its intended functions, and from the choice of components to its final layout to achieve the best possible use of limited board space, it's more than just engineering and planning. There is an artistic beauty that is visible only to the initiated, and a hidden gem that is revealed to the keen-eyed. In every PCB there is a treasure to be discovered, some coveted design knowledge to be gained; and that is a strong enough reason and motivation for the hard work ahead.

Here are the key areas you need to pay attention to and gather as much information as you can before launching into the deep:

1.   Accessibility (probe points)
2.   Bill of materials
3.   Conformal coating
4.   Datasheets

I call these the ABCD's of preparation work. By working through these key areas, you'll gain a better overall picture of a PCB, which may help you decide if it's feasible to attempt, if you have the time and ability to do it, and whether it's worth the effort or not.

Wednesday, March 15, 2017

The Three D's of RE

PCB reverse engineering is by no means an easy task. Very often, it is laborious because of the repetitive nature in finding and ascertaining the electrical connections between components. Also, being able to constantly visualize the schematic diagram that is slowly taking shape and having to realign the various portions of a circuitry to ensure readability requires certain artistic affinity—a skill that can usually be picked up and refined only with practice.

Ultimately, it comes down to three essential traits that a person who wants to engage in such a work must possess in order to be able to successfully complete the task:

Determination

A 'never say die' attitude is important especially when faced with the constant frustration of not being able to locate the electrical connections to make sense out of the partial schematic diagram. This is not to say that one must be insistent on finding the 'missing link' and gets stuck on one particular part of the PCB, and not able to make further progress. Working smart is just as important as working hard!

Discipline

Being focused, systematic and maintaining a careful work practice are necessary to avoid unwanted mistakes that can prove to be both time–wasting and confusing, perhaps even to the point it demoralizes you. Many engineers have the habit of diving straight into a project or task without giving thought to at least some planning or preparation work. This is a BIG mistake that will pay grave dividends—believe me—I made them myself and thankfully survived to regret (and learn from) it!

Dedication

Nothing can replace the satisfaction of seeing a task complete if a person does not take ownership of the work and prides himself or herself in the thing he or she is doing. After all the end product bears the signature of the craftsman!

Monday, March 13, 2017

My Stand on Copyright

Whilst copyright laws exist to discourage or keep at bay would-be competitors (or even pirates) from stealing the designs and ideas for their own commercial gains, PCB reverse engineering services are still very much sought after, more as a desperate attempt to resolve the genuine problems of obsolescence or lack of support, and in such cases the PCBs reproduced are usually intended for internal consumption and not external circulation. Confidentiality and non-disclosure agreement (NDA) will also ensure that only the customer and the service provider are the only parties in the know.


It's a fine line we're treading when we do reverse-engineering of any sort. We need to ask ourselves why we're doing what we're doing, and whether we're doing it out of necessity on a personal capacity to get our job done, or out of curiosity when a certain PCB design so intrigued and interests our engineering senses that we couldn't pass it by without knowing what makes it tick. Frankly, troubleshooting and diagnosing PCBs without documentation invariably involves some degree of reverse-engineering, albeit in a less systematic and perhaps haphazard way. Prior to taking up reverse-engineering using Visio, I did what many repair technicians or engineers would do when stumped with a PCB without schematics—create partial sketches of the circuits I was analyzing, hand-drawn or with the help of primitive graphics editor.

Having said that, I personally do not endorse PCB reverse engineering to be used as a tool for anti-competition or theft of design, in which the end result is the financial lost of the rightful designer or company concerned. I believe that as an engineer, there is a code of honor to live by and uphold, by which personal enrichment and knowledge can be gained and shared, but not at the expense of others.

Thursday, March 9, 2017

Legal and Copyright Issues

Probably one question you have in mind when approaching the subject of PCB reverse engineering is copyright issues.

So to what extent is PCB reverse engineering legal, and under what circumstances is it a violation of the copyright law? Given the complexities of legal terms involved, there are simply no straight answers. Still, the fact is there are companies out there openly advertising and providing PCB reverse engineering services, as well as selling software tools that perform such tasks. To my personal understanding, such services exist for some of the following reasons:

1. The PCB is obsolete and no longer supported by the original equipment manufacturer (OEM) or in some cases, the OEM is out of business and supply of the PCB is unavailable in the market. In such instances, the only recourse then is to engage these companies to reverse engineer and reproduce the PCB in sufficient quantity to extend the useful life of the system.

2. The company or OEM that designed and produced the PCB lost their design files (whether by accident or through catastrophic causes) and are still under contractual obligation to support their product before its end-of-life (EOL) period.

3. Modification to the original PCB design is required for extended capabilities but due to nature of confidentiality, the OEM cannot be involved or have foreknowledge of such changes, in which case obtaining the OEM's design files will be out of the question.

For those interested to know more about copyright issues pertaining to this subject, a good article can be found in the paper written by David C. Musker in which he presented at "Protecting & Exploiting Intellectual Property in Electronics", IBC Conferences, on June 10, 1998.

Wednesday, March 8, 2017

My Personal Story (Part 3)

You can see from the photo that the infrared matrix sub-assembly is quite a big board with a rectangular cutout in the middle for an array of horizontal (40) and vertical (30) pairs of infrared emitter and sensor diodes. These fit nicely around the tinted bezel display frame in which the brightly orange-lit plasma display of the display driver sub-assembly shows through.


The infrared matrix sub-assembly (top view)                                              Layout drawing

If you work often on surface-mounted or mixed PCBs, you'll notice that apart from the ICs and bigger component parts, the miniature SMT resistors, capacitors, and even semi-conductors such as the SOT package3 diodes and transistors may not have reference designators assigned to them on the silkscreen layer, and this is expected with densely populated SMT boards due to the difficulty and impracticality of doing so. The book explores how to give these nameless discrete devices their reference designators to facilitate the drawing of the schematic diagrams.

To cut the story short, in total I spent about a month drafting the parts list, gathering the datasheets, creating my first collection of Visio symbols for both the layout and schematic entities, drawing the PCB layout, and finally tracing out the schematic diagram.

Monday, March 6, 2017

My Personal Story (Part 2)

The next consideration was what CAD software to use for this endeavor. It so happened that there's an old copy of Visio Technical 4.5 lying around, so I installed and fired it up to do some fiddling around. It made an instant connection that persuaded me this was the best tool for the job! The first thing I did was produce a mechanical drawing of the front panel, as shown below, which took me just slightly over half an hour. Not bad for a start, eh?

The rear view of the unit was more complicated with the CPU board and the display driver sub-assembly visibly in view, but I managed to draw that too though at a much later date when I had the time to do so. However, I will not be showing it here since that is not the main focus of the story. Still, I'm sure you'll agree that Visio fared pretty well for illustration purposes (and we're just warming up!).

After disassembling the unit, I proceeded to analyze the infrared matrix sub-assembly and gathered whatever information I could find on its components. What intrigued me was the primitive yet beautiful design of this multi-layered PCB—the making use of narrow-angled beam infrared emitter and sensor diode pairs—to achieve the X and Y coordinates mapping for the touchscreen effect that was the usual practice back in the mid-1990 era. It had many of the elements that made reverse engineering particularly interesting and challenging, such as the peculiar shape and size of the PCB, the presence of through-hole and surface-mount components that are mounted on both sides, and the thick conformal coating. That's quite a handful for my virgin attempt but I went ahead anyway.

Saturday, March 4, 2017

My Personal Story (Part 1)

As a principal engineer working in a defense industry company supporting the military, notably the air force and navy, in the area of local depot-level repair involving weapon systems that are, well, rather dated, it is inevitable that many defective PCBs that are sent to my workshop lack the necessary schematic diagrams to carry out troubleshooting analysis and repair work. Sounds familiar to some, if not many of you who are repair technicians and engineers by profession, isn't it?

My first serious attempt at PCB reverse engineering happened in the spring of 2001, about six months before the fateful 9-11 event. It was a Monday morning when I came in for work and as usual a trip to the pantry to get a cup of hot water. As I passed by the meeting room, I noticed a 16 by 12 square inches by 3-inch high item lying face down at one corner of the conference table. In the course of the day, some of us went in and out of the meeting room, taking curious peeks at the item but no one could figure out what it was doing in our work centre. It was only near lunch time when my manager came back from a meeting that he beckoned me to the room and said, "What do you think—can we repair this unit?" Suddenly it dawned on me that I was tasked to take up the challenge, being one of the senior and more experienced engineers at that time.

After examining more thoroughly I remarked, "It seems to be a high voltage display unit of some sort. We've done PCB repairs all along but this is the first time we're looking at a whole unit." Well, my hunch was right. It's a plasma touchscreen display unit used on-board naval ships. My manager related that the navy had approached him for a solution to their repair predicament—they had been sending these defective units overseas to be repaired by the OEM, and being end-of-life (EOL) items, there's no more contractual support so the cost of repairing each unit was ridiculously high. Lately the frequency of breakdowns had increased due to aging, and the navy desperately needed a solution to cut their overseas repair cost, and fast.

"Let me take this baby apart to study it. I'll get back to you in three days." And so it was that on the third day I reported my findings to my manager.

As shown in the partial cross-section, the touchscreen display unit comprises five sub-parts:

1. CPU control board
2. Display driver high-voltage sub-assembly
3. Infrared matrix sub-assembly
4. Touchscreen display frame
5. Front panel mounting

Defect symptom for this unit was no display so I worked on the display driver sub-assembly and found some faulty power MOSFETs. The parts were ordered and replaced but no testing could be carried out since there's no electrical drawing to show connector pinouts and what power to apply. The item was sent back to navy for site test and surprisingly it passed!

I was told that more such units would be coming in from the navy's back logs with quite a number of them having touchscreen with no response failures—an indication that the problem might have something to do with the infrared matrix sub-assembly. It therefore prompted me to consider doing reverse engineering for this particular sub-assembly.


Friday, March 3, 2017

Types of PCB

Printed circuit board (PCB) technology has seen a tremendous jump since its humble beginnings in the early 1900s. From simple discrete, single-sided through-hole to the complex fine-pitch, multi-layered surface-mounted board, the amount and density of components for a given PCB area have increased manifold while the overall size of PCBs have reduced substantially.


Such rapid advancements in PCB design not only present problems and difficulties to the test engineer who is responsible for writing test programs for the board, they also pose seemingly insurmountable challenges to those daring enough to re-create the schematic drawings. PCB reverse-engineering is indeed not for the uninitiated nor the faint-hearted. But for those who are willing to devote their time and energy to learn this art, the end results can be rewarding to say the least; it may even put you a cut above your fellow engineers because in the process of doing it, you not only unravel the beauty of the PCB itself, you actually gain engineering insights and ideas from the original designer's expertise and ingenuity on how a particular circuit is designed, how certain difficulties are overcome, as well as the sound practices and design techniques that are applied in the real world.