logo
Kurashizu Blogwhere ideas flow
  • Home
  • News
  • Blog
  • About
  • Home
  • News
  • Blog
  • About

© 2026 Kurashizu. All rights reserved.

Admin·New Post·Service Status
Powered by Cloudflare·01.11.26
← Back to news

Tech note: making your own V-I plots at home

Original article
lcamtuf.substack.com|38 points|5 comments|by zdw|Jul 17, 2026

Tech Note: Crafting Your Own V-I Plots at Home

Or, a guide on how to lose money with your friends.

While developing my recent publication, The Secret Life of Circuits, I made a conscious decision to ensure all the artwork was authentic.

My primary grievance with the diagrams found in mainstream electronics tutorials and textbooks is that they are accurate they are mostly fabricated. At their best, they are mere traces of ancient documents; at their worst, they are drawn from memory and are, to put it politely, "inspired by true events."

Internet V-I Plots

The Secret Life of Circuits features roughly 290 original illustrations created to avoid these shortcuts. I spent a great deal of time collecting empirical data for various phenomena, including:

  • Battery discharge trajectories.
  • Quartz crystal frequency responses.
  • Vacuum tube characteristics.
  • Signal reflections within a 100 ft coax cable draped across my shop.

The Semiconductor Struggle

While most data was easy to acquire, parametric plots—which map the relationship between voltage (VVV) and current (III) in semiconductors—proved difficult. I encountered three primary hurdles:

  1. The Floor: In certain regions, currents are so minuscule that a standard oscilloscope cannot detect them.
  2. The Ceiling: In other regions, current spikes instantaneously.

    "And before you know it, the device lets out the magic smoke."

  3. The Drift: Even in the middle, semiconductor junctions are temperature-sensitive. Self-heating occurs at currents as low as 1 mA1\text{ mA}1 mA, causing the data point on the screen to drift.

The Initial Workaround

To solve this, I abandoned the oscilloscope for a combination of a benchtop digital multimeter (DMM) and pulsed power from a lab supply.

ToolAdvantage
DMMHigh sensitivity (measures μA\mu\text{A}μA and μV\mu\text{V}μV easily).
Pulsed PowerMinimizes heat-induced drift.
Mineral OilNon-conductive liquid used to submerge the device for cooling.

Setup Close-up

Automating the Process

Manually logging VVV and III is tedious and prone to human error. I needed a computer interface. Many professional instruments utilize SCPI (Standard Commands for Programmable Instruments), a text-based protocol.

Depending on the hardware age, you can connect via:

  • RS-232
  • USB Type B (Printer port)
  • Ethernet (TCP connection to port 5025)

To identify a device, you send *IDN?\n, and it returns its make and model. Commands (which return no text) look like this:

  • SOUR:VOLT 1.2 →\rightarrow→ Sets voltage to 1.2 V1.2\text{ V}1.2 V.
  • OUTP 1 →\rightarrow→ Activates output channel 1.

The Upgrade: The Source Measure Unit (SMU)

Because my power supply lacked remote control, I eventually bought a Source Measure Unit (SMU)—a hybrid power supply and multimeter with rapid response times. While new SMUs are prohibitively expensive, the second-hand market is underserved. I managed to snag a Rohde Schwarz NGU401 for a tiny fraction of its original \9,000$ MSRP.

FastLog Implementation

Standard querying on this unit is slow (≈3 Hz\approx 3\text{ Hz}≈3 Hz). However, it features a "FastLog" mode that allows sampling rates between 100 kHz100\text{ kHz}100 kHz and 500 kHz500\text{ kHz}500 kHz, delivering VVV-III pairs as binary 4-byte floats.

The Catch: The documentation was unreliable. Specifically, the serial-over-USB interface corrupted the binary data. I eventually resolved this by switching to Ethernet.

My C-based capture logic follows this pattern:

if (current < 0.3_mA) {
    // Keep power ON
    // Average 2,500 points for noise-free microamp readings
} else {
    // Pulse power for 5ms
    // Average the best 20 samples from FastLog buffer
}

Results and Observations

The 1N4148 Diode

I mapped the forward bias of a 1N4148 diode (rated for 300 mA300\text{ mA}300 mA), covering a range from a few μA\mu\text{A}μA up to nearly 2 A2\text{ A}2 A.

1N4148 Plot

While the VVV-III relationship is typically called exponential, this only holds at low currents. In a log-current plot, the curve diverges from the idealized model around 10 mA10\text{ mA}10 mA due to the resistive effects of the semiconductor substrate. This proves why real-world data is superior to idealized textbook curves.

The BS170 MOSFET

The same method works for transistors. For a BS170 MOSFET, I plotted the drain-source voltage (VDSV_{DS}VDS​) against the admitted current (IDI_DID​).

BS170 Plot

The results show that the device acts as a constant-current source in its primary operating range; the current limit is determined by the gate-source voltage (VGSV_{GS}VGS​) and fluctuates by less than 10%10\%10% as VDSV_{DS}VDS​ moves from 1 V1\text{ V}1 V to 10 V10\text{ V}10 V.