Defcon:Blog Keklkakl blog blag

30Dec/170

Fake electronic components, a hazard of online shopping

This adventure started with a plan, and a bit of drafted design, to make a homebrew computer based on a Z80 CPU, and related components. But, I didn't actually have a Z80 chip yet! So, being cheap, I got the idea that going to eBay to find the needed components would be a great idea. Boy was I wrong.

After looking over my ideas, I searched eBay, and came up with a list of orders for central parts: A pair of Z80C0020 CPUs for $3.35, a Z84C4208 SIO/2 for $7.90, and five HM628128LP RAM chips for $6.0. All items from sellers providing free international shipping! The money left my account in december of '15.

As with all orders that include free international shipping, delivery time was a few weeks, so the project was put on a back-burner. When the parts arrived in early february, I was already well into other projects. So I gave them a quick look, everything seemed in order, and I packed them in my parts bin to wait. For nearly a full year.

When winter came around in 2016 and Christmas was approaching, it was time to start a winter-project. The Z80 homebrew project was resurrected, the components were dug out from the parts bin, and the first test-circuit was wired up on a set of breadboards purchased at bottom-price sometime during summer. A test-setup for this CPU is extremely simple. In the Z80/8080 instruction sets, the opcode 0x00, 0b00000000 is a NOP, so simply making all data-bus pins be tied to ground makes the CPU NOP its way through all 65536 addresses! So: behold the test-setup..

Z80 CPU Test circuit

Z80 CPU Test circuit

I checked, and checked again that I had the pinouts and connections right, made sure my bench power-supply was set to 4.99Volts, and examined my documentation to see that I should expect about 5-30mA current, LEDs not included. Next I connected my VCC from the power-supply to the setup, and immediately ripped the wired back off. The powersupply screamed 800mA at me! What could be causing my simple test circuit to draw 10-20 times as much current than I expected?

My first suspect was of course my wiring. So I checked that again. Pin-for-pin it was correct. The second suspect was the cheap breadboards, and the doublesided tape that stuck them to a wooden board. To eliminate those, I moved the circuit to a "known good" set of breadboards, part of an electronics trainer. After again checking the wiring, power was applied, and again the circuit pulled 6-800mA, and none of the LEDs lit up.

Next suspect was the Z80 chip itself. It could easily have been zapped by static during shipping, so I was happy I had ordered two, and slapped the second one on. This time, the power-supply reported a draw of 10mA, with a dim glow from one of the LEDs. Weird. I pondered for a moment, and just a moment long enough... Suddenly the current consumption rose to some high value I can't remember, and the famous, magical blue smoke appeared out of the Z80. Two for two...

As I now didn't have a CPU to use in the project, I decided to look up what the Z80 would cost from the reputable sources. After seeing that Mouser, DigiKey and RS Online all had the Z84C0010PEG in stock, I selected to order two from DigiKey for a total of $12, plus just about $18 for shipping. So, close to 10 times more than I paid for the two duds from eBay. But unlike the first two that took around 25 days to arrive and were non-functional, DigiKey had the parts in my mailbox some 50 hours after ordering, transported from the UK to Norway. And when I inserted one of them in the test circuit, it worked flawlessly, and pulled just under 28mA.

Z84C0010PEG, genuine

With a sneaking suspicion that less than $10 for the SIO/2 delivered might be a very optimistic price, I decided to test that one with only the supply voltage applied to the VCC/GND pins. I was most certainly correct. Just under an amp was being pulled, and the chip got very hot indeed (but did not release any magical smoke). Was I surprised? Well, the first time, with the CPU I was, even if the price had been very low indeed. But when the SIO/2 turned out to be a dud as well, I was not surprised.

The cheapskate in me had received a lesson: Always buy active semiconductor components from a proper, reputable source!

There's two types of semiconductor fakery going on: Clones of actual components, and outright fake duds. In the first group, you have things like the FTDI232/PL2303 fakes, where functional (but possibly crippled) semiconductor copies or clones are being manufactured and sold, as being the real deal. Some of these clones actually make their way into the mainstream supply chain of the official parts, sometimes because the original manufacturer "moonlights" poor-quality cheaper editions of the original.

The second type relies on online trade, cheapskates like me, or naive buyers. In this group, a seller looking to make a quick buck targets one or more reasonably popular but usually somewhat obscure components. They gets a hold of a bunch of very cheap components in the same package (like the DIP40 of a Z80). The cheap component will typically be a random IC that sells very cheaply, factory defects that can be picked from scrap heaps, or even old parts pulled from "recycling". With the package, they then clear away any markings on the package, and silk-print the markings of their "target". This convincing lookalike is then put up for sale, usually with a price placed around 1/2 of the "per one" price of sellers like DigiKey or Mouser.

Generic picture of Fake Z80

So, how does one spot the fake? Most of the time, simply looking at the price including shipping should be enough. If a component costs $6 plus shipping from Mouser, and sells for $2 including free international shipping, just walk away. It's going to be a fake. Also, if a seller is using the same stock, but not manufacturer, photo of the component as every other seller with the same device at the same price you're probably in muddy waters. Unfortunately it's not always that simple. Often times, the price is probable, and the photo looks convincing. And when you get the component in hand, the relabeling has been so well done you don't spot it. It really is a buyer beware situation.

With all these fake components going for cheap on eBay, does that mean that it is never OK to buy semiconductors there? I think it sometimes is OK. If the part has a realistic price, a plausible description, maybe even a unique photo taken by the seller, the probability of a good part goes up. As long as the seller is not located in China. Look for European or American sellers, Japan is typically also a "good source". In my experience, buying things from China is usually a decent experience EXCEPT for semiconductor parts. I've once received an IC, transistor or FET from China that was what I ordered...

Considering that a "realistic price" is typically the same as the price for a new component (or even higher) bought from DigiKey or Mouser, when would these "rules" for eBay-ing semiconductors apply? The answer to this is very simple: Non-active, obsolete parts. Sometimes you need an old part that's no longer in production. Trying to find a "good" seller of these is sometimes impossible, and if possible they are usually priced waaay expensive. So the best option for getting a decent price is going to eBay.

One example of mine of this is the AY-3-8910/YM2149. I have wanted to experiment with one of the "olde-time" 8-bit audio-chips, and looking over the various soundchip options I decided I wanted to try out the General Instruments AY-3-8910 or one of it's variants. Unfortunately the all of the AY-3-89xx chips, in GI or Microchip name, as well as the YM2149F have been out of production for several years. The only option of getting a hold of one is to get NOS or Pulled parts. I located a not-eBay seller (unfortunately I've lost the link) of genuine NOS AY-3-8912 chips. Unfortunately, paying $50 per chip was not something I felt like doing for a bit of experimentation. My limit was at $25. Going to eBay instead I located a chap in Germany that wanted $5 plus $1 shipping for one YM2149F. I also located a pair of sellers in China, one that wanted $8, free shipping for a Microchip AY-3-8910 and one that wanted $7 plus $2 shipping for an AY-3-8912. I ordered those three. When they arrived, I found out that the 8910 one was clearly a fake, while the 8912 and the 2149 both worked just fine!

There are a LOT of fake semiconductors on eBay and AliExpress. Generally, cheap, free-shipping components sold on these sites from mainland China are guaranteed to be fake. If the component you are looking for is still in active production, buy it from a proper electronics distributor like RS Components, DigiKey or Mouser. If the component you are looking for is obsolete/out of production, take care, research probable prices, and be critical to sellers location.

This post is part of a series documenting my journey in making my own homebrew computer, the posts can be found on this link.