Electronics

PLEN

An IC tester from the parts drawer, part 1: Arduino Mega and a fault that went away by itself

In two days an Arduino Mega, a prototyping shield and a handful of transistors from the drawer became a tester for DIP integrated circuits. The AI agent worked out the assembly drawing from a photo of the board, and one fault we still can't explain.

Nakładka na Arduino Mega podłączonym do USB: u góry rząd siedmiu tranzystorów 2N7000 z rezystorami, z lewej podstawka DIP-8 z tranzystorem BC557 obok

Pierwszy etap złożony: rząd tranzystorów 2N7000 (klucze masy) u góry, podstawka DIP-8 i klucz zasilania BC557 z lewej.

In the previous post I described a cheap component tester that got Wi-Fi. That story ended at an LM317 regulator: the tester saw “4 diode junctions” in it and nothing more, because it looks for a single component between three contacts, and an integrated circuit has dozens of them inside. So I asked the AI agent the next question: since we have a component tester, can we make a tester for integrated circuits in DIP packages?

DIP is the classic package with two rows of pins, the kind you push into a socket. A tester for such chips should answer two questions: does the chip work, and in the ambitious version also, what chip is it in the first place.

The division of roles was the same as before. The AI agent, meaning a program that writes code, draws and checks results by itself, did the design. I soldered, measured with a multimeter and made the decisions. The whole thing took 2 days, 12 and 13 November 2026, and ended with the first real chip in the socket.

The tester does not recognise anything by itself yet. That is the plan for part two.

Why an Arduino Mega and not an ESP32

The idea is simple. Each pin of the socket goes to a separate pin of a microcontroller, a small computer on a board. The program feeds successive combinations of zeros and ones to the chip’s inputs, reads the outputs and compares them with the truth table, that is, with a list of what a working chip should answer.

In my parts store there were four modern ESP32-S3 boards and one old Arduino MEGA ADK. Voltage settled the choice, not computing power. The ESP32 runs at 3.3 V and won’t reliably drive old logic chips from the 74LS and 4000 series, which want 5 V. The Mega runs at 5 V and has about 70 pins, so there is no need for chips that convert voltages or chips that add pins. A 40-pin socket together with power control takes ~48 of the Mega’s ~63 free pins.

A ready-made shield with a screen, lying next to it, was tempting too. It was ruled out, because a screen like that takes about 30 pins, and the tester needs 40 for the socket alone.

The rest of the parts were in the drawer too:

  • Arduino MEGA ADK as the brain,
  • a prototyping shield, a board that plugs onto the Mega, with a soldering area and a separate pad next to each pin,
  • a DIP-8 socket to start with,
  • transistors: 1 × BC557 and 7 × 2N7000,
  • 9 resistors of 10 kΩ and 1 capacitor of 100 nF.

The shield beat a breadboard and forty loose jumper wires for a simple reason: you solder the wires once and after that nothing slips out. The adapters from my older memory programmer will come in handy too. The ones with a clamshell socket connect the pins one to one, so they will let me test chips in surface-mount packages. The 1.8 V adapter is out: it has a level shifter inside laid out for one specific memory chip and would distort every other test.

An assembly drawing worked out from a photo

A prototyping shield is in practice a grid of holes. To know where to solder which component you need a drawing, and for the drawing you need to know how many holes there are and how they are laid out. I put the board under the camera over my bench, and the agent counted the grid from the image: 32 × 15 holes, with a few middle rows being shorter, because on the left the board has an area for a different kind of chip.

Then the agent wrote a script that draws the board with the component placement and, from the same source, generates a connection table to tick off. This matters more than it looks: the drawing and the table can’t drift apart, because they come from a single description. A change in the design means a fix in the script and a new set.

An earlier version of the drawing showed the connections as 68 crossing lines and it was hard to make sense of. I asked for something more readable. The lines were replaced by labels next to the pins, a numbered map of the 68 connections and a parts list with the numbers from my parts store.

The design relies on a clever trick. The chip under test has to get power, and different chips have it on different pins. Instead of switching power on each of the 40 pins, we adopted a rule: the chip always goes in with pin 1 pushed up against the left edge of the socket. Then the positive supply almost always falls on pin 40 of the socket, and ground on one of seven: 4, 7, 8, 10, 12, 14 or 20. So 1 power switch and 7 ground switches are enough. A switch here is a transistor used as an on-off switch, controlled by a Mega pin.

The power switch is a BC557 transistor with a 10 kΩ resistor at its base. As a side effect it works as a rough current limiter (~100–200 mA), so that a chip inserted the wrong way round doesn’t burn out.

The BC557 and the 2N7000 have the same package, and on the board they stand opposite ways round: one with its flat side up, the other down. In the first version of the drawing the BC557 had its pins in the wrong order. The agent caught this itself during a review and turned the transistor round.

“I have a DIP8 chip and I don’t know what it is”

Before soldering I asked a question that changed the design: I have a chip with eight pins and I don’t know what it is. What next? The agent wrote out a procedure:

  1. Read the marking from a camera photo.
  2. Check the chip unpowered for shorts.
  3. Find the power pins by the protection diodes, the diodes built into the chip to protect its pins.
  4. Switch the power on briefly and measure what happens.
  5. Try chip families one after another: I2C memory, SPI flash memory, ATtiny, 555, amplifier.

Writing this out as steps exposed two problems in the design. First, the pins of small chips landed on Mega pins that see only a zero or a one, and here you need to measure voltage. Second, the ground of eight-pin chips, pin 4, had no transistor of its own.

The fix was cheap. The Mega has 16 analog inputs, pins that measure voltage rather than just telling a zero from a one. The agent moved them to socket pins 1–8 and 33–40. As a result every chip of up to 16 pins has a voltage measurement on every pin, and the number of wires did not change. A ground switch for DIP8 was added too.

A question came up along the way: templates or AI? We agreed that recognition should work without the agent, from a chip database stored in the program. The agent is needed for adding new chips.

A ZIF socket and a programmer I hadn’t planned on

The tester’s final socket is a ZIF, a socket with a lever: you drop the chip in and the lever clamps the contacts. I asked about a 48-pin version. The answer: it would eat almost all the free pins, and nothing has 48 pins. The choice fell on the ZIF-40 Aries 40-6554-10, because the socket has to take both narrow and wide DIP chips.

A shopping digression here. I found a listing for a “UNIVERSAL ZIF SOCKET”: 8 sockets for 89.99 zł. The seller’s table of dimensions showed that the 40-pin one has its rows of contacts 15.2 mm apart, so it only takes wide chips. “Universal” meant “for everything”, not “for both widths”. Of the eight sockets, 1 would have been of use.

I also asked whether this device could program chips. Partly yes, but not the ones that need 9–16 V, and not 3.3 V memories. It ended with me buying an XGecu T48 programmer with 10 adapters. The T48 has a built-in logic chip test, but it doesn’t measure voltages, so the Mega still has its advantage. The decision: two tracks, one program. I keep building the Mega tester, and the program on the computer is to handle both devices.

Soldering, and a program that is “dumb” on purpose

On the second day I soldered the first stage: the DIP-8 socket, the power switch and all 7 ground switches. The DIP-8 socket stays for good as a quick socket, and for now it lets us test the program before the ZIF goes onto the board.

The agent wrote the firmware, the program for the Mega itself, compiled it and uploaded it over USB. This program is “dumb” on purpose. It can set and read pins, measure voltage, turn the switches on and off, and cut the power by itself when the voltage drops. All the knowledge about chips is meant to live in the program on the computer, so that the same chip database and the same algorithm work with both the Mega and the T48. The firmware takes 5.3 KB out of 254 KB.

First measurements: chip power switched on is 5.07 V. Switched off was a problem, because in an empty socket the voltage stayed. The 100 nF capacitor had nothing to discharge through. The firmware now discharges it with a pin and after switching off it reads 0 V.

A fault that went away by itself

Then it was the turn of the ground switch at pin 4. It didn’t work. Turning it on did not pull the pin to ground, and on top of that something odd was happening: the USB voltage dropped by 0.09–0.11 V. We knew this because the Mega can measure its own supply against an internal 1.1 V reference. The same test on the neighbouring pin gave zero drop.

A diagnosis by numbers began. The agent put forward a hypothesis, I checked it with the multimeter, and the measurement knocked it down. Six rounds of that:

  • a solder bridge where there shouldn’t be one,
  • the wrong wire at the drain, one of the transistor’s pins,
  • ground connected to the AREF pad,
  • a bipolar transistor soldered in instead of a MOSFET,
  • a resistor of the wrong value,
  • a damaged Mega pin.

Every measurement on the board came out correct.

In the end we ran a live test: the agent turns the switch on, I hold the multimeter probes. It works. 5 V on the transistor’s gate, 0.06 V on the pin. Only one thing had changed along the way: for the measurements I had taken the shield off the Mega and put it back on.

The cause is not established. We suspect a shield that was not pressed fully home, but there is no proof.

So the project log says “we don’t know”, plus one practical note: if the fault comes back, press the shield down first.

The first real chip: UA741

Finally a UA741 from my parts store went into the socket. It is an operational amplifier: in a test like this it compares the voltages on its two inputs and, depending on which is higher, drives its output high or low.

The UA741 has its supply on pin 7, not 8, so it doesn’t land on the power switch. The tester fed it 5 V straight from a Mega pin, because this chip draws less than 2 mA, and it got its ground through switch Q1, the same one that earlier refused to work. Then it measured the voltages on all 8 pins in several states. The two most important ones:

Stateinput − (pin 2)input + (pin 3)ground (pin 4)output (pin 6)supply (pin 7)
input + = 5 V, input − = 00 V5.07 V0.06 V4.63 V5.07 V
input + = 0, input − = 5 V5.07 V0 V0.06 V1.78 V5.07 V
UA741 powered from 5 V: the output switches in line with the inputs.

The output switches in line with the inputs, so the chip works. It reaches neither 5 V nor zero (4.63 V “high”, 1.78 V “low”), but on a 5 V supply that is a normal trait of this old amplifier, not a fault. It also confirmed that all 8 wires of the socket go to the right pins.

What’s next

Part two is three things: the ZIF-40 socket on the board, a shared program on the computer with a chip database, and the T48 programmer as a second device under the same program. Only then will we find out whether the procedure for an “unknown DIP8” works on a chip we really don’t know. The project code is in a private repository for now, so there is no link this time.

Related posts

Comments

No comments yet

Leave a comment

Your email address will not be published. Comments appear after approval.