Hacker News new | past | comments | ask | show | jobs | submit login
Reverse-engineering a vintage power supply chip from die photos (righto.com)
137 points by picture on Aug 18, 2021 | hide | past | favorite | 39 comments



Author here if anyone has questions or comments...


Are the physical dimensions of the chip listed somewhere in the article? I'm looking but haven't yet found them.

At the beginning you say "this very small chip", and it would be cool to include the actual dimensions. This will make it possible to get a sense for the size of the features from the magnified die picture.

p.s. You write some of the best articles, I love the way you break things down and present them in an approachable way. Thank you, Ken!


I didn't take measurements, but I think the feature size is about 20 micrometers, which is huge compared to nanometers in modern chips.


Your blog is incredibly well done, and it is always worth my time (several times over) to read what you post. Thank you!


Just want to say thanks for these thorough teardowns and wonderfully annotated die photos.


The Visual 6502 project is what originally inspired me to look inside integrated circuits and see how they really work. Although ICs seem like mysterious black boxes, you can see what's going on. At least until about 1980, and then it gets too complicated for me :-)

http://www.visual6502.org/JSSim/


What are the challenges in reverse engineering more modern chips?

PS awesome blog!


The main problem is Moore's Law, so everything gets smaller and smaller. The old chips I look at have a single metal layer, which makes it much easier to see what's going on. And then in the 1990s, feature sizes got smaller than the wavelength of light so my optical microscope can't see the features.


Would there be any benefit other than cost to analog power control chips like this rather than DSP controlled power supplies like we typically see today?

I'd imagine that their better response latency is eaten up by downstream capacitors anyway. Maybe they'd have better dynamic range to allow them to converge on a clean signal better than a stream of digitized samples that are always probably little off converged one way or the other by some quantum?

I'll be the first to admin that power control isn't my forte though, and most arguments I can come up absolutely sound like the specious stuff you hear out of 'audiophiles'.


Even MCU controlled SPS often times have pure analog control loop, where A/D and MCU is there mostly there for monitoring and perhaps digital control of some loop parameters, but the software is not an integral part of the loop itself...

Which is perhaps for the good, if you look for example on the boost topology, where saturation of the inductor leads to the shorting of the input through a switching transistor to the ground... :)


Here's an interesting video series describing such a software-configured, hardware-controlled switching controller.

Here, Microchip markets this particular line of PIC MCUs as a "field-programmable switch-mode power controller". But weirdly I haven't seen that language on their main site.

https://mu.microchip.com/getting-started-with-cip-hybrid-pow...


DSPs are more expensive to engineer than these tried and tested chips. If you need the functionality of a DSP then you use one but the core performance of a power supply is relatively unaffected.


Have you performed any teardowns and analysis of any similar but newer chips? If so, how does architecture and manufacture compare? Have there been any significant changes in state-of-the-art over the last two decades?


I've looked at more modern power supplies like a Macbook charger [1]. One difference is they have power factor correction in the frontend. Another difference is they use more advanced power supply topologies, such as a resonant converter. Also, efficiency is a bigger concern.

As far as the chips themselves, I haven't looked at a modern power supply controller chip, but I've looked at other power chips [2]. The biggest difference is they are CMOS instead of bipolar. They are also much more complex and dense, so I can't reverse engineer them with my microscope.

[1] https://www.righto.com/2015/11/macbook-charger-teardown-surp...

[2] https://www.righto.com/2020/05/tiny-transformer-inside-decap...


> They are also much more complex and dense, so I can't reverse engineer them with my microscope.

What would be the path forward if you chose to try an do that? A different light frequency microscope? Or something way more complex and expensive?

(Or would having the imaging capability not matter because the complexity is too high even if you could see it properly?)


I love your work, ever since the first time I saw one of your IC RE posts I felt really humbled and inspired by it so I'd like to take this opportunity to thank you for doing it.

Thanks!!!


Several months ago, I started reading every new article. This is the first comment I have left in a few weeks.

Your posts are fantastic, not only do we get a peek inside, but we learn about how electronics work, and why designers make choices.

Thanks!!!


Maybe someone else can chime in, but two questions:

* How do you know if the base silicon is N-doped or P-doped? (does it matter?)

* Why are the layouts of NPN and PNP so different? I’ve seen many die photos and you can (usually) easily tell which transistor is which.

* Lastly, are there any guides on learning how to decipher a die shot into a “schematic”? How do I know which colors mean what? (they vary between IC)

(if it’s not obvious, I’m still learning about this stuff)


The book "The Art of Analog Design" discusses the layouts of components in detail. It says (p280) that theoretically you could make a PNP transistor like an NPN transistor in reverse, but the characteristics of the dopants don't work well for this. Boron diffuses rapidly so it doesn't work well for a buried P layer. And boron only has 1/3 of the solid solubility of phosphorus. The other issue is that the mobility of holes is only 1/3 that of electrons in silicon, so there's an inherent disadvantage for PNP.

I'm kind of guessing that the substrate silicon is P-type since that seems to be more common. As for the colors, each IC is different. There are charts relating colors to thickness, but that doesn't really help me.


N type and p type have different resistance so to get a balanced transistor you need different area proportions of each. If memory serves that is.


Holes have lower mobilty than electrons, so P-doped areas must be larger for the same equivalent resistance.


just a thanking note, for I never had the idea of inspecting power electronics under the hood :)

do you think recent GaN power adapters have very different power ICs ?


I haven't looked into GaN power adapters. I think they use the same control ICs but GaN transistors, but I'm not sure. Maybe someone else here knows more?


The supporting ICs are the same. For now, at least.

But because of differences between GaN and Si, the selection of reasonably compatible controllers and gate drivers is smaller. For example, many ICs made for Si are underperformers for GaN, or they might need some "translation" circuitry because of different gate voltage requirements.

There are certainly many gains to be made with GaN-specific supporting ICs, but that hasn't really happened yet. My personal threshold for acknowledging a fundamentally different technology would be replacing all the Si in the gate drive loop with GaN. The idea is to not hold back the GaN switch from realizing its full potential with slower and less efficient Si.

The GaN switch itself is, of course, quite different from a Si power switch.


Depending on whether you use depletion, or enhancement mode GaN devices. Early GaN devices were JFET, not pure FETs too.

Ones designed with power electronics use in mind are made intentionally close to silicon FETs on specs.


I wouldn't call the UC384x "vintage"; they are still in production today. Likewise, the TL494/KA7500 was very common in PC PSUs and is still in production too --- perhaps you could analyse its die circuitry for comparison.

For schematics of power supplies using this UC3842 chip, see this site, near the bottom of the page.

Before looking at the URL I guessed it would be that site. The author is also on YouTube under the name DiodeGoneWild, and not surprisingly posts videos about SMPS electronics too.


It surprises me that even today nearly every power supply has a dedicated chip in like this whose task is switching a transistor on and off with the correct timings to regulate an output voltage, using mostly analogue components.

It surprises me that this role hasn't been replaced with a tiny ARM core running some firmware to do the same. The benefit is the core can be self-tuning. It can detect components going out of spec and warn and/or compensate. It can have digital comms with the rest of the system to set all kinds of parameters, allowing a more flexible design and allowing bug fixes in the field. It can have lookup tables to tune efficiency for input/output voltage, load, etc, in a way an analogue design never could.

Considering a tiny microcontroller has a BOM cost of just 4 cents, in the same region as dedicated power supply chips, I don't see why software-controller-switched-mode-supplies aren't common.


Too much complexity without any benefit (when adjusted for new failure cases and cost of additional components and complexity).

Electronics is mostly KISS, not only motivated by the financial factor but also reliability, manufacturing, etc.

So far micro controllers are too expensive, too sensitive to unstable power supply, too complex in general (requiring some support components in some cases, have an additional prefabrication step for flashing firmware by the chip vendor, and cost a lot more.

There is no clear advantage to the approach you mentioned.


The "new failure cases" it adds are rather exciting -- if the MCU locks up or glitches, which they are prone to, then it could short the supply rails and blow the switching transistors, or destroy the connected load by overvoltage. Analog control ICs, while they are not 100% reliable either, have many safeguards built-in that can react nearly instantaneously and don't depend on the relatively complex process of executing machine instructions.


There are plenty of systems where a software failure leads to permanent hardware failure. This would just be one more.


The main benefit is probably a wider flatter efficiency curve. Instead of saying "this power supply is 98% efficient when delivering 1 Amp (but more like 80% efficient at 0.1 amps or 2 amps), the power supply can adjust the switching frequency to trade off switching losses and output ripple for efficiency if the application allows.


I've come across a broken laptop before that had a complex power control computer like what you've described.

I ended up repairing it by hard-resetting the NVRAM and forcing the power control computer back to its initial "reset" state.

This was a common enough problem that the manufacturer had a step-by-step guide showing how to fix it on their website.

The moral of the story is that adding complexity, even when that complexity is designed to increase robustness, usually just means that there are more systems that can fail.


Well, your ARM-powered chip will need some analog-to-digital converters since the feedback signals are analog. And you'll need a high-current output driver to control the switching transistor. And some sort of startup circuit to provide power before the processor starts running. And an undervoltage lockout circuit to prevent the processor from malfunctioning if the voltage drops. So you still have a bunch of analog circuitry but you've added an analog-to-digital converter and a microcontroller. There are some applications where this tradeoff makes sense, but in a lot of cases it would just be excess complexity.


You can use an MCU as a controller. Here's an example.

https://youtu.be/m8rK9gU30v4

The problem is that you can't make every controller with an MCU, and you can't always make a competitive controller with an MCU.

There are already controller ICs that are configurable. In fact, modern controllers are a mix of analog and digital hardware. They do everything an MCU would do in that situation, but faster, less invasively, and with less power. Often, they do more than an MCU because they're not slowed down by an instruction cycle.

See my comment before last for an example of a software-configurable hardware controller.

Condition monitoring is a thing, and it's done with MCUs, DSPs, and FPGAs. But controllers sit on the non-isolated side of the gate driver, where they have basically no physical access to any useful signals. That's why condition monitoring is separate.

The lookup table idea is used for motor control. It's called a firing angle table. But that's a slower application.


This is definitely happening in onboard power management for systems with batteries. I suspect it's just big generic PSUs that stick to old analog ASICs.

Not self-tuning, though, they have to be tuned and all that software written.

Dedicated PMIC chips will be mixed signal, with digital control and analog failsafes.


Before switching ICs became ubiquitous it was common to roll your own with an 8-bit micro. It isn't cost effective now because of the additional external components, board area, and NRE you'd need vs the single chip solution.


I was actually looking into that this week due to chip shortages... it is not cost effective, but if the alternative is sitting and waiting a year for the specialized switch controller to become available again, that NRE doesn't look too bad.


TI makes some DSP chips with a dedicated peripheral (basically just a high resolution timer with some fancy capture/compare units) for doing PWM for power supplies.

Supposedly it can also detect shoot-through and modify timing to compensate.


Ha. I saw the link title and immediately thought "I bet it's a link to Ken Shirriff's blog".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: