I’m trying to create my first ngspice simulation, without success. I was successful in following the tutorial to create the ‘rcrc’ filter, but get errors such as “no frequency vector found” when I probe the ‘out’ net of my circuit.

I’m using KiCAD 7.0.11. I don’t know how to display the version of ngspice used. Here’s the full version information:

I upgraded from KiCAD 7 to 8.0.3 and now I’m having more success. I’m now able to plot the output responses of the LPF. However, I’m still not able to observe the information that I’m searching for.

Ultimately, I’m trying to model a LPF for the 40m radio amateur band, from 7.00 to 7.30MHz. I want to calculate the maximum current flow through the inductor L1 (to size the wire used to wind it) and the maximum voltage across capacitor C1 (to spec the capacitor).

I can choose to view the output of “V(out) (gain)” which is the voltage across the capacitor, but the scale is in dBV; I’d prefer just volts. Also, I would have thought there would be some interaction between the capacitor and inductor, leading to voltages greater than the input. Am I mistaken in this assumption?

Also, I’d like to measure the maximum current flow through L1. I thought I could choose the probe tool, whose icon would change to a current clamp when over a component. I never see this. Furthermore, when I plot “I(L1) (gain)” I get something that seems to be measured in phase and not amps.

Any suggestions for what I’m doing wrong, or what I don’t understand correctly?

I did not add the “ac=1” in my copy of this project, It already was present, and the simulation still did not run. I’m not very proficient with ngSpice, and am not sure which text change did it (either the references or the values) I also changed the simulation to 100 points per decade to get a bit smoother curves.

I have tried (only few simple tries) Spice with 7.0.11 and had no problems with such simple circuits. As I have also upgraded to V8 I will not try what was wrong with your V7 simulations.

R1 and R2 lower your LC resonance quality. There are simple Q equations when you have only one R.
If you set R1=0 you will get a circuit with Q= 50 * SQRT(620p/1.5u) = 1.017 (paralel RLC circuit).
You will see little hill at V(out).
Change R2 to 5k to get Q around 100 and you will see high peak.
Change R1 back to 50.
Assuming only R1 affects Q you get (serial RLC circuit) Q = (1/50)*SQRT(1.5u/620p) = 0.984
And you see small hill again.

However, I still don’t understand how to get the answers to my two questions:

What is the maximum voltage experience by C1? From this graph, it seems to be about 31 dBV which I think is 35.35 volts (1/2 of the source voltage of 70.7v). Is this correct?

What is the maximum current through L1? When I place the cursor on the peak of the “I (L1) (gain)” curve, it reads “-844m°” which I don’t know what it means (meter degrees?), but at the least isn’t in amperes, which I would expect for a current. How can I find the answer to my question of the current through L1?

Thanks, again, for taking the time to try to help me.

Of course. If you don’t have any resonance peak than at low frequency L and C don’t work so you have voltage divider consisting of two 50Ω.

It is clearly a bug. It is not a Phase (as it is written at chart). At chart you see that your peak has Phase shown as about -0.84. So I suppose that -844m = -844E-3 = -0.844. Then I assumed it is not Phase but current.
10^(-0.844/20)=0.907A.
If we can measure the voltage over R1 we could confirm it, but I don’t know how to get voltage between two points. I have tried to write something in Measurement box, but it didn’t worked for me. Probably using some voltage driven voltage source (I don’t know if we have it here) with K=1 you will be able to see this voltage difference at its output with one pin connected to GND.
But I found simpler way. I moved R1 under V1 so I get directly voltage at R1. I got peak value of 33.1dBV so it is 10^(33.1/20)=45.186V. 45.186/50=0.904A.
I think it is enough close to my previous result to confirm that I am probably right.

If you really will have 70.7V and 6MHz in such circuit I think not the max L current and not the max C voltage are what you should be care about, but the power dissipated in L and C.

@Piotr , thank you for your analysis. It helped me a lot.

What I’m trying to do is correctly size the wire used to construct L1 and the voltage specification for C1, to design a practical and realizable LPF for a 40m 100W amateur radio transmitter. I think the maximum current in L1 will tell me the lower limit of the wire size, and the maximum voltage across C1 will tell me the lower limit of the voltage rating for C1. That’s what I care about.

I’m affraid the voltage is not ½ conceptually, but rather 10^(31/20), i.e., 31 dB over one volt, as the voltage is against 1 volt. The result is similar, about 35 V.

I concur with Piotr computation for the current in L1, although it is weird the ref be one ampere.

Pertaining your intent to use the simulation for a real world 40 m band ham radio 100 W LPF, I suggest you find a more real model for the capacitors and obtain the Spice model of the inductors you’ll use as the Q of these components will have a say in the dissipation of your filter.

For a thorough discussion on LC matching networks (albeit not filters, the topology is the same) and some ideas on how to compute the actual values, give a look at KC6JCA blog.

@csrabak , thank you very much for your continued efforts to help me answer my question.

Regarding your suggestion that I need specific Q values for inductors and capacitors, this again seems like a circular argument: To choose specific components, I need Q values, but to find Q values, I need to look up specific components. I don’t know how to break out of this circle.

Regarding reading K6JCA’s blog (at K6JCA: 2022), there’s so much there that I was overwhelmed. There’s eight mentions of ‘matching’ on just the first page. I’ll have to spend some time with this.