# AI Tools #10: The Robot Cell Builds Two Blinking LEDs, and How It Works

> Source: <https://blog.softwarewrighter.com/2026/11/30/ai-tools-assembly-cell-multivibrator/>
> Published: 2026-11-30 08:15:00+00:00

**Recommendation:** Give agents purpose-built tools for the task: the MCP agent's first attempt made 6 of 8 nets in 876 commands, but with new tools it hit 8 of 8 in 638.
More in the playbook "Designing agent systems": <https://wpnews.pro/playbooks/agent-architecture>

# AI Tools #10: The Robot Cell Builds Two Blinking LEDs, and How It Works

*2573 words • 13 min read* • Abstract

In [AI Tools #9](https://blog.softwarewrighter.com/2026/11/27/ai-tools-assembly-cell-mcp/), the assembly cell (a simulated robot bench) built a 555 LED blinker in free air. The second circuit on its list was a two-transistor multivibrator, two LEDs blinking in turn, and it needed what the first did not: heat management for the transistors. It is built now, and a new video shows the whole build at 32 times speed, then how the cell works.

The cell is still virtual, an X_eTaL extension with a Rust simulator, and it now builds this circuit three ways: from a hand-written program, from its own planner, and by an AI agent over MCP.

| Resource | Link | 
|---|---|
| **Video** | [A Robot Cell Builds Two Blinking LEDs: the X_eTaL Assembly Cell, and How It Works](https://www.youtube.com/watch?v=pzzAfSIlk4w) | 
| **Live page** | [The multivibrator, in your browser](https://softwarewrighter.github.io/X_eTaL-extensions/cell/live/?program=multivibrator) | 
| **Docs** | [The cell extension](https://github.com/softwarewrighter/X_eTaL-extensions/blob/main/extensions/cell/docs/README.md) | 
| **Code** | [X_eTaL-extensions](https://github.com/softwarewrighter/X_eTaL-extensions) ,[X_eTaL](https://github.com/softwarewrighter/X_eTaL) | 
| **Related posts** | [AI Tools #9: An MCP Robot Bench](https://blog.softwarewrighter.com/2026/11/27/ai-tools-assembly-cell-mcp/) ,[X_eTaL-extensions, Extending the Machine](https://blog.softwarewrighter.com/2026/10/10/array-languages-xetal-extensions/) | 
| **The series** | [AI Tools: every post](https://blog.softwarewrighter.com/series/#ai-tools) | 
| **Comments** | [Discord](https://discord.com/invite/Ctzk5uHggZ) | 

## Two blinking LEDs, Manhattan style

The circuit is the classic astable multivibrator: two transistors, each holding the other off in turn through a capacitor, so a red LED and a green one take turns. Its parts are two 2N3904 transistors, four resistors, two 10 µF capacitors, the two LEDs and a battery snap: eight nets.

The 555 blinker was built dead-bug, the chip on its back and every part soldered to its legs. This one is built Manhattan style instead, on a ground-plane tile: a small copper-clad board, 26 by 16 mm, with ten turret posts 5 mm tall. Two posts stand on the copper plane and are ground; each of the others stands on its own pad, one net per post. Each part’s lead is laid along a post and soldered, and thin jumpers carry the nets from post to post.

## The build, at 32 times speed

The video’s first half is the build, as the live page plays it:

1. The tile goes in the vise, posts up, and a jumper joins its two supply posts. Each resistor is laid on its post and soldered.
2. Thin jumpers join each resistor to the supply; each end is laid along its lead, soldered and inspected.
3. The two transistors, each lead held by a pincer as a heat sink while it is soldered; then the emitter and base are jumped across.
4. On the left, the red LED and a capacitor, each jumped to its collector’s post.
5. The stage turns half round, and the right side gets the green LED and the other capacitor.
6. Last, the battery snap and its two jumpers, and the check: eight of eight nets made, nothing damaged.

The heat sink is measured, not assumed. Soldered with a pincer gripping its lead between the body and the joint, a transistor’s body warms 2.1 °C; with nothing on the lead, 47.5 °C. Both are far under its rating, but the pincer cuts the heat by more than twenty times.

The right side is built with the stage turned because the arm is not its own mirror image: the left side’s moves, with x and y negated, work where a mirror in x alone does not.

## Three builds of one circuit

The same multivibrator has now been built three ways, each checked the same way:

| Built by | Nets | Commands | 
|---|---|---|
| A hand-written program | 8 of 8 | 644 | 
| The planner, in X_eTaL | 8 of 8 | 619 | 
| An AI agent over MCP, first try | 6 of 8 | 876 | 
| The agent again, with new tools | 8 of 8 | 638 | 

The agent’s first try is where the cell learned the most. It made every joint good but left both transistors’ bases unjoined: it came to their posts last, when other parts’ joints and leads hemmed them in (the hand build and the planner lay the resistors first). It also kept blocks whose solder had never melted, and its rewinds were slow, each replaying the rewinds before it (since fixed). So the cell got the tools it asked for: an attempt that takes the first of several candidates, a per-part state, a route check, waypoints, laps along a lead, rework (flux and desolder), and rewinds from checkpoints. An attempt now refuses a block whose solder did not melt. With those, the second run built the whole circuit.

## Powered on

A check that every net is joined says the circuit is wired. It does not say it works. So the cell now powers the circuit as built: each conductor the check judges to conduct (good and weak joints, wires, a short if there is one) becomes a node, and each part becomes its electrical model.

The solver is modified nodal analysis, the method behind circuit simulators such as SPICE. Capacitors are stepped through time; the transistors and LEDs, which are not linear, are solved by repeated refinement (Newton’s method), with the time step halved at each switching edge, down to picoseconds. The transistors needed their small junction capacitances: without them the loop switched in no time, and no step could follow it.

Powered on, the two LEDs alternate, rarely both lit, at the rate the circuit’s own parts set. It is not quite the textbook’s: with an LED in each collector’s path, the collector rises only to the supply less the LED’s drop, so it switches faster. And a fault shows up as it would on the bench: with one transistor open, one LED flashes once at power-up and stays dark while the other stays lit.

The bench has the instruments to go with it: a component tester that measures each part before it is placed, an ohmmeter on the unpowered work, a voltmeter, a scope and a signal generator.

## How it works

The video’s second half is how the cell is built. In short: a Rust simulator, the one authority on what is possible, driven from X_eTaL as an extension, and built for the browser as WebAssembly, so the live page draws what the simulator says. It runs one command at a time, from a program or from an agent over the Model Context Protocol, and every outcome says what was done or why it was refused. The same program always gives the same state, to the microsecond.

| Part | How | 
|---|---|
| The arm | six joints; its pose solved in closed form, every solution, and the one nearest the current pose chosen | 
| Motion | each move speeds up, cruises and slows down, every joint arriving together | 
| Contact | checked every 0.2 mm along a move | 
| Heat | a network: each body, and each millimeter of lead, holds heat and passes it on, in 1 ms steps; solder melts, wets each side and freezes, good or not | 
| The circuit | modified nodal analysis, as above | 
| The planner | places parts by arrays, orders the joints one side at a time, then searches | 

The search changed too. Each step has several candidate blocks of commands; they used to be tried one at a time, each a full simulation. Now they are tried side by side on copies of the cell, as many at once as the machine has cores, and the first that works, in order, is kept. The program it writes is the same as trying them one by one, only sooner.

## The cell, in X_eTaL

To X_eTaL, the cell is a library. Each of its functions is bound by one line, its type written beside it:

``` php
"ce:" u̲se< "Cell"
"p_arse : text -> text"         ᶠᶠⁱb̲ind< "cell/parse"
"r_un : text -> text"           ᶠᶠⁱb̲ind< "cell/run"
ᶜᵉr̲un "move A to=0,0,20 rpy=180,0,0\nlift A mm=30"
```

The commands are a small language of their own: `pinch P1 on=R1.1 at=6`, `present U1.3+R1.1 at=S1`, `touch S1 at=U1.3+R1.1 dwell=2`, `feed S1 mm=2 rate=1`.

The planner is X_eTaL too. Clearance is the least distance between any two neighboring parts, every pair at once, through a table, each part paired with itself left out; and order grades the joins by side, then by pin. There is no loop in either:

```
ˡc̲learance ← { (tips, dirs) out →
  c ← 2 1 t̲ranspose tips + out × dirs
  x ← 1 s̲elect c
  y ← 2 s̲elect c
  d ← s̲qrt ((x '− t̲able x) ^ 2) + (y '− t̲able y) ^ 2
  n ← t̲ally x
  same ← (r̲ange n) '= t̲able r̲ange n
  'm̲in r̲/ r̲avel d + 1000.0 × f̲loat same
}
ˡo̲rder ← { (tips, pins) z →
  side ← (1 s̲elect 2 1 t̲ranspose tips) > 0
  g̲rade (1000 × n̲ot side) + pins
}
```

The search hands the candidates to the simulator as one block, to be tried side by side; with none, a guard says so:

```
ʰt̲ry ← { cs →
  0 = t̲ally cs ? "#!none\n"
  ᶜᵉt̲ryFirst ʰc̲oncat '{ x → e̲nclose (d̲isclose x) c̲at "#!next\n" } e̲ach cs
}
```

And the models: every part is described in X_eTaL and built by Blender. This gives a resistor its four color bands from its value, two digits, a power of ten, and gold (10 kΩ is brown, black, orange, gold):

```
ˡb̲ands ← { ohms →
  e ← (f̲loor 0.000000001 + (l̲og f̲loat ohms) ÷ l̲og 10.0) − 1
  d ← f̲loor 0.5 + (f̲loat ohms) ÷ e̲xp (f̲loat e) × l̲og 10
  4 3 r̲eshape ((1 + f̲loor d ÷ 10) s̲elect ˡdigits) c̲at ((1 + d m̲od 10) s̲elect ˡdigits) c̲at ((1 + e) s̲elect ˡdigits) c̲at ˡgold
}
```

## Cameras, and a stereo pair

An agent that builds by touch alone is guessing. So the cell now has cameras an agent can switch between: front, side, top and a close-up of the vise, each a simple pinhole camera with sensor noise, plus the microscope wherever it points. Two lenses 40 mm apart, looking the same way, form a stereo pair.

`measure` finds two points in both of the pair’s pictures, works out where each is from the two views, and reports the gap between them along x, y and z, with an error bound from the geometry. As with real stereo cameras, the depth error grows with the square of the distance and shrinks as the lenses move apart. A point out of a lens’s picture, or hidden behind a part, is refused, naming what hides it. Over MCP, an agent can list the cameras and ask what each one sees.

## What comes next

A 2D mode has started: all the wiring in one plane, rigid wires as the traces of a virtual circuit board, with the parts mounted on it as usual. So far it has a bare board, traces laid flat on it, and a planar router; tape, enameled traces and a case are planned.

## Closing

I’m still refining the capabilities of the model, to support different approaches to PCB-free electronic circuits, with better feedback sensors, and eventually improved usability and performance. After these planned improvements, I will start trying to connect this to actual hardware, and create videos of that. I expect to have to correct the model to deal with real world effects and hardware limitations. Due to my hobbyist budget, I expect the final hardware to look quite different, and therefore the model will change a lot, too.

*Part 10 of the AI Tools series. [View all parts](https://blog.softwarewrighter.com/series/#ai-tools)*

*Comments or questions? [SW Lab Discord](https://discord.com/invite/Ctzk5uHggZ) or [YouTube @SoftwareWrighter](https://www.youtube.com/@SoftwareWrighter).*
