• WARNING: Tube/Valve amplifiers use potentially LETHAL HIGH VOLTAGES.
    Building, troubleshooting and testing of these amplifiers should only be
    performed by someone who is thoroughly familiar with
    the safety precautions around high voltages.

Help needed: interfacing uProcessor with tube amp

I'm in the planning stage to make a microprocessor monitor (and
possibly bias controller) for a tube amp. I have a good understanding
of tube amps, microprocessors, and code, but solid state electronics
is a gap in my knowledge. I'll probably use a Teensy, because they're
cheap, easy, and there's lots of easy to work with peripherals (it is
arduino compatible).

For the first iteration, very simple, I would only be monitoring the
bias at the output tube cathodes. The amp would be shut off via a
relay if the bias current on any tube went too high or too low.
Second iteration, I might want to detect the presence of a music
signal, shutting the amp off if idling too long (e.g. an hour or so).
The third iteration, if I go that far, would be controlling the bias.

So the part I don't know much about, is what are the considerations
for interfacing the processor with the amp? First, the ADC input will
need to be protected from overvoltage. I'm not sure simple Zener
clamping will be sufficient. Is there some sort of failsafe chip
available that will limit a voltage to 3.0V or so (assuming 3.3V
processor supply).

Second, I'll want to filter noise in both directions. For a current
sense resistor on a cathode, maybe some sort of buffer device,
followed by a pi filter. For bias checking, the low pass could be
below 20hz, but for detection of signal it would need to be higher.
Some of the low pass filtering of the detected bias current could be
in code rather than hardware.

For bias control, I think a digipot would be suitable, noise filtering
would be the only issue.

The processor would of course be in a shielded metal box, and might
also be external to the amplifier.

Thanks in advance for your thoughts.
 
I admire you for your idea, and for your drive and energy to build such an amplifier.

There is at least one thread about doing what you want to do, on Tubes / Valves in this diyAudio Forum.

As an alternative, I am of the opinion that it is possible to design and build a very robust and reliable tube amplifier that does not use a microprocessor.

Using a microprocessor, consider things like boot up time; delayed amplifier voltages; etc.;
and especially both Power Mains Transients; and Hot-Starts (power goes off momentarily with hot tube filaments, and then comes on again relatively quickly before the filaments cool).

"You should make things as simple as possible, but no simpler" - Albert Einstein

Ask a missile designer about parts count and reliability.
 
Last edited:
What is possible and what is desired are two entirely different things. It is possible to amplify sound using ancient vacuum tubes but it is much simpler, cheaper and reliable to use semiconductors. Yet we still build lots of valve amplifiers.

Most of us do this because it is fun and we enjoy learning new techniques and skills. Adding a microprocessor to monitor and perhaps control bias and avoid dangerous conditions seems to me to be a reasonable project to undertake.

To answer the specific questions, I know of no special chip that will provide the protection you seek for the micro inputs. You will most likely need to add this yourself. A 3V zener by itself is unlikely to be sufficient. However, four signal diodes in series will limit inputs to 2.8V. To this I would recommend you add a current limiting resistor which can also form one leg of a low pass filter. Since your sampling rate is likely to be much high that the rate of change of the input even under fault conditions you could apply additional smoothing in software.

Cheers

Ian
 
I have been tinkering with microprocessor controlled tube amp for years. My experiments using a Teensy are just getting started.

As we have seen here, the idea of sticking a "chip" in a tube amp is a controversial subject. I don't care, many people cried foul, and even called me Transistorlab when I used a mosfer follower to drive the grid of a DHT directly eliminating blocking distortion, bias shift, and allowing for A2 operation without grid current induced distortion. That happened over 15 years ago, and the TSE and nor TSE-II amp that resulted is still quite popular.

So why do I want to stick a "chip" in a tube amp.....first I need to answer the "why do you want to build a 1 killowatt (500 WPC) tube amp." I don't NEED either, but the answer to both is, because I can. I already have the parts, the knowledge, and the curiosity, so why not?

The output tubes that will be used in the big amp are RATED for 1.4 AMPS of peak cathode current. They are are capable of passing several amps if something goes wrong. The plate supply is 625 volts and there will be 4 or 6 tubes per channel, pending more testing. Things can go very wrong very quickly in an amp of this magnitude, and a lot of expensive parts can be fried. A "watchdog" of some sort is a real good idea, especially when the finished amp will be hiding in a rack mostly out of sight.

I have been sticking microprocessors in things ever since I got my first MC6800 chip in 1976. For me this is the easy part, so I am not starting on the controller until I have at least one channel of the amp breadboarded and operational. At this point I have narrowed things down to one of two very different output stage topologies.

My controller of choice today is one of the Teensy's. I have made several music synthesizers with them. Exactly which one is yet to be determined.

Any of the 32 bit Teensy's should have enough CPU power for this job. The T3.2 and T3.5 have 5 volt tolerant inputs for better noise immunity when scaling high voltage inputs. The T3.6 is 3.3 volt only. All of the T3's have 16 bit ADC's with 13 of usability. The T4.0 and T4.1 have far more CPU power, so they have found their way into my music synthesizer stuff, but their ADC's are only 10 bits which may be OK in some applications.

Before the Teensys existed I built the amp that was, and still is, too far ahead of it's time. It used a Microchip dsPIC to watch over the amp's operation, and provide an agile modulated B+ supply for the SE output tubes in a manner similar to a class H solid state amp. This was derived from work done researching high efficiency RF power amps for use in cellular base stations where electricity bills add up to millions of dollars per month.

This was done for a Microchip design contest in Circuit Cellar magazine where it won a prize and got published. The article is included here.

Monitoring the output tube current is done with a small resistor in the cathode circuit. This is followed by a resistive divider with a cap and diode across the lower resistor for LPF and clamping. Today I would replace the single diode with a reverse biased Schottky diode to ground and another to the Teensy's 3.3V VDD.

I used an active opamp circuit to generate a programmable bias voltage from a fixed -150 volt supply. E-pots for voltages above 15 volts or so didn't exist then, and may not now, I haven't looked in years.
 

Attachments

  • Like
Reactions: longspeak
First, the ADC input will
need to be protected from overvoltage. I'm not sure simple Zener
clamping will be sufficient.
Actually no, it wouldn't be very good at all - low voltage Zener's have very soft cutoff and to protect against exceeding 3.6V in you'd need something like a 2.5V Zener or lower, and most importantly it would do nothing at all if the microcontroller happened to be powered down...

The best way to protect CMOS logic signals is with a series resistor and two Schottky diodes to the rails, preventing them from straying outside the rails by more than about 0.3V whether powered up or not. Dual surface mount Schottkys like the BAT54S are used in the billions for this purpose, if you're happy with surface mount.

If you have a voltage divider already, it can act as the series resistance for free.

If you want high impedance voltage divider, add a ~10nF cap to ground as part of the divider to present a low impedance to the ADC (otherwise it'll be less accurate). This will affect the bandwidth (which might be good - if noise is an issue, or bad if you have to react fast).

If you want to sense negative voltages you can use an inverted divider to Vdd of the microcontroller, no need for opamps.

with voltage dividers from very high voltage parts of the circuit its wise to check the voltage rating of your resistors and use series strings of resistors where necessary.


Tubelab_com:
E-pots for voltages above 15 volts or so didn't exist then, and may not now
You mean digipot? Yes, you won't ever find CMOS chips above 18V to my knowledge. But for generating voltages digitally you use a DAC, not a pot (its a common mistake I see, people thinking you need a digital pot to generate an adjustable voltage because the equivalent analog circuit uses a pot!!) Digipots are used for controlling an analog signal without having to digitize it.

There are some nice little (multichannel) DACs with internal persistent storage that you can use as programmable voltage sources - they remember their state across power down so they are all setup before the microcontroller has initialized.
 
Last edited:
I admire you for your idea, and for your drive and energy to build such an amplifier.

There is at least one thread about doing what you want to do, on Tubes / Valves in this diyAudio Forum.

As an alternative, I am of the opinion that it is possible to design and build a very robust and reliable tube amplifier that does not use a microprocessor.

Using a microprocessor, consider things like boot up time; delayed amplifier voltages; etc.;
and especially both Power Mains Transients; and Hot-Starts (power goes off momentarily with hot tube filaments, and then comes on again relatively quickly before the filaments cool).

Thanks, although I consider the first iteration a "simple, lazy" voltage monitor, for an existing amp. Something simple like, A) warning LED if any tube wanders 5% off current, warn if pair current mismatch by 2%, shut down if any tube 20% off current.


I've probably seen the existing thread in previous searches, but I don't remember finding definitive solutions to the interfacing problems. I'm hoping power up conditions can be dealt with simply by relaxing the monitoring rules for the first 30 seconds or so.


I suppose runaway tube protection could be added with analog electronics/discrete logic, but I have basically zero experience with that, and if I want to add features it will get complicated quick.
 
To answer the specific questions, I know of no special chip that will provide the protection you seek for the micro inputs. You will most likely need to add this yourself. A 3V zener by itself is unlikely to be sufficient. However, four signal diodes in series will limit inputs to 2.8V. To this I would recommend you add a current limiting resistor which can also form one leg of a low pass filter. Since your sampling rate is likely to be much high that the rate of change of the input even under fault conditions you could apply additional smoothing in software.


Thanks, Ian. Yeah, tube amps are definitely in the category of "we do them because we want to", but I also like the way they sound. I'm still kicking around what the sampling rate might be, It could be at a frequency below the audio range, if I don't want to detect an audio signal. I'm not really sure how fast a tube can red plate, but the few times I've seen it happen it appears fairly instant.
 
jgf,

Tubelab_com, and a few other experienced posters on diyAudio are able to perform all kinds of miracle experiments, and get them to work.
And, for the most part, they can do it on their own.

Consider a low pass filter to detect bias shifts, and current shifts.
Some "Audio signals" are lower than some Hi Fi systems can properly playback accurately.
When it comes to low frequency signals in a music playback system, I think of 3 things:

1. 32 foot pipe organ recordings, long sustained very low frequencies.
2. The 6 Hz canon frequency on the definitive recording of the '1812 Overture' by Telarc.
3. The 3 Hz signal from a warped LP record.

Which of 1. and 2. do you eant to reproduce?

Of course, 3. should already have been filtered out, before it reaches the power amplifier.
 
My controller of choice today is one of the Teensy's. I have made several music synthesizers with them. Exactly which one is yet to be determined.

Any of the 32 bit Teensy's should have enough CPU power for this job. The T3.2 and T3.5 have 5 volt tolerant inputs for better noise immunity when scaling high voltage inputs. The T3.6 is 3.3 volt only. All of the T3's have 16 bit ADC's with 13 of usability. The T4.0 and T4.1 have far more CPU power, so they have found their way into my music synthesizer stuff, but their ADC's are only 10 bits which may be OK in some applications.


I've seen your posts on the Teensys. That was a bonus point in their favor that they are useful for synthesizers. The cheapness and documentation quality also good points. I have a Teensy LC now (the most basic) but if I need better ADC resolution or 5V capability I'll upgrade. So far I've just done some very basic programming with it. At first I was skeptical of the entire Arduino ecosystem because of the "sketch" programming, but it turns out it is real C++, with an extra preprocessing step.



This was done for a Microchip design contest in Circuit Cellar magazine where it won a prize and got published. The article is included here.

Monitoring the output tube current is done with a small resistor in the cathode circuit. This is followed by a resistive divider with a cap and diode across the lower resistor for LPF and clamping. Today I would replace the single diode with a reverse biased Schottky diode to ground and another to the Teensy's 3.3V VDD.


I've seen that article, I'm definitely not going that complex! Useful info there for current monitoring, thank you.
 
You might want to look at the UTracer schematic. It does measure safely current with HV supply and that could give you ideas on the tube electronic interface with your microprocessor hardware.
I believe McIntosh does this in their latest MC275 line.
 
The best way to protect CMOS logic signals is with a series resistor and two Schottky diodes to the rails, preventing them from straying outside the rails by more than about 0.3V whether powered up or not. Dual surface mount Schottkys like the BAT54S are used in the billions for this purpose, if you're happy with surface mount.
Sounds good, I'll give that a try. I'm not thrilled with surface mount, but if they're not little grains of sand, I can deal with it.

If you want high impedance voltage divider, add a ~10nF cap to ground as part of the divider to present a low impedance to the ADC (otherwise it'll be less accurate). This will affect the bandwidth (which might be good - if noise is an issue, or bad if you have to react fast).
The cap to ground will be a good idea, bandwidth is not important here.
 
1. 32 foot pipe organ recordings, long sustained very low frequencies.
2. The 6 Hz canon frequency on the definitive recording of the '1812 Overture' by Telarc.
3. The 3 Hz signal from a warped LP record.

Which of 1. and 2. do you eant to reproduce?

Of course, 3. should already have been filtered out, before it reaches the power amplifier.
With 1st order passive filters at the input of the phono preamp, line amp, and power amp, and also at the output of the phono preamp and line amp, all of which are in the 0.1 to 3 hz range or so, I may need to consider record warps. But, hint taken on experimentation: I think my next step will be to build up a basic Teensy setup reading just bias voltages with the filtering and schottky protection recommended, and collect some data from it.
 
The best way to protect CMOS logic signals is with a series resistor and two Schottky diodes to the rails, preventing them from straying outside the rails by more than about 0.3V whether powered up or not. Dual surface mount Schottkys like the BAT54S are used in the billions for this purpose, if you're happy with surface mount.


Tubelab_com:
You mean digipot? Yes, you won't ever find CMOS chips above 18V to my knowledge. But for generating voltages digitally you use a DAC, not a pot (its a common mistake I see, people thinking you need a digital pot to generate an adjustable voltage because the equivalent analog circuit uses a pot!!) Digipots are used for controlling an analog signal without having to digitize it.

The pair of Schottkys, one or two resistors, and a cap has become the standard input on nearly every modular synthesizer system built recently, since you have no control over what someone will plug into it.

E-pot, digipot, yes. Microchip has (or had) some rated for a single 36 volt supply, or +/- 18 volts. I don't know if they still exist. MCP41HVX1 (SPI) and MCP45HVX1 (I2C) are the part numbers. I used an opamp and DAC circuit running from a -150 volt supply. The Microchip DAC chip that I used powered up so that the bias was at the negative rail. After a suitable delay, the tube current is ramped up. A crafty programmer can measure the cathode current change during ramp up to test the Gm of the associated tube VS cathode current. Yes, an amp that tests its own tubes.
 
Something like this, I think, for the bias monitor circuit.
 

Attachments

  • circuit.JPG
    circuit.JPG
    427.4 KB · Views: 118
I would do something like that for the tube current sensing.

I will also have an input that passes audio into the A/D so I can tell when music is playing VS idle time. This could be used for bias readjustment during idle VS an active servo and it's issues with with low frequency audio signal. That input will probably be similar except for the RC values.

I want to measure all the power supply voltages before ramping up tube current, and actively when the amp is playing. There will also be voltage "test points" throughout the amp. These will likely use an external mux chip between the tube amp circuit and the Teensy since they don't need to be read as often. this also allows isolation between the HV and the Teensy in case something goes really wrong. I have been using 74LV4051 chips in my music synthesizers to read lots of pots with few Teensy pins. One synth called "Blue" for obvious reasons has 48 pots connected to 11 teensy pins.

I have used a little "high side current sense" chip in a trick circuit to measure screen grid current with a microprocessor. This is very important to monitor in a high powered amp using big TV sweep tubes, since this is the most reliable indicator of tube stress in any audio amp that may be driven near or into clipping. The Teensy will calculate the screen grid dissipation and take action of the AVERAGE dissipation approaches or exceeds the maximum spec.

I used the chip in a power supply design to provide current limiting. The same circuit can be used to measure current in a high voltage application. The voltage supply is represented by the 650 volt source. The load is to the right of the sense resistor (0.1 ohm in this application). A current proportional to the load current is forced through the 1K resistor, so the voltage across that resistor is proportional to the load current. I used a 10K resistor for isolation and protection in my circuit. I would add the clamp diodes when connecting this to a Teensy. The circuit is also on page 18 of the LTC6101 data sheet.
 

Attachments

  • CurrentSense.jpg
    CurrentSense.jpg
    167.4 KB · Views: 137
  • P3990353_x.jpg
    P3990353_x.jpg
    951.7 KB · Views: 125
Well, that synth is a fun looking gizmo for sure.


I didn't know about that kind of current sense chip, thanks for the tip. I was ignoring the elephant in the screens because I had no idea how to deal with it. Not as critical with EL34s I suppose.


I was hoping to be able to sense a music signal from the output cathodes. If that doesn't work, the output taps should be the least harmful point to get that.