Javier Albinarrate - LU8AJA

  • Increase font size
  • Default font size
  • Decrease font size

PIC Tube Curve Tracer


This article is in process of being written as I advance in the project... The current status of this project is:

I am in the design stage, I have chosen the ICs, but I need to GET them before continuing.

This year I got this crazy idea of building a PIC based (USB) Tube Curve Tracer, I wonder how that happened. After googling I found that a similar product existed, but it was way out expensive. After googling a little bit more I found that there was another similar project, with really good capabilities, and diagrams provided to the public, the MCUTracer. So my thoughts were to take those ideas a step further.
Here I basically approach all the component blocks involved.

The overall design
Here you can see a block diagram that shows the whole project.


The microcontroller chosen was the PIC18F4550, because it has USB with simple CDC (COM emulator) drivers, plenty of peripherals, I2C, ADC with MUX, it is self-programmable, etc.

Unregulated Power Supply
This might be a problem, because we need to have several completely different voltages with completely different current specs.
I would seriously consider to have a custom transformer wound for this, with all the needed secondaries.
Another option would be to design a SPS that could provide these voltages and currents, without caring about regulation (we'll use serial regulators).
Yet another option would be to use a standard low voltage transformer for the 5 and 15 volts, and a 2 standard 220V-110V arranged back to back in such a way that you can provide galvanic isolation and one 220V secondary and one 110V secondary. This should work, but you must make sure that at least one of the is NOT an autotransformer. These transformers are readily available if you live in a 220V country.
Whatever you do, you have to provide 300 to 400V unregulated DC for the Plate, and -100V unregulated DC for the grid.
You'll need 15V DC to cover the most common filament voltages (1.5, 4, 5, 6.3, 12.6 volts), and if you wish to cover bigger filament voltages, like for 20, 25, 35, 50 volts, then you would need something like 60V unregulated as well, easily switching this with a relay.
You'll obviously also need 5V for MCU and the tracer itself.

Regulated Power Supply for B+ and C-
Excellent series regulator for these supplies are the ones described in the MCUTracer project. You just control them with a DC voltage which is amplified and applied to a IRFPG40 or a IRFP9240 accordingly. If you cannot get those transistors, then you can easily replace them with more standard ones like IRF840 and similar, taking into consideration the maximum voltage supported by your device.

Regulated Power Supply for Filaments
This can be accomplished by a standard LM317, just look at its datasheet and surely you'll find how to drive it from a DAC. Another option is a similar regulator, TL783 with 125Vin and 750mA, you could easily use that one too provided you don't exceed the current and power specs.
As almost always you'll be using less than 15V filaments, it has sense to use such voltage, and have a higher one optionally connected by a relay.

DACs for Supplies
You can have whatever DAC you wish, just keep in mind that you'll need at least 3 outputs, you have to easily control them, and you need the best resolution you can have. Speed of conversion is not critical at all. The best one I found for my project was from TI the DAC8574, with 4 DACs, 16 bits, controlled by I2C. But you have a whole world of DACs to choose from.

Voltage Measurements
The critical spec here is the ADC's resolution. As you'll need to have a variety of voltages, resolution is critical for both voltage and current measurement, I would not use anything less than 16bits. Particularly, the ADCs from the PIC are extremely unsuitable, because besides their low resolution, they have a low impedance something which forces you to buffer every single input. So you'll need an external ADC and multiplexor, ideally I2C capable, so you can have a single bus for all your peripherals.
From TI, ADS1110, ADS1112 and ADS1226 are suitable options.
You'll need a multiplexer, so you can measure all your inputs, basically you have 3 inputs from the regulators, 1 input from the filament shunt amplifier, and 9 inputs from the tube pins. Obviously you'll need high resistance voltage dividers, and probably even op amp buffers for every single input, so read your ICs specs.
A 16:1 multiplexer MPC506 will do the trick with a low leakage current (about 2nA) and simply controlled with 4 address lines from the MCU.

Another two very interesting alternatives would be:

  • ADS1258 with 16 channels, 24bit ADC, and SPI interface (sorry no I2C) with temperature, VCC, Gain etc readback (wow!) and a 8bit GPIO port expander included (WOW!!) 
  • ADS1278 which is very interesting because it features 8 channels (differential inputs) 24 bit ADC, with simultaneous conversion!! various output modes including 8 bit parallel output to receive all channels at once, but you'll need two ICs to handle all the 16 channels.

If you choose a non I2C then you must remember that if you are already using I2C for the DAC and Port expander, then, you cannot use the PIC SPI features, as they share pins. So you would have to implement the SPI in software. This makes the ADS1278 an easier option because you don't have to deal with registers, etc On the other hand the only disadvantage of the ADS1258 (besides not being I2C) would be that it is not simultaneous conversion.

As you see you have plenty options to choose from, my best guess is that I'll end up using the ADS1258, it gets the firmware more complicated but simplifies my hardware a lot.

Filament Current Measurement
The filament current is usually quite high and as the filament regulator uses a simple LM317 then the voltage is regulated to the high side of the shunt resistor instead of the low side (like in the C- and B+ supplies), so you cannot simply add a high resistor and measure its voltages. Instead you have to rely on a very low resistance, and a shunt amplifier made specifically for such application. In practice you simply drop a INA208, that will be able to measure current from the high side in an up to 80V voltage. More than enough for a filament. The INA208 will give you a low voltage equivalent to the voltage drop on the shunt resistor, thus equivalent to the current through the filament.

Grid and Plate Current Measurement
With a 16 bit DAC and a maximum of 400V on the plate, then you can measure with a resolution of 6mV, so in theory with a 10K load, you should be able to measure 0.6uA. Anyway by having the ADCs calibrated and simply measuring both sides of the R load, you can figure out the current pretty well, without the need of op amps, or shunt amps.

Reed Switch Matrix
This is a curious block. Most tube testers have switches or levers or even cord patches to take the voltages to the correct pins for the tube. But I thought... I have control from the MCU for every aspect of the tracer except for this one... let's better figure out something. One crazy option was to have a 9 universal voltage regulators all from -100V to 400V all capable of maximum current (yeah, crazy idea) so I could choose whatever voltage I wanted for each pin. After thinking of doing so for about 1 usec I better though of an array of relays or even solid state switches. After taking into consideration all the possibilities, their co$t, advantages, co$$t, disadvatnages and co$$$t, I then sttled for reed relays. A 9 x 5 matrix, would allow me to connect any of the 5 input voltages to any of the 9 tube pins. After reading about reed relays specs, I found that most of the switching problems of the reed relay are related to the ionization when trying to open the switch. But I could easily control so that the path is executed at the array with all voltages turned off, and once the paths were established I could turn on the supplies. Also the breakdown voltage can be doubled by just using two switches within a single coil. So that solved every single problem. Another point in favor of the reed switches is that the switches themselves, without the coil, are sold for a very low price. So if you want to have a really low cost solution, you just have to wind them yourself! I tested with a very thin wire and 500 turns was easily achievable in the switch perimeter. Assuming a fail safe 20AT (amperes x turn, in theory 15 should be enough) to make the connection, with a 33 mA current you need 600 turns.

However, driving the relays, means that you need one individual ouput for each single relay, in other words, 45 of them! But a simple solution already exists. The TCA6424 a 24-Bit I2C Port Expander. And you can have 2 of them in parallel thanks to their address bit pin. That provides easily 48 outputs with only 2 lines at the MCU. It is capable of 50mA on each low pin, and 250mA in total which is perfect for driving the matrix were at most 4 or 5 coils are turned on at a time driven by a single port expander (2 port expanders are needed to drive the 45 switches required for all the 9 pins). One little odd thing is that to be able to obtain the maximum current from the port expander, you have to turn on the reed relay by pulling the port down (negative logic) as the low max current is higher than the high max current.

The whole block can be built on a single PCB, with 5 voltage inputs, 9 voltage outputs, 2 I2C bus lines, power and gnd.
Of course, this block would be the last one to build, as you can test everything with cord patches, and is just a fancy solution.


Last Updated on Thursday, 12 November 2009 11:56  

Google Translate

English French German Italian Portuguese Spanish