You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 07ab200
Browse filesBrowse the repository at this point in the historyBrowse files
Add BJT audio preamplifier circuit and associated files
- Created a new SPICE netlist for a BJT audio preamplifier circuit.
- Added SVG files for the circuit schematic and response summary.
- Introduced a TOML configuration file for the schematic layout.
- Updated test suite to include tests for the new BJT audio preamplifier.
- Enhanced the cookbook schematic tool to support BJT components.
from a SPICE netlist plus a compact `schematic.toml` layout. Its validator
@@ -42,8 +42,8 @@ equations, assumptions, measurements, and educational value.
42
42
43
43
The initial cookbook milestone is complete:
44
44
45
-
- Rectifier power supply, PWM DAC, ideal-diode power OR, and simple PLL recipes
46
-
are present in the user-facing catalog.
45
+
- Rectifier power supply, PWM DAC, BJT audio preamplifier, ideal-diode power
46
+
OR, and simple PLL recipes are present in the user-facing catalog.
47
47
- Every current recipe has a runnable `.cir`, full guide, checked-in
48
48
`schematic.toml`, generated `schematic.svg`, and accessible `response.svg`.
49
49
- All current schematic layouts display every parsed netlist component and
@@ -52,9 +52,10 @@ The initial cookbook milestone is complete:
52
52
- The data-driven `CircuitCookbookTests` suite compiles and simulates all
53
53
current recipes and enforces their measurement ranges.
54
54
55
-
The next circuit should be the BJT audio preamplifier. It expands the
56
-
pure-SPICE track with operating-point and AC analysis instead of adding another
57
-
transient-only example.
55
+
The next circuit should be the RC sensor-noise filter and input protector. It
56
+
adds an approachable Simple recipe after the Medium BJT preamplifier while
57
+
introducing frequency-domain attenuation, step response, and clamp-current
58
+
measurements.
58
59
59
60
## Cookbook Tracks
60
61
@@ -87,7 +88,7 @@ story. These recipes should be approachable without prior simulator expertise.
87
88
| Circuit | Track | Status | Practical use | What it measures and teaches |
88
89
| --- | --- | --- | --- | --- |
89
90
| PWM-to-analog converter | Pure SPICE | Complete | Recover an analog control voltage from a microcontroller PWM output | Duty-cycle average, ripple, settling time, and cascaded filtering |
90
-
| RC sensor-noise filter and input protector | Pure SPICE |Planned| Condition a noisy low-voltage sensor before an ADC input | Cutoff frequency, step response, attenuation, and clamp current |
91
+
| RC sensor-noise filter and input protector | Pure SPICE |Next| Condition a noisy low-voltage sensor before an ADC input | Cutoff frequency, step response, attenuation, and clamp current |
91
92
| BJT relay or solenoid driver with flyback diode | Pure SPICE | Planned | Drive an inductive load safely from a logic-level signal | Base drive, coil current, saturation voltage, turn-off transient, and flyback decay |
92
93
| RC switch debouncer with Schmitt-trigger buffer | CustomComponents | Planned | Convert a bouncing mechanical switch into a clean digital edge | Threshold hysteresis, rejected pulse width, propagation delay, and output edge count |
93
94
| Loaded voltage divider and emitter-follower buffer | Pure SPICE | Planned | Scale a battery or sensor voltage without heavily loading its source | Divider error, input impedance, output impedance, bias error, and headroom |
@@ -104,7 +105,7 @@ should introduce realistic design tradeoffs while remaining easy to modify.
104
105
| --- | --- | --- | --- | --- |
105
106
| Rectifier, reservoir, and Zener regulator | Pure SPICE | Complete | Produce filtered low-voltage DC from an isolated AC secondary | Startup, diode conduction, reservoir ripple, load regulation, and load steps |
106
107
| Ideal-diode redundant power input | CustomComponents | Complete | OR two supplies with automatic failover and reverse-current blocking | Source priority, failover dip, handback, standby current, and reverse current |
107
-
| BJT audio preamplifier | Pure SPICE |Next| Raise a small audio signal to a useful level for a following stage | Bias point, AC gain, bandwidth, clipping, loading, and Fourier distortion |
108
+
| BJT audio preamplifier | Pure SPICE |Complete| Raise a small audio signal to a useful level for a following stage | Bias point, AC gain, bandwidth, clipping, loading, and Fourier distortion |
108
109
| 555 monostable pulse stretcher and PWM controller | Packaged subcircuit | Planned | Create a fixed-duration event pulse and an adjustable LED or fan drive | Pulse width, duty range, frequency, reset behavior, and load response |
109
110
| Active anti-alias filter and ADC buffer | Pure SPICE | Planned | Limit sensor bandwidth and drive a sampling input cleanly | Passband gain, cutoff, attenuation, phase shift, settling, and output loading |
110
111
| Class-AB headphone or line-output buffer | Pure SPICE | Planned | Drive a low-impedance audio load from a small-signal source | Quiescent current, crossover distortion, voltage swing, output power, and efficiency |
@@ -128,8 +129,8 @@ simulations and a deeper stability or timing explanation.
128
129
| Linear bench supply with current limiting and foldback | Pure SPICE | Planned | Provide a regulated DC output that survives overload and short-circuit conditions | Line regulation, load regulation, loop response, current limit, foldback, and device dissipation |
129
130
| Digital frequency counter and tachometer | CustomComponents | Planned | Count input events over a fixed gate interval and retain a readable result | Gate timing, count accuracy, overflow, latch timing, reset sequencing, and low-frequency error |
130
131
131
-
Keep the backlog balanced as recipes are completed. After the BJT
132
-
preamplifier, prefer a simple circuit before starting another difficult one.
132
+
Keep the backlog balanced as recipes are completed. Build the Simple RC
133
+
sensor-noise filter next before starting another Difficult circuit.
133
134
This roadmap is a candidate pool, not a commitment to publish all 24 circuits.
134
135
Apply the selection criteria before promotion and keep the published catalog
135
136
small enough to maintain well.
@@ -150,8 +151,9 @@ The starting sequence established three complementary examples:
150
151
Demonstrated that CustomComponents can form a complete mixed-signal system,
151
152
rather than only isolated device examples.
152
153
153
-
The ideal-diode redundant power input was the first follow-on application. The
154
-
next addition is the BJT audio preamplifier.
154
+
The ideal-diode redundant power input was the first follow-on application, and
155
+
the BJT audio preamplifier was the second. The next addition is the Simple RC
156
+
sensor-noise filter and input protector.
155
157
156
158
## Current Repository Structure and Growth Path
157
159
@@ -175,6 +177,12 @@ circuits/
175
177
schematic.toml
176
178
schematic.svg
177
179
response.svg
180
+
bjt-audio-preamplifier/
181
+
README.md
182
+
bjt-audio-preamplifier.cir
183
+
schematic.toml
184
+
schematic.svg
185
+
response.svg
178
186
custom-components/
179
187
ideal-diode-power-or/
180
188
README.md
@@ -274,7 +282,7 @@ Each guide should begin with a compact table similar to this:
274
282
| Requires | SpiceSharpParser core |
275
283
| Dialect | Portable SPICE |
276
284
| Analyses | OP, AC, TRAN |
277
-
| Difficulty |Intermediate|
285
+
| Difficulty |Medium|
278
286
| Verified with | SpiceSharpParser 3.4.x |
279
287
280
288
For custom circuits, `Requires` should explicitly name
@@ -366,7 +374,8 @@ stable across several additional circuits.
366
374
367
375
## Immediate Next Steps
368
376
369
-
1. Add the BJT audio preamplifier with OP, AC, and transient measurements.
377
+
1. Add the RC sensor-noise filter and input protector with AC, transient, and
378
+
clamp-current measurements.
370
379
2. Define and trial the recipe manifest on the BJT recipe and one existing
371
380
pure-SPICE recipe.
372
381
3. Migrate the remaining cookbook test cases after the manifest format is
|[Rectifier power supply](cookbook/pure-spice/rectifier-power-supply/README.md)| Pure SPICE | TRAN | Intermediate | Rectification, reservoir ripple, Zener regulation, and a load step |
13
-
|[PWM digital-to-analog converter](cookbook/pure-spice/pwm-dac/README.md)| Pure SPICE | TRAN | Beginner | Duty-cycle averaging, ripple attenuation, and settling |
14
-
|[Ideal-diode redundant power input](cookbook/custom-components/ideal-diode-power-or/README.md)| CustomComponents | TRAN | Intermediate | Supply OR-ing, automatic failover, handback, and reverse-current blocking |
|[Rectifier power supply](cookbook/pure-spice/rectifier-power-supply/README.md)| Pure SPICE | TRAN | Medium | Rectification, reservoir ripple, Zener regulation, and a load step |
13
+
|[PWM digital-to-analog converter](cookbook/pure-spice/pwm-dac/README.md)| Pure SPICE | TRAN | Simple | Duty-cycle averaging, ripple attenuation, and settling |
14
+
|[BJT audio preamplifier](cookbook/pure-spice/bjt-audio-preamplifier/README.md)| Pure SPICE | OP, AC, TRAN, FOUR | Medium | Biasing, gain, bandwidth, coupling, loading, and harmonic distortion |
15
+
|[Ideal-diode redundant power input](cookbook/custom-components/ideal-diode-power-or/README.md)| CustomComponents | TRAN | Medium | Supply OR-ing, automatic failover, handback, and reverse-current blocking |
0 commit comments