banner
Home / News / Sebastian Harnisch's Programmable Precision Resistor Is an Impressive Piece of Homebrew Gear
News

Sebastian Harnisch's Programmable Precision Resistor Is an Impressive Piece of Homebrew Gear

Apr 21, 2024Apr 21, 2024

Maker Sebastian Harnisch has finished an impressively-professional programmable resistor, which he calls a "glorified decade resistance box" — looking for all the world like a commercial piece of precision lab equipment.

"In 2021/2022 I designed a DC electronic load that would be more capable, but also much more complex than the usual DIY solutions," Harnisch explains of the project's origins. "However, after building a working breadboard prototype of the analog circuitry with 12 ICs including multiple precision and dual opamps, I thought that it might be better to start with a smaller project that would allow me to gain a lot of experience and write much of the non-application specific code that I could use later on for the digital part. And this is how I started working on a programmable decade resistor, a pretty specialized tool for niche applications."

A decade box is, in effect, a more precise version of a varistor: rather than turning a knob to adjust its resistance between two values, you can program it to exactly what you need. Typically, this is very much a manual affair involving physical contact switches or plug wires — but the Harnisch Programmable Precision Resistor sits on the desk and provides not only a precisely-controllable resistance but a range of other features beside.

"The Programmable Decade Resistor consists of three main functional blocks," Harnisch explains. "Power supply (Power Supply Board). Programmable decades, control and driver circuits (Mainboard). User Interface (User Interface Board). The mainboard's main controller contains the business logic to control the relays, read the external inputs and run the USB and user interfaces. The main controller communicates with the User Interface Board over I2C which handles the multiplexing of the alphanumeric LED display, scans the switch matrix, decodes the signals of the rotary encoder and drives the buzzer."

The mainboard is driven by an STMicro STM32G441KBT6 microcontroller, with an EEPROM connected over I2C for data storage. There are a total of 39 non-latching relays, controlled using three low-voltage constant-current LED drivers acting as a 48-bit shift register. "Admittedly," Harnisch notes, "the choice of a constant current LED driver as a relay driver is a bit odd. However, the operating conditions of the part allow for it and the part was chosen to drive the LED display on the UI Board."

Elsewhere in the machine are two temperature sensors, used for calibration, two external earth-referenced inputs which can act as digital inputs, trigger inputs, or inhibit signals, and, of course, a USB connection — exposing the device to a host machine over a Standard Commands for Programmable Instruments (SCPI) interface. A front panel provides more local control, with a glowing alphanumeric display for immediate feedback on settings.

This project isn't Harnisch's only brush with the SCPI interface: back in April he showed off a desktop thermometer which provided SCPI control over USB, taking readings from a Texas Instruments TMP117M sensor and printing them to a pair of Hewlett-Packard HPDL-1414 alphanumeric GaAsP-LED displays.

The project is detailed in full on Harnisch's blog, across a series of posts.