Archive for the ‘Made in China’ Category

On Counterfeit Chips in US Military Hardware

Saturday, December 3rd, 2011

Amendment 1092 to the Defense Authorization Act of 2012 is a well-intentioned but misguided provision outlining measures designed to reduce the prevalance of counterfeit chips in the US military supply chain.

The Defense Authorization Act already has drawn flack for a provision that gives the US military authorization to detain US citizens indefinitely without trial, and I think it rather ironically requires an assessment of the US Federal Debt owed China as a potential “National Security Risk” (section 1225 of HR1540) — anyone want to take bets as to whether the conclusion of this assessment leads to prioritizing deficit reduction as a national security issue, or if it leads to justifying further borrowing from China to build up a military to fend off its biggest creditor?

Under the proposed anti-counterfeit amendment, first-time offenders can receive a $5 million fine and 20 years prison for individuals, or $15 million for corporations; a penalty comparable to that of trafficking cocaine. While the amendment explicitly defines “counterfeit” to include refurbished parts represented as new, the wording is regrettably vague on whether you must be willfully trafficking such goods to also be liable for such a stiff penalty.

If you took a dirty but legitimately minted coin and washed it so that it looked mint condition and then sold it to a collector as mint quality, nobody would accuse you of counterfeiting. Yet, this amendment puts a 20 year, $5 million penalty on not only the act of counterfeiting chips destined for military use, but potentially the unwitting distribution of such chips that you putatively bought as new but couldn’t tell yourself if they were refurbished. Unfortunately, in many cases an electronic part can be used for years with no sign of external wear.

The amendment also has a provision to create an “inspection program”:

(b) Inspection of Imported Electronic Parts —

(1) … the Secretary of Homeland Security shall establish a program of enhanced inspection by U.S. Customs and Border patrol of electronic parts imported from any country that has been determined by the Secretary of Defense to have been a significant source of counterfeit electronic parts …

It’s one thing to inspect fruits and vegetables as they enter the country for pests and other problems; but it is misguided to require Customs officers to become experts in detecting fakes, and/or to burden vendors with the onus of determining whether parts are authentic, particularly with such high penalties involved and the relative ease that forgers can create high-quality counterfeit parts.

To better understand the magnitude of the counterfeiting problem, it’s helpful to know fakes are made. The fakes I’ve seen fall into the following broad categories:

1) Trivial external mimicry. Typically these are empty plastic packages with authentic-looking topmarks, or remarked parts that share only physical traits with the authentic parts (for example, a TTL logic chip in an SO-20 case remarked as an expensive microcontroller that uses the same SO-20 case). I consider this technique trivial because it is so easy to detect during factory test; in the worst case you are sold a thin mixture of authentic and conterfeit parts so that testing just one part out of a tube or reel isn’t good enough. However, in all cases the problem is discovered before the product ships so long as the product overall is thoroughly tested.

2) Refurbished parts. These are authentic parts recovered from e-waste that have been desoldered and reprocessed to appear as new. These are very difficult to spot since the chip is in fact authentic, and a skilled refurbisher can create stunningly authentic-looking results that can only be discriminated with the use of electronic micsoscopes and elemental/isotopic analysis. I also include in this category parts that are new only the sense they have never been soldered onto a board, but were stored improperly (for example, in a humid environment) and should be scrapped, but were subsequently reconditioned and sold like new.

3) Rebinned parts. These are parts that were authentic, and perhaps have never been used (so can be classified as “new”), but have their markings changed to reflect a higher specification of an identical function. A classic example is grinding and remarking CPUs with a higher speed grade, or more trivially parts that contain lead marked as RoHS-compliant. However, it can get as sophisticated as vendors reverse engineering and reprogramming the fuse codes inside the chip so that the chip’s electronic records match the faked markings on top; or vendors have been known to do deep hacks on Flash drive firmware so that a small memory can appear to a host OS as a much larger memory, going so far as to “loop” memory so that writes beyond the capacity of the device appear to succeed.

4) Ghost-shift parts. These are parts that are created on the exact same fabrication facility as authentic parts, but run by employees without authorization of the manufacturer and never logged on the books. Often times they are assigned a lot code identical to a legitimate run, but certain testing steps are skipped. These fakes can be extremely hard to detect. It’s like an employee in a mint striking extra coins after-hours.

5) Factory scrap. Factory rejects and pilot runs can be recovered from the scrap heap for a small bribe, and given authentic markings and resold as new. In order to avoid detection, workers often replace the salvaged scrap with physically identical dummy packages, thus foiling attempts to audit the scrap trail.

6) Second-sourcing gone bad. Second-sourcing is a standard industry practice where competitors create pin-compatible replacements for popular products in order to create price competition and strengthen the supply chain against events like natural disasters. The practice goes bad when inferior parts are re-marked with the logos of premium brands. High-value but functionally simple discrete analog chips such as power regulators are particularly vulnerable to this problem. Premium US brands can command a 10x markup over Asian brands, as “drop-in replacement” Asian-brand parts are notorious for spotty quality, cut corners and poor parametric performance. However, there is a lot of money to be made buying blanks from the second source fab and remarking them with authentic-looking top marks of premium US brands. In some cases there are no inexpensive or fast tests to detect these fakes, short of decapsulating the chip and comparing mask patterns and cross-sections.

In the case of the US Military, they have a unique problem where they are one of the biggest and wealthiest buyers of really old parts. Military designs have shelf lives of decades, but parts have production cycles of only years. It’s like asking someone to build a NeXT Cube motherboard today using only certifiably new parts; no secondhand or refurbished parts allowed. I don’t think it’s possible.

The impossibility of this situation may force military contractors to be complicit in the consumption of counterfeit parts. For example, the fake parts in the P-8 Poseidon were “badly refurbished”. A poor refurbishing job is probably detectable with a simple visual inspection, so even though people are quick to point fingers at China, maybe part of the problem is that the contractor was lax in checking incoming stock — or perhaps looking the other way, because if these are the last parts of its kind in the world, what else can they do?

Another part of the senate hearings revealed that L3 bought counterfeit video memory chips destined for C-27J aircraft from Global IC Trading Group. Well … duh. Global IC ain’t Digikey … they specialize in trading excess, overruns and secondhand goods. The prices are often good, but I only go to them if I’m really in a bind, and I’m willing to accept odd lots to get production moving at any cost. L3’s big enough to have a professional sourcing group aware of that, and thus exercise extreme caution when buying from such vendors.

My guess is that the stocks of any distributor in the secondhand electronics business are already flooded with undetected counterfeits. Remember, only the bad fakes are ever caught, and chip packaging was not designed with anti-counterfeiting measures in mind. While all gray market parts are suspect, that’s not necessarily a bad thing. Gray markets play an essential role in the electronics ecosystem; using them is a calculated but sometimes unavoidable risk.

While the situation is clearly a mess now, some simple measures going forward could help fix things for the future. One could involve embedding anti-counterfeit measures in chips approved for military use. For chips larger than 1cm, a unique 2-D barcode can be applied with laser markings. The equipment to do such laser-marking is relatively commonplace today in chip packaging facilities. The efficacy of such techniques has been proven in biotech, where systems such as Matrix 2D are deployed to track disposable sample tubes in biology labs. Despite a tiny footprint, the codes are backed with a guarantee of 100% uniqueness. Another potential solution is to mix a UV dye into the component’s epoxy that changes fluorescence properties upon exposure to reflow temperatures. If the dye is distributed through the plastic body of the case, the change will be impossible to remove with grinding alone.

A second partial measure could be to manage e-waste better. E-waste is harvested in bulk for used parts. One can purchase crudely desoldered MSM7000-series chips (the brains of many Android smartphones) by the pound, at around ten cents for a chip. These chips are then cleaned up, reballed and sometimes remarked, put into tapes and reels and sold as brand new, commanding over a 10x markup. Thus, a single batch of chips can net thousands of dollars, making it a compelling source of income for skilled labor that would otherwise work in a factory for $200 per month.

If we stopped shipping our e-waste overseas for disposal, or at least ground up the parts before shipping them over, then the feedstock for such markets would be reduced. It could also create jobs domestically for processing the e-waste, which by the way is a source of gold comparable to the richest gold ore. On the other hand, I’m of the opinion that in the big picture this sort of component-level recycling is actually quite good for the environment and the human ecosystem. Upon disposal, most electronics still have years of serviceable life in them, and there is a hungry market for technology in emerging economies that cannot be met with new parts purchased on the primary market.

A final option could be to establish a strategic reserve of parts. A production run of military planes is limited to perhaps hundreds of units, and so I imagine the lifetime demand of a part including replacements is limited to tens of thousands of units. I can fit ten thousand chips in the volume of a large shoebox; at least physically, it’s not an unmanageable proposition. These are small volumes compared to consumer electronics volumes. I imagine that purchasing a reserve of raw replacement components for critical avionics systems would only add a fraction of a percent to the cost of an airplane, and could even lead to long term cost savings as manufacturers can achieve greater scale efficiency if they run one large batch all at once. This could be a foolproof method to ensure supply trustability for critical military hardware.

Random Stories from China

Tuesday, November 15th, 2011

I’ve just returned from my first vacation in China. I came to the realization earlier this year that despite routine visits to China, I had only seen one tiny part of China — mostly the insides of factories in Guandong province. I’ve heard that China is much bigger than that, and so Chuang Tzu’s little frog decided it was time to poke its head above the well and see how big the sky is. My perlfriend and I picked a couple spots far, far away from factories. I wanted to go to Harbin, but we couldn’t find convenient flights, so instead we went to Yangshuo and Chongqing. Chances are you’ve never heard of them — and that’s exactly why we decided to visit them.

Yangshuo and its peasants tending rice paddies was an interesting study on China’s past; Chongqing was an interesting study on China’s future. According to wikipedia, the municipality of Chongqing has a population of 28 million people (that’s more than the entirety of Australia), yet few of my western friends have heard of it. It’s a special administrative zone, directly managed by Beijing; non-ironic pictures and busts of chairman Mao were common fixtures. This is in contrast to Shenzhen’s western influences, in part due to its proximity to Hong Kong. Chongqing is a hotbed of investment and growth; I’ve heard the city mentioned numerous times in rumors of mass factory migrations from Guandong to central China, where costs are lower. The city of Chongqing is definitely a lot cheaper than Shenzhen, even for a tourist; everything from cabs to food to hotel was cheaper by a substantial margin. While the air quality was terrible in Chongqing, overall I had to say I was pleasantly surprised to find that the citizens of Chongqing had a remarkably … wholesome … feel about them. They felt more laid back than Shenzheners. Kids played in the street. Teens would congregate at night in the plaza near my hotel and hang out, but were well behaved even into the wee hours. One could hardly walk a block without seeing people playing Mahjong in the street on makeshift card tables. My interactions with shop vendors were friendly, and often pleasant; bargaining was easier, and the service was generally patient and helpful. I suppose part of this might be due to the fact that a foreigner is still a novelty in Chongqing; in two days I saw only two western-looking people, and few spoke English. It probably also helps that Chongqing’s population is more local, with fewer seasonal workers and estranged immigrants.

I normally don’t make fun of Engrish — partially because there’s so much Engrish in China it’s hard to know where to start, and partially because my Budong Hua (get it? 普通话 (putong hua) = “Mandarin” vs. 不懂话 (budong hua) = “not understanding language”…the Mandarin equivalent of “Engrish”) is so bad I’m throwing stones from a glass house. However, this one item from a menu at a hotpot place called “qi huo guo” (chongqing is supposedly the origin of hotpot) really caught my inner nerd’s eye.

Given a choice between pig brains, ox throat or “odd bosons” (奇包子), I’d be most concerned about ingesting food made from strange fundamental particles; at least the others aren’t potentially made of antimatter. Thankfully, the odd bosons aren’t a product of some LHC experiment gone awry. “Odd bosons” are simply the restaurant’s eponymous dumplings (qi huo guo means “odd hot pot”). On recommendation by the waitstaff, I ordered the odd bosons. They were delicious.

On my way back to Singapore, I stopped through Shenzhen and gave Star Simpson an introductory tour of the hua qian bei markets. While wandering I finally found a book I had long been searching for:

Yep, that’s right, the book of iPhone schematics. I snapped that baby up for $4. Unfortunately, the pages are bigger than my flatbed scanner, so I could only capture about 80% of a page. Here’s a snippet from the table of contents:

Inside are a few handy diagrams, such as a component layout guide:

And also a list of key footprints with interesting pins highlighted:

And of course, pages and pages of schematics:

My feeling is that these schematics probably come from leaks of original Apple sources, because many of the annotations couldn’t be divined from a clean-room reverse engineering job. For example, the above schematics annotate that the AP_UART connection on the dock has a dual-footprint option for a possible drop-in DisplayPort upgrade. Anyways, these schematics are useful as a sourcing guide for cheap components. Any part found in this book has been made in millions-per-week quantities, which is a handy fact to keep in mind when bargain hunting for stable supplies of cheap components.

A classy addition to this book is a full-color teardown guide, with photos courtesy of ifixit:

While the book doesn’t credit ifixit for their labors, there are few things more validating of ifixit’s world-class status than Shanzhai copying ifixit’s materials into the canon of phone repair guides. Mad props to my peeps at ifixit.

Another little gem I bought in the market are the metal stencils pictured below.

These stencils, purchased at less than $1 each, are for various mobile phone chipsets. The stencils come in this “summary” form, and also in a more useful knock-out library where the metal is pre-cut around the edges of the footprints so you can clip out a single footprint and use it to guide the application of solderpaste to a PCB. However, my suspicion is that these “summary” form stencils are probably not used for applying solderpaste to mainboards, but rather used to identify chips that have been pulled off of boards through mass desoldering, and also for use in reballing the same BGAs. I’ve seen similar stencils used with great efficacy to manually reball BGAs on a factory line in Guanzhou. Hand-reballing of BGAs is surprisingly fast and efficient with the aid of a stencil and a machined jig. I remember watching with prurient fascination as the operator reballed BGA after BGA in a matter of minutes; mental arithmetic placed the cost of reballing at around a dime. Thus refurbished, the recycled chips can be used to repair broken phones, or to build whole “new” phones from scratch.

FANUC: Robot Sex Shop

Monday, February 15th, 2010

I’ve talked a bit about manufacturing on this blog, mostly from my personal experiences working for chumby building the eponymous devices. I was browsing around on the internet and came across another world of manufacturing that I don’t get to see — the world of highly automated manufacturing. Seems like the big fish in the pond there is FANUC, a Japanese company that spun out from Fujitsu (the acronym stands for Fuji Automatic Numerical Control). Their Japanese corporate site is a bit dry, so for people wanting something more digestible, check out their US subsidiary home page. Also, their corporate profile flyer is a bit amusing…it reads a bit like a backgrounder for some anime, complete with photos of fantasy art scenes and tea gardens cheek to jowl with big yellow robots.

FANUC may have the biggest robot sex operation in the world. Get your geek-voyeurism on and watch unabashed robot-on-robot-making-other-robot action in the video below.

And below is a bit longer, but still interesting video that goes through more of FANUC’s offerings (you will want to skip 3:00, where the narrator proclaims, “Now let’s look at the FANUC robots!”):

There’s a ton of YouTube videos for FANUC. Now this feels like we’re in 2010!

Copycat Corolla?

Sunday, December 13th, 2009

I saw this last week in China, and (un)fortunately traffic was moving slowly enough that I could snap a decent shot of it.

While Toyota is a household brand name, BYD is not — yet. For the uninitiated, BYD is a Chinese government-backed company that got its start making batteries for cell phones, and has expanded into just about everything, including cars (its strong background in making lithium ion batteries gives it a key part of the hybrid-electric car supply chain). Warren Buffet recently invested a couple hundred million dollars into the company, and everyone is expecting it to be a formidable player in the car market in the coming decades.

So when I saw this, I wasn’t sure if it was a stock Corolla to which a local enthusiast attached a BYD badge, or if it was a BYD copycat of our familiar brand-name Toyota car. Or, by some bizarre twist, perhaps Toyota is now using BYD to OEM their cars in China through a legitimized business relationship. I don’t know which is true, but according to the rumors I heard from people who saw this photo, this is actually a copycat Toyota made using plans purchased on the black market that were stolen from Toyota. Allegedly, someone in China who studies the automobile industry has taken one of these apart and noted that the welds are done by hand. In the original design, the welds were intended to be done by machine. Since the hand-welds are less consistent and of lower quality than the robotic welds, the car no longer has adequate crash safety. There are also other deviations, such as the use of cheap plastic lenses for the headlights. But, I could see that making a copycat Corolla is probably an effective exercise for giving local engineers a crash-course in world-class car manufacture.

Nokia Schematics!

Sunday, July 26th, 2009

I was wandering around on a rainy Saturday afternoon in the mobile phone market in Shenzhen and I spied a stall keeper working on a phone motherboard. Unlike most of the other folks in the market, he was working from a set of schematics — that got my attention. I asked him where he got his schematics from and he kindly dispatched his young son to walk me over to the small tool shop on the other side of the market where, buried underneath a pile of single-use BGA SMT stencils, was a collection of mobile phone schematics for just about every phone made.

I don’t know about you, but getting my hands on schematics gets me really excited. This is like, the Ultimate Hardware Geek Pr0n. Sure, undressing a mobile phone and revealing its tender innards to my gaze — the sweet perfume of flux residue unleashed, curling into my nostrils — is one level of hardware voyeurism. But, getting the schematics for the phone and peering into its very circuit diagrams — that’s a whole new level, like tearing off the undergarments and ravaging the bosom of the phone. I was excited. I brought the manuals to the clerk and asked how much…wincing at the price I may have to pay to bring these prized morsels back to my hotel room. I breathed a sigh of relief when he asked for only 75 quai — a little over $10 US — for the whole three-book collection. I didn’t even haggle. I grabbed my booty and ran for the nearest taxi.

Alright. Don’t take my double entendre too literally; it’s just fun to write that way. Anyways, on to the manuals…

As you can see, these are sold as service manuals.

A sample index entry.

Each phone has a scan of the circuit board that is annotated to call out the position and function of all the components. This helps with the repair process.

A detail of the schematic for the Nokia N95’s RF section.

The same publisher of these schematics also offers a wide library of schematics, including those for Samsung, Sony Ericsson, Motorola, and Chinese-local “copycat” phones (like the iPhone clone in the lower left hand corner).

It’s hard to say if these manuals are legitimate (in the sense that Nokia deliberately released the schematics for use as a repair guide), or if they were stolen and republished as a “repair guide”. I doubt, however, that they were reverse-engineered out of the phone, because the schematics contain references to codenames and lingo that would not be embedded directly in the circuitboard. A bit of searching around on Google reveals that these manuals are available for downloads in bits and pieces on various websites, but they all seem to derive from a Chinese origin, and not from Nokia directly.

When I give talks about Open Hardware, I emphasize that it’s fundamentally impossible to keep hardware closed, because the source is the same as the product. Schematics can be derived out of a circuit board layout — a completely legitimate activity under US law. There are shops in China that will pull out a netlist in a couple days for under $1k, and services in the US that will take a bit longer and cost you a lot more. Significantly, there is a whole lot more that goes into building hardware than a mere schematic design: it takes me days to capture a schematic, but it takes me months to get it into mass production. Thus, I believe that publishing a schematic makes the product more serviceable and more useful, yet has little negative effect on your competitiveness in the marketplace. This is a key difference between software and hardware, as the time between writing software and publishing it to “production” can be as short as a few seconds for web-based services.

From my personal perspective, having the schematics is handy for a number of purposes. Aside from satisfying a general curiosity about the phone’s structure, it’s interesting to see the details on how certain sub-circuits are implemented. For example, when I learned electronics at MIT, they never directly taught me how to do EMI mitigation, or ESD protection. While I know the theory behind it, the implementation is trade-craft know how; these are subjects where experience trumps knowledge. Therefore, seeing Nokia’s take on it expands my understanding of the subject.

The schematics are also very useful because of Nokia’s buying power. Picking the cheapest part for a mass-produced hardware design is a tricky exercise; when you leave the realm of buying a few hundred or thousand pieces at a time and move into really high volumes, often times the price of the part has less to do with its design features and more to do with its physical dimensions and who is buying a lot of it. If someone like Nokia is buying millions of a certain part a year, the supply of this part is very stable, lead times are shorter (usually), and the price goes down. So, if you’re a small company and you want to build something cheap, you want to pick parts out of the Nokia supply chain because you indirectly enjoy the benefits of Nokia’s buying power. Thus, these schematics are a good starting point for sourcing cheap parts for production.

Update: got the books for Sony-Ericsson, Motorola, and MediaTek-chipset phones. Found only one Samsung book and it was very out of date. From my observations, the books left on display in these small shops are remainders — typically a little older, perhaps a little less popular. I had to scour the market to find a few of the more recent books, which probably means they are out there but I just don’t know the right person yet. Interestingly, the MediaTek-chipset series of books included some “how-to” manuals on using the chipset to build your own phone. This may be part of the “open” repository of hardware knowledge I previously mentioned in my post about the Shanzhai phone-copiers-turned-innovators.