Projects »

Surviving the Great Chip Shortage of 2022

Component choices and PCB layouts for improved manufacturability

No matter whether you're a hobbyist or a giant multinational, 2021 was a nightmare for manufacturing electronics, with many common components completely unavailable or costing several times their normal price. And 2022 isn't looking like it will be any better. Tesla actually increased their EV deliveries during 2021 by being agile enough to pivot to different components and rewrite firmware at short notice, whereas other car companies shut down entire factories for weeks or months at a time.

A common I/O expander IC was suddenly unavailable everywhere, with an 18 month lead-time :O

Generic photo of component placed onto PCB

This article shares some tips for designing around suddenly hard-to-find/expensive components. Tip #0 is to use a resource like Octopart for sourcing components to quickly check prices across multiple distributors, instead of relying on just one.

1. Using “Jellybean” components

These are pin-compatible components with the same package size from multiple manufacturers (usually with high stock levels), making it far less likely that all of them are unavailable. If your design can use them, they make great drop-in replacements. Dave from EEVblog gives some examples in his video below:

2. Component with different package sizes

A component is typically available in multiple package sizes (eg, the MCP23018 is available in PDIP, SOIC, SSOP or QFN), and you may be able to combine the footprints on your PCB so that you have more options when sourcing that component for manufacturing. You can even combine surface mount and through-hole footprints.

One of my projects uses a nRF51822-based Bluetooth module but (trying to reduce the cost as much as possible), I ended up with modules that had the same pin-out, but different physical sizes. The blue official Waveshare Core51822(B) measures 17×20.8mm, while the black clone YJ-14015 is 15×20mm. To support both module sizes, I created a combined PCB footprint with extended pads:

Two different nRF51822 modules with combined PCB footprint

3. Plug-in daughter boards / modules

If your main PCB is complex/expensive, but you want the flexibility of quickly replacing certain components due to shortages (or future upgrades), then using a socket for a daughter board might be suitable. The daughter board could be something custom with multiple components, or just a generic breakout board for a single component. There are cheap breakout boards available for most SMD package types and are typically double-sided. eg, the top side of a “SOP24” breakout board might support SOP/SO/SOIC packages with up to 24 pins and 1.27mm pin pitch, while the other side is for SSOP/TSSOP packages with 0.65mm pin pitch. So the same socket on your main PCB could potentially support a component in all those package types.

ESPmotors with 2× plug-in A4988 driver boards Generic DFN-12 breakout board

My WiFi-controlled stepper motors with ESP8266 product includes 2× plug-in A4988-based motor driver modules, as well as ESP8266 and voltage converter modules that are soldered directly to the PCB. These modules are mass-produced in vast numbers (by multiple manufacturers) so are cheaper than buying the individual components in small volume, as well as requiring less soldering.

Many motor driver modules use a common physical size & pin-out, allowing the same main PCB to easily swap to a different driver. eg, A4988, DRV8825, or TMC2208.

4. Multiple components with incompatible pin outs

Example PCB layout for an I2C 16-channel I/O expander

One my projects uses the MCP23017, a common 28-pin I/O expander IC that was suddenly unavailable everywhere, with an 18 month lead-time :O. So I started looking at alternatives that were available (and not outrageously expensive) and came up with 6 components from 4 different manufacturers that shared similar 24-pin package sizes & functionality.

These aren't fully pin-compatible, so there are some small compromises made in order to support all of them: in particular only 1 pin is available for setting the I2C slave address, and features like the voltage level translation specific to the PCA(L)6416A can't be used. I plan to integrate this design into my main PCB to save board space, but it works equally well as the plug-in daughter board that is presented below:

Render of I/O expander with 2 different components fitted

Pin-mapping table

Board pin #MCP23018PCA9535
PCA9555
TCA9535PCA(L)6416A
1INT16INTA21INT1INT1INT
2Vdd 10VDD2AD132A132VDD(I2C)4
3RST14RESET3AD253A253RESET
4P0.0 17GPA0 4IO0_0 4P00 4P0_0
5P0.1 18GPA1 5IO0_1 5P01 5P0_1
6P0.2 19GPA2 6IO0_2 6P02 6P0_2
7P0.3 20GPA3 7IO0_3 7P03 7P0_3
8P0.4 21GPA4 8IO0_4 8P04 8P0_4
9P0.5 22GPA5 9IO0_5 9P05 9P0_5
10P0.6 23GPA6 10IO0_6 10P06 10P0_6
11P0.7 24GPA7 11IO0_7 11P07 11P0_7
12GND 1VSS 12VSS12VSS12VSS
13P1.0 2GPB0 13IO1_0 13P10 13P1_0
14P1.1 3GPB1 14IO1_1 14P11 14P1_1
15P1.2 4GPB2 15IO1_2 15P12 15P1_2
16P1.3 5GPB3 16IO1_3 16P13 16P1_3
17P1.4 6GPB4 17IO1_4 17P14 17P1_4
18P1.5 7GPB5 18IO1_5 18P15 18P1_5
19P1.6 8GPB6 19IO1_6 19P16 19P1_6
20P1.7 9GPB7 20IO1_7 20P17 20P1_7
21ADDR1 13ADDR121AD021A0 21ADDR1
22SCL 11SCL 22SCL 22SCL 22SCL
23SDA 12SDA 23SDA 23SDA 23SDA
24Vdd 10VDD24VDD24VDD24VDD(P)
NC 15INTB

1ADDR is analog voltage for I2C slave address (8 values), but needs to be full ON (7) or OFF (0) for compatibility with ICs that have digital A0/AD0.
2INTA should be configured as active low, for compatibility with other ICs. INTB is not connected.
3AD1/A1 is always 1, since connected to Vdd for compatibility with other ICs.
4VDD(I2C) is connected to VDD(P), so no voltage level translation can be used.
5AD2/A2 is normally 1 for compatibility with other ICs. There is no reset feature in this IC.

Firmware support

Supporting multiple incompatible components obviously needs additional libraries, pin mapping table and ideally an abstraction layer so the bulk of the code is component-agnostic. It may be possible to auto-identify the exact component at boot time, but that results in larger code size as all the different libraries must be included. Alternatively, compile a different firmware version for each incompatible component. eg, with #ifdef statements.

My new article More ESP8266 GPIO pins with IOexpander library documents a library that provides a common interface for multiple incompatible chips, auto-identified at boot time.

Download files

Note how the MCP23018 footprint is rotated 180° and actually overlaps the other footprint to give the cleanest layout as well as reducing board space. It also uses the wider SSOP24 package, while the others are TSSOP24:

Schematic of circuit 2-layer PCB


Fb Share this on Facebook
Nikki Smith, January 2022.