The Valve Wizard

DIY test equipment

Arduino-Nano Valve Analyser MkII


I built my first Arduino curve tracer in 2018, inspired by the u-Tracer and by John Polstra's analyser project. It has served me well, but as a prototype it was a bit of a rats nest. I had to fix it a couple of times, and the way I arranged the PCBs was annoying. Recently I discovered the excellent FUtracer, and was inspired to revisit my design to make it a bit more streamlined, in the hope that others might like to build it too. I have put the whole thing on a single PCB (file at the bottom of this page) complete with a pre-wired octal socket for testing 6V6/EL34/6L6/5881/KT66 etc. The only external parts needed are a small 200-230V transformer, and a suitable source of heater power.

The nice thing about all these analysers is that they apply very short voltage pulses to the device under test (DUT), meaning you can trace curves up to high voltage and current without continuous power dissipation that might damage the DUT. It also dramatically cuts costs since you don't need a big power transformer to run everything. My analyser will go up to 500V at 500mA, yet needs only a 10VA 230V isolation transformer. My first design also included an Arduino-controlled heater supply, but I have decided that was overkill. It needed an extra Arduino and took up extra PCB space, when an external bench PSU or other ready-made power supply would be fine.

Overview:
The block diagram shows the basic parts of the Valve Analyser. The Arduino controls a pair of digital-to-analog converters (DACs) which produce DC voltages that are amplified and inverted to produce two negative voltages up to -60V, which provide bias to the DUT. These two identical bias supplies can supply the two grids of a twin triode, or even be used to test pentodes with negative suppressor grid, as shown here.
The Arduino also controls two identical high-voltage supplies that can deliver up to 500V pulses to the DUT. The operation of these blocks is explained in more detail below. The Arduino measures these applied voltages and the resulting currents through the DUT, and reports back to the PC. The recorded data can then be imported into a spreadsheet program like Excel to plot the curves.

I redesigned it all to go onto one PCB. As a bonus, there was space to include an octal test socket ready to measure 6V6s, EL34s, 6L6s and other pin-compatible valves. This is very handly since these are the kinds I measure most often, and it makes testing the circuit easier, before adding any wiring to other test sockets.

Heater Supply:
A separate heater supply is needed. This can be a bench PSU, transformer, or whatever is convenient. I used a 24V SMPS, followed by a cheap DC-DC converter with a nice display and adjustable voltage. Yes, I copied this from the FUtracer! Just hook the heater supply up to the labelled connector on the PCB.

Bias Supplies:

There are two identical bias supplies. This allows dual-triodes to be tested simultaneously, or to do interesting tests with pentodes like making the suppressor grid negative.

The Arduino sends the required bias voltages in the form of 12-bit instructions to a pair of MCP4725 DACs. These DACs are available very cheaply online as pre-built PCBs (e.g. Aliexpress). You need to mod them so the Arduino can address each DAC individually; this is done by adding a solder blob from the ADDR pad to the VCC or GND pad on the little PCB, as shown in the photo.

Each DAC can only produce a positive analog voltage up to its supply voltage, which is 4.095V set by reference IC U5. But we need a large negative voltage. The positive voltage produced by each DAC is therefore inverted and amplified by a factor of -16.5 by a OPA454 high-voltage opamp, making a little over -60V available in fine 16.5mV increments. The opamps run off asymmetrical power rails, +5V and -70V (actually -66V); we don't need them to swing their outputs above 0V. The opamps are rated for 100V supply and are one of the few 'specialist' parts in the project, costing about £5 each. The LTC6090 should also work as an alternative. The PCB includes footprints for through-hole and SMD packages.

The gain-setting resistors (R8-11, R18/20/21/24) are used in parallel combinations to improve the precision. Build-out resistors R14 & R22 and diodes D4 & D5 protect the opamp outputs from possible shorts inside the DUT that might try to dump high voltage into them. They also stop the opamps from driving the DUT grids positive during a fault. This IC has an enable-disable function which is not needed here, so pin-8 is pulled up and pin-1 is pulled to ground. Note that C3, C5 and C9 need to be rated for at least 100V, this is no ordinary opamp!

High Voltage Rectifiers

The raw negative rail, and raw high voltage rail, are both produced from a small 230V isolation transformer and rectifiers. I used a 10VA isolation transformer; you can find these in bathroom shaver sockets. Mine actually delivers about 200Vac no-load, which allows testing up to 450Vdc. If you want the full 500Vdc, use a transformer with a no-load voltage of 220V to 230V. Do not use a higher voltage than this or it will push the safe limits of the PCB!

The AC is voltage doubled to produce about 540Vdc across C10/11. Since the voltage is shared, these capacitors can be 400V rated. To allow for a practical charging time, the maximum test voltage is defined as 500V (actually 450V in my setup).

In addition to this, the AC supply is capacitor-coupled by C12/13 to a bridge rectifier which produces the negative voltage for the bias supplies. This rail is clamped to -66V with a pair of 33V Zener diodes. R23 and the coupling capacitors limit the available current to a few milliamps, which is a sort of built-in safety feature.

Arduino and High Voltage Storage Capacitors

This schematic shows the Arduino and HT storage capacitors C2-5 and C10-13. These two capacitor banks are where the energy is stored before being quickly applied to the DUT. The capacitors are arranged in series/parallel so the voltage is shared, so 400V-rated capacitors can be used. If you know your capacitor maths you will see that each bank represents 100uF total storage. It takes much less than a millisecond to apply the voltage to the DUT, so if the DUT takes the full rated 500mA then the applied voltage will sag by less than V = It/C = 500mA*1ms/100uF = 5V. The Arduino records the actual voltage being applied, at the same time as recording the current.

High Voltage Supplies


There are two identical high-voltage supplies, each one containing three MOSFETs that are under the control of the Arduino. I used used IPU80R2K4P7 MOSFETs but any suitably high-voltage MOSFET should work. I have called these MOSFETs 'charge', 'discharge', and 'fire', so you can probably guess what they do. These MOSFETs act as switches, being either fully off or fully on at any time; only one MOSFET is on at any given time (per high voltage supply). Opto-isolators are used to bridge the divide between the wimpy low-voltage digital world and the high-voltage manly world. The opto-isolators are another 'specialist' components needed for this project; they're not widely stocked but they're not too expensive. They are called Photo-Voltaic Drivers (PVDs). Turning on the LED inside the device causes it to shine light onto some other LEDs which then produce a voltage across themselves. This voltage is connected between the gate and source of the MOSFET, turning it on or off as required. R23 & R46 are included to give the option of using a BJT instead of a MOSFET for discharging, as this eliminates two optoisolators. I used BUL216 transistors, since that's what I had.

Looking at the top schematic, the 'charge' MOSFET Q1 allows the storage capacitance to be charged up to the required voltage ready for the next measurement. R12 limits the charging current to a safe level to avoid blowing anything up. D7 prevents unwanted discharge back through the MOSFET body diode. The potential divider comprising R7-11 provides the scaled-down voltage which is monitored by the Arduino. Several resistors are used to improve precision and to share the voltage burden, so ordinary 1% 1/4W resistors can be used.

The 'discharge' MOSFET Q2 allows the storage capacitance to be drained again. R13 limits the discharging current to a safe level. The other high-voltage supply works exactly the same; the Arduino controls both.

Once the voltages are ready, the 'fire' MOSFET Q3 is turned on, which connects the storage capacitance across the DUT. Anode current now flows in the DUT from the storage capacitance in a loop, through the current-sense resistance R2-6 which is on the negative side of the capacitance. This is called 'low-side' sensing. This is illustrated by the simplified diagram on the right. Again, several resistors are used for precision and power sharing so 1% 1/4W resistors can be used. The sense resistance is split into two parts to give me decent resolution at both high-level and low-level currents, since I need to test small bottles and big bottles alike. Diodes D1-3 allow currents greater than about 60mA to bypass the upper part of the divider to avoid burning out these resistors. During a measurement, the capacitance is discharging through the DUT, so current is flowing 'upwards' through the sense resistance. D4 allows the charging current to bypass the sense resistance since we don't care about current flowing in the 'downward' direction.

Since current flows 'upwards' during a measurement, the voltage produced across the sense resistance is negative. This voltage is therefore inverted (and amplified by x2) by opamps before reaching the Arduino. The PCB includes footprints for both through-hole and SMD packages. These are the last 'specialist' components needed for the project, since we need rail-to-rail opamps that can swing their outputs all the way down to ground. Not all rail-to-rail opamps can do this! The LM6132 can swing to within about 10mV of ground which is pretty good. This ultimately means anode currents smaller than [10mV / (2 * 33.3ohms)] = 150uV cannot be accurately measured, and I'm satisfied with that. In theory, the overall measurement range is 150uV to 60mA with 10-bit precision, i.e. 58uA, and then up to 615mA with 0.6mA precision. However, it's a good idea to distrust the hardware limits, so I'm quoting the practical range as 200uV to 50mA with 60uA precision, and then up to 500mA with 0.6mA precision. The Arduino measures both ranges and reports whichever is more accurate. If the measured current exceeds about 600mA, the Arduino stops that particular test and moves on. The theoretical anode voltage measurment range is 0V to 618V with 0.6V precision, but the hardware limit is really 500V with 0.6V precision.

The Code
I won't go through the code in detail. It's pretty basic, anyone who codes should be able to interpret it if they want to (download the Arduino sketch below). But very quickly, the Arduino keeps two arrays: target_values[ ] contains the target voltages requested by the user (the array contains slots for the currents too, but the user can't actually request current so they remain empty). measured_values[ ] contains the actual measured voltages and currents. The user requests the maximum voltages to sweep up to, and the size of the bias steps. The Arduino then divides the requested sweep voltage into sixteen datapoints using a logarithmic scale, to ensure good resolution at low anode voltages, which is essential for capturing the pentode 'knee'.

It then charges up the high-voltage capacitor banks. When both are properly charged it is time to 'fire' and apply the high voltages to the DUT. It records the actual applied voltages and resulting currents as fast as possible (less than a millisecond). Once it has done this it disconnects the high voltage, and prints the results to the Arduino IDE serial window. Then it steps the bias voltage to the interval, and repeats another high voltage sweep (it doesn't actually measure the true bias voltage, it just relies on hardware accuracy and assumes it is correct). The process repeats for the next data point, and so on, until it reaches the maximum requested voltage. When a complete measurement routine has finished and all data reported, it waits for you to tell it to run again or input new paramaters. Therefore, unlike an oscilliscope-based tracer, the DUT is not being continuously stressed. Indeed, no heatsinks are needed anywhere in this project.

Using the Analyser
The PCB includes an octal socket that is pre-wired for testing 6V6s, EL34s, 6L6s etc. For testing other valves, a separate PCB carries three valve sockets: B7G, B9A and octal, with all the pins wired in parallel (all pin-1's connected together, all pin-2's connected together etc). There is a small inductor in series with each pin to discourage oscillation. I use banana cables to connect the relevant socket pins to the relevant voltages on the tracer PCB.

To run a test I open the Arduino IDE and open the Serial Monitor window. This resets the Arduino, and it will print a series of statements to the monitor. You type in all the test parameters you want, then it asks if you want to run the test. During the test all the results are printed to the monitor as a comma-delimited table. I can then cut-and-paste the table into notepad, then import that into Excel to plot the curves. I currently have an Excel template set up for this (See below). It would be cool to have a custom app like John Polstra built, where I can set up the test and have the graph plot automatically. Unfortunately I am not much of a coder and I don't know how to do that, so I have to do it the long way. (If anyone wants to collaborate to build an app, do get in touch!)

Here are some example curves I made on the analyser.

Downloads
Gerber files. 2024: I currently have some spare PCBs for sale!
Full schematic
Bill of Materials
Excel spreadsheet
Arduino sketch

ISS.1 PCB Modification
I have found that the PCB ground needs to be connected to mains earth, otherwise leakage through the transformer can cause the Arduino to stop serial communication. The easiest way to do this is to add a piece of wire from D16 to the mounting screw as shown in this photo (assuming you're using an earthed metal chassis). For the ISS.2 PCB Gerbers I have connected the plane to the screw, so no modification is required.