[quote=“bobc, post:4, topic:9470”]
. . . It’s unconventional to create an amp with a LM317, but apparently it can be done. I’m baffled by U2 though, the output goes nowhere? . . . [/quote]
Yeah, this is an abuse of the '317. Seed your search engine with “LM317 amplifier” and you’ll find a few dozen places where the circuit was posted and/or discussed. The whole idea brings to mind the classic comment about watching a circus bear walk on its hind legs: “The amazing thing is not that it’s done well, but that it can be done at all.”.
U2 is strapped as a constant current source, about 200 mA. This forces a minimum load on U1 throughout the output swing, making it a “Class A” amplifier.
The notation “SINE(0 {A} {F} )” sets simulation parameters for the simulated sinewave signal source V2. “0” is the DC offset of the sinusoid. “{A}” is the peak amplitude of the sinewave. LTSpice uses curly braces ( “{ }” ) to identify scripting variables. In this case, “A” is specified in the statement “.param a=200m” as 200 mV peak amplitude. (SPICE is also, generally, case-insensitive so “A” and “a” are the same variable. And beware . . . both “M” and “m” are abbreviations for “milli”, NEVER “mega”!) The “{F}” variable specifies the signal generator’s simulated frequency. In this case, the simulation will run twice - once for a frequency of 1KHz, and once with 10KHz. You see this in the statement “.step param F list 1K 10k”.
Although I am very much in favor of circuit simulation as a design tool when it is done properly, I would look carefully at simulation results for this circuit and verify them with some bench measurements. Whatever SPICE model you have for the LM317 is almost certainly intended to represent the device’s behavior as a voltage regulator, not as an amplifier. In particular I would be skeptical of any results related to either frequency response or waveform distortion until I confirm them with a lab measurement or two.
@Hextejas, I think you have a great idea about learning KiCAD by doing a simple project or two with an application you are interested in. This particular product impresses me as more of a novelty than a practical product. There are hundreds, perhaps thousands, of simple audio amplifiers documented on the web (CMoy, Rod Elliot, DIYAudio, Nelson Pass, HeadFi, etc, etc). I’d suggest that you select one of these projects that already has a proven, working, circuit board layout and see if you can replicate the layout, or perhaps reproduce it with minor changes. Along the way you may have occasion to ask why some aspect of that board was done in a certain way, and thereby learn from other people’s experience. Knowing you can use KiCAD to reproduce the work of recognized authorities in the field should give you the confidence to take on new, original, projects.
Dale