LTSpice – First Steps, Already Helpful

LTSpice is a fairly approachable, very powerful circuit simulation software system. It has a straightforward GUI interface – drop in parts from catalog, draw wires, run simulation – with a strong simulation engine sitting behind it. I downloaded it this week for the first time, and it’s already proved its worth.

Many others have written excellent tutorials about using LTSpice, so I won’t rehash the details here. I found the tutorial on All About Circuits to be very useful, if a little bit hard to follow.

One of sample projects that that tutorial walks you through is analyzing the response of a basic LC bandpass filter using LTSpice’s AC Sweep mode. After working through that, I thought it might be fun to model the front end filter on my little Direct Conversion receiver to see what the actual (expected) frequency response is. Since I had ripped those values straight from the GQRP Sudden, it seemed like a good learning experience.

So, I quickly drew up a little model of that front end filter. It looks something like this:

Frontend50OhmsOut
A pretty-little schematic! The series/parallel capacitors used values I had on had to get close to the GQRP filter values.

And, running a sweep from 1 MHz to 10 Mhz, I got… a steaming pile of what the heck kind of input filter is this??

Frontend50OhmsSweep
The first AC sweep of the above schematic. More like a throw-it-in-the-bin-put filter….

-24dB at best, a “peak” somewhere above 25 MHz, there’s no way the the GQRP would have put this out in a kit. I went back through my network, looking for a dropped connection, or a capacitor with a value in farads instead of picofarads (boy will that cut your gain). But no dice, the circuit seemed solid…

…Until the third time I checked the component values, and noticed one fatal slip-up. You see, R1 and R2 in the above schematic represent the source impedance and the input impedance, respectively. While the source impedance could be a nominal 50 ohms, the RF input impedance for the NE602 mixer is at least 1.5 kOhms. Doh!

So, with a slight change to R2 in the schematic, and re-running the simulation:

Frontend1500OhmsSweep
The same filter as above swept with the correct ~1500ohm output impedance.

Now that’s more like it! A nice peak in the middle – not a ton of attenuation out of band, but pretty good for a little five element filter. We can even zoom in on that peak a little

Frontend1500OhmsLabelled
A zoomed section of the sweep from above. Not quite the ideal response, but pretty close for a first-ever filter.

It looks like my filter’s currently peaked at around 6.63 MHz, instead of the ~7.15 MHz I would have hoped for, but considering the lower and upper boundaries of the US 40m band are only 2 and 4 dB down from the peak respectively, I’d call that a good first start.

A little more messing around showed that using a proper 10pF series capacitor instead of ~9.8pF doesn’t make much difference. The best solution I found to be to reduce the shunt inductors to about 4.8 uF, which puts the filter peak at just over 7 MHz. Of course, this assumes all ideal values and no parasitic effects for any of the components. And that my hand-wound toroids actually match these inductances. But hey, it’s somewhere to start!

It turns out, LTSpice isn’t just useful as a software tool – it makes a great rubber-duck debugger as well. While squinting down at the board to double-check the value of those tiny series capacitors, I realized I’d made a horrible assembly error. I should have put those two 200pF shunt capacitors in series on either side, as in the above diagram, but I instead put them in parallel….

FrontEndMisbuiltCombined
When you build it wrong, it won’t do the thing it was supposed to do…

Yeah, forget the audio pre-amp for now. I’m losing 30+ dB to my front end filter. Time to heat up the iron.

73

 

Advertisements

One thought on “LTSpice – First Steps, Already Helpful

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s