• The move to the new server is done. There are some software and database maintenance updates in process. This has us passing the hat around to help out. We appreciate any donations. Seriously, even a dollar helps. The payment page may be found here - https://www.audiokarma.org/support.html

Brave New World – Using A.I. in Tube Circuit Design (another look at the Z-PH10 phono pre)

BuzzK

AK Member
Subscriber
I'm a writer by schooling and trade (among other things). I have mixed feelings about the use of A.I., or artificial intelligence.

For example, if you're writing a prose essay, IMO using A.I. to draft it out of whole cloth is a form of electronic plagiarism. OTOH, if you use Microsoft's CoPilot™ for checking things you've already written (e.g. to propose alternate construction), that's a bona fide use of the tool because you may learn something and you don't have to keep the recommendations.

A.I. can do some incredible things with electronic design, and write supporting documents (like user and assembly manuals) in great detail. However, it's not foolproof: the tools can "hallucinate" and generate huge mistakes. It can also be totally wrong. You have to know enough to be able to discern when you're being helped vs. when you're being fooled. And then test the finished design just to be sure.

I tried several experiments with Claude™, a technically proficient A.I. tool.

A few years ago I built and installed one of Erhard Audio's Z-PH10 Phono Stages. I read later that there were some issues with the design, which led to their development of the subsequent Z-PH20. Among the issues claimed was an inaccurate RIAA curve fit. So I asked Claude to have a look at the RIAA compensation network in particular. Here are some bits that I received in reply to my question, "Can you examine the components for the RIAA network for the PH-10 and recommend corrections for better conformance to the RIAA standard?"

(Note that Claude refers to itself as "I")


* * *


I traced the actual signal path (not just individual RC products) and found the network is smarter than it first looks — it splits RIAA duty across two separate sub-networks, one between the gain stages and one after the second tube. Here's what I found and what to change.
How the RIAA network actually works
Interstage network (V1 plate → V2 grid): R4 (137k) in series, with R8+C6 (21k + 0.015µF) shunting one node to ground, C3 (0.22µF) in series, and R9 (1M) shunting the final node to ground before the R10 grid stopper. This section does almost all of the bass boost shaping.
Output network (V2 plate → OUT): R12 (60.4k) in series, with R13+C4 (1.58k + 2000pF) shunting to ground before the C5 output cap. This forms a simple shelf that does the treble cut.
Running the actual transfer function against the true RIAA curve (τ1=3180µs, τ2=318µs, τ3=75µs), two things stood out:


Component pair
What it sets
Verdict
R8 (21k) × C6 (0.015µF) = 315µs≈ τ2 (318µs, 500Hz)Spot on — no change needed
Output shelf pole = 1/[2π(R12+R13)C4]should hit τ3 (2122Hz)Sitting at ~1284Hz — too low
R9 (1M)deep-bass shelf terminationToo low a value — chokes off bass boost below ~100Hz
The output-stage error is the bigger one: because the treble corner is set almost an octave too low, the circuit over-cuts high frequencies by up to ~2.9 dB around 7–10kHz. The R9 value simultaneously leaves deep bass 1–4 dB short of correct boost at 20-50Hz.
Recommended corrections

Part
Current
Recommended
Why
R1260.4kΩ36kΩ (standard E24)Moves the treble shelf pole from ~1284Hz to ~2122Hz, matching τ3
R91MΩ2.2MΩ(standard)Still a perfectly normal grid-leak value for a 12AY7, but lets the bass shelf develop properly
R4137kΩ200kΩ (or 180kΩ)Fine-trims the bass-boost knee to compensate for the R9 change
R8, C6, C3, R13, C4as-isunchangedAlready correct / not worth touching
With just these three changes, modeled conformance improves from ±3 dB (worst case, mostly treble and deep bass) to within ±0.6 dB across the entire 20Hz–20kHz band, with most of the audio range under ±0.15 dB. This holds up whether I assume the 12AY7's plate resistance is 8k or 35k, so it's not sensitive to tube-to-tube variation.
Before vs. after (relative to 1kHz, dB error vs ideal RIAA):

Freq
Original error
Corrected error
20 Hz−1.4 dB+0.2 dB
50 Hz−0.5 dB+0.1 dB
500 Hz+0.8 dB+0.03 dB
2122 Hz−1.5 dB−0.01 dB
5 kHz−2.7 dB+0.01 dB
10 kHz−2.9 dB+0.14 dB
20 kHz−2.5 dB+0.6 dB

Caveats

  • I derived the source impedance at V1's plate using an assumed 12AY7 rp (~15kΩ); the fix is robust to a wide range of that assumption, but the exact optimum R4 could shift a few kΩ with real measured tube parameters.
  • These are calculated values from the schematic topology, not a bench measurement. Since R9 is also doing double duty as V2's DC grid-return resistor, going to 2.2MΩ is well within normal practice for a 12AY7 but worth confirming grid current/bias stability after the change.
  • If you can run an actual sweep (test record, or injecting a signal at V1's plate and measuring at OUT), that'll immediately confirm whether real component tolerances (especially the electrolytic-adjacent caps) need further trimming — RIAA networks are usually worth measuring once built rather than trusting nominal part values alone.

* * *

Pretty cool, eh? I replaced the three pairs of resistors and am listening to the pre now. I don't have a way to confirm the data by test (which would require a reverse-RIAA network). Sounds good though!
 
Last edited:
Register to hide this ad
would be interesting to feed it a known circuit with known corrections and measurements to see if it comes up to the same or at least similar conclusions.

Have only poked at the Google one, but I asked it to draw up a schematic for me. The first gave me values that just made no sense when I actually plotted it out manually. Tried again and it spit out something that was completely unworkable. I didn't bother checking values, the connections were simply incorrect. Maybe others are better, dunno, but I'm squarely in the "verify all results" camp at this point.
 
would be interesting to feed it a known circuit with known corrections and measurements to see if it comes up to the same or at least similar conclusions.

Have only poked at the Google one, but I asked it to draw up a schematic for me. The first gave me values that just made no sense when I actually plotted it out manually. Tried again and it spit out something that was completely unworkable. I didn't bother checking values, the connections were simply incorrect. Maybe others are better, dunno, but I'm squarely in the "verify all results" camp at this point.
Definite caveats using this stuff. However, it's harder to argue when Claude spits out the equations to "justify" the component selections.

I don't have time to do this at the moment, but I agree with your experiment. If I was to do this, I'd run the Dynaco PAS phono circuit in Claude, and ask it to spit out the frequency response predictions. Then compare it to George R's excellent, comprehensive findings: https://www.audioregenesis.com/documents/dynaco-pas-phono-stage-analysis.pdf
 
BuzzK, very interesting post. I read it several times and it left me with mixed feelings. I am not a writer by trade (drove freight trains most of my life), but I'll take a stab at explaining this. I built a tube preamp in the 1970's from a hand drawn schematic I found. Never did like the way it sounded. But I tried changing components in the tone control and RIAA circuits to improve it. Each time I changed the value of a cap or resistor, I learned a bit about what it seemed to do. My opinion, but if all values are provided for you, what do you learn? I was at a car show yesterday. Many beautiful restored cars. Then I starting looking at the street rods. To restore a car, you search out the factory part, and install it. This comment is not meant to minimize the task of restoration. But the factory engineers ( similar to AI?) did the work of selecting what would work best. When I looked at the street rods, these guys knew how to plan, fabricate, make it work, and install what they made. I believe their skill level was beyond what it takes to restore. When AI makes all your decisions, are we losing something? If I build something (Car or Amp), I want to know how it works. Using AI does not necessarily teach you that. Somehow, I wonder if we are losing something. Paul.
 
BuzzK, very interesting post. I read it several times and it left me with mixed feelings. I am not a writer by trade (drove freight trains most of my life), but I'll take a stab at explaining this. I built a tube preamp in the 1970's from a hand drawn schematic I found. Never did like the way it sounded. But I tried changing components in the tone control and RIAA circuits to improve it. Each time I changed the value of a cap or resistor, I learned a bit about what it seemed to do. My opinion, but if all values are provided for you, what do you learn? I was at a car show yesterday. Many beautiful restored cars. Then I starting looking at the street rods. To restore a car, you search out the factory part, and install it. This comment is not meant to minimize the task of restoration. But the factory engineers ( similar to AI?) did the work of selecting what would work best. When I looked at the street rods, these guys knew how to plan, fabricate, make it work, and install what they made. I believe their skill level was beyond what it takes to restore. When AI makes all your decisions, are we losing something? If I build something (Car or Amp), I want to know how it works. Using AI does not necessarily teach you that. Somehow, I wonder if we are losing something. Paul.
I think there is another way to look at this. Yes, if you simply, blindly implement what AI did than the learning part is lost. But if you ask why, to yourself or to AI or to both, and take a minute to comprehend that than you gain the knowledge and (hopefully) a more finely tuned widget whether it be your audio gear, car or whatever.

My experience with Claude in designing stuff for 3d printing and similar kinds of processes has been remarkably informative and educational. And it's my vision that gets implemented, Claude kinda sucks at vision stuff, what it's good at is the GRIND underneath it.

I can now function reasonably well in python coding, my Onshape design skills have improved and my ability to look forward with my designs has also improved, etc. AI does grunt work that I'm frankly glad to not bother with. I use it to up my learning curve and do the repetitive stuff that isn't really learning anymore.

Ha, to be even-handed with all this. It can also SUCK and leaving it to work it all out without guidance is a trap easily fallen into. It's sycophantic, it has real trouble with anything resembling critical thinking, etc.
 
I agree with you. A.I. isn’t a substitute for technical training or bench experience — and you will need to be savvy enough to properly evaluate the results.

But if you’re like me — too dumb to learn the appropriate equations for figuring values within an RIAA compensation network, it can offer a shortcut to getting a job done.

A.I. presents a paradox: it can figure out a lot of stuff for us, but it also makes us dumber in the process. Scholarship is definitely suffering as a result. Other fields such as medicine can claim significant advances with the technology (I attended a lecture where A.I. was shown to evaluate tissue slides to diagnose breast cancer with greater accuracy than manual methods and left impressed).

As the ancient Greeks wrote on the temple to Apollo in Delphi, “nothing to excess.”
 
Last edited:
I think there is another way to look at this. Yes, if you simply, blindly implement what AI did than the learning part is lost. But if you ask why, to yourself or to AI or to both, and take a minute to comprehend that than you gain the knowledge and (hopefully) a more finely tuned widget whether it be your audio gear, car or whatever.

My experience with Claude in designing stuff for 3d printing and similar kinds of processes has been remarkably informative and educational. And it's my vision that gets implemented, Claude kinda sucks at vision stuff, what it's good at is the GRIND underneath it.

I can now function reasonably well in python coding, my Onshape design skills have improved and my ability to look forward with my designs has also improved, etc. AI does grunt work that I'm frankly glad to not bother with. I use it to up my learning curve and do the repetitive stuff that isn't really learning anymore.

Ha, to be even-handed with all this. It can also SUCK and leaving it to work it all out without guidance is a trap easily fallen into. It's sycophantic, it has real trouble with anything resembling critical thinking, etc.
100%. If I absorbed what Claude wrote (explaining various things like the frequency points) I’d definitely learn something useful.
 
Good comments 2ndserve. But I still wonder when something else does your thinking for you, how long will it be before we quit thinking for ourselves. In high school chemistry class, the teacher could just tell you what the results of a lab experiment would be. But that doesn't stick in your mind as much as doing the experiment yourself. So you were required to do it. Not saying right or wrong. We all want to improve our audio gear, and AI can probably help achieve that. Maybe I do too much thinking. Paul.
 
100%. If I absorbed what Claude wrote (explaining various things like the frequency points) I’d definitely learn something useful.
You likely would, but (and some of this is assumption) you already know enough about those types of circuits and tubes to know the basics of what is happening. There is a point where the learning is overall valuable and another where it is in the weeds to what you need to know.

In my case, designing stuff isn't my background but I learned a lot banging my head against the wall with CAD programs like Onshape and have gotten reasonably good at them. But I still have gaps. Offsetting stuff is a nice example. Having done it in Onshape but also finding their interface for doing so clunky I was glad to hand that over to Claude. And in so doing I see where offsetting x to y is useful in ways I wouldn't have before as the task of doing it had friction written into it. Yes, AI is doing stuff I'm not bothering to learn, but time goes fast and by letting it do that stuff, I'm free to learn new things of value.

And, again, I am far from an AI advocate overall, nor am I a Doomer. I'm concerned about it and how people use it for a bunch of reasons. It has the potential to do real harm, but shortening the task of figuring out better RIAA curves so someone can just listen to the next album and similar uses is NOT even in that same zip code.
 
Yes, I use it everyday now. But correcting it constantly and it doesn’t appear to learn from prior conversations. But it’s good enough to see how it will be in a couple years.

Looking forward to showing it a schematic and then having it recommend improvements. Namely on my Au-x1 flat amp board amongst others.

Giving the best possible replacement parts for those unobtanium transistors along with circuit mods to make them stable. Hoping it can learn not only from my interactions but all of them collectively. What, no more forum phlegm.
 
Seems the best place for the AI is to be a 'force multiplier'. I don't know how to Python code a script that can import my spreadsheet of points into CAD, but working with an AI, I had one in ten minutes. I was stuck for over a year on that step.
Heavy circuit analysis like you're doing here is really cool; it's both SPICE & a wizard-level operator. You have to be sharp enough to make sure the AI answer passes the Smell Test. After that, you're golden.
 
I once tried to get it to do a resistance to temperature calculation for a thermistor. There is a math function that takes 3 ohm to degree data points and from there it extrapolates the temperature to resistance curve, which can be used to figure out any other values. Fed it the numbers from the spec sheet, then asked it to give me a resistance for a given temperature. It spit out a number that was obviously wrong just from looking at the values I gave it. Ended up having it do a less-accurate curve using two data points and it spit out something that was at least sensible then. I was trying to work out a way of confirming coolant temperature on a car with no gauge. it does have a sensor for the glow plug timer though, and its easy enough to connect an ohm meter to it.
 
Yes, I use it everyday now. But correcting it constantly and it doesn’t appear to learn from prior conversations. But it’s good enough to see how it will be in a couple years.
I'm not sure what you are doing with it, but I had troubles with some of this myself at first. Some redundancy can be helpful. I do things like have another version look over the work at times. But the biggest thing I've had success with in it making errors is making the process a bit more collaborative and one bite at a time. It (Claude anyways) wants to think it can do this 7 step process error free and takes shortcuts along the way. I don't let it anymore. DO x, test, report, I briefly test, than do y.

And it's memory from prior conversations is poor and gets poorer the longer the conversation goes. Use readme's or similar it can review that hold the critical ideas you can have it review as memory drifts.
 
I once tried to get it to do a resistance to temperature calculation for a thermistor. There is a math function that takes 3 ohm to degree data points and from there it extrapolates the temperature to resistance curve, which can be used to figure out any other values. Fed it the numbers from the spec sheet, then asked it to give me a resistance for a given temperature. It spit out a number that was obviously wrong just from looking at the values I gave it. Ended up having it do a less-accurate curve using two data points and it spit out something that was at least sensible then. I was trying to work out a way of confirming coolant temperature on a car with no gauge. it does have a sensor for the glow plug timer though, and its easy enough to connect an ohm meter to it.
Standard models can not do math at all. They can't even add 1+1 on their own. They are basically consensus machines so for most math they simply know it by reading it over and over in training. The do have a "calculator" in their sandbox of tools. Maybe this problem was beyond that too, but if it's something genuinely unique math wise, you can tell it to use the tool rather than consensus data.

The consensus machine reality makes them often great for stuff like the original post. It's technical enough the 'idiots' get weeded out but RIAA curves are common enough there is tons written about them and the consensus is solid.
 
I’m probably remiss for not telling the whole story, but I started out by asking Claude to note the differences between the Z-PH10 and the 20 phono stages. It couldn’t locate the Erhard 10 and instead mention one by a different company, so I had to tell it was wrong and then I fed it the Z-PH10 schematic.
 
Last edited:
Standard models can not do math at all. They can't even add 1+1 on their own. They are basically consensus machines so for most math they simply know it by reading it over and over in training. The do have a "calculator" in their sandbox of tools. Maybe this problem was beyond that too, but if it's something genuinely unique math wise, you can tell it to use the tool rather than consensus data.
Silly me, thinking a computer could be used to compute something.
 
i’m probably remiss for not telling the whole story, but I started out by asking Claude to note the differences between the Z-PH10 and the 20 phono stages. It couldn’t locate the Erhard 10 and instead mention one by a different company, so I had to tell it was wrong and then I fed it the Z-PH10 schematic.
It would be intresting to see what it says about the the PH-20 circuit since I have that one back on my bench. The new socksts with the shield lock bases finely arrived. The wrong ones were shipped the first time around. I have the schematic.
 
Back
Top Bottom