File: index.html

package info (click to toggle)
sch-rnd 1.0.10-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 17,696 kB
  • sloc: ansic: 119,120; awk: 1,502; makefile: 1,421; sh: 1,404; yacc: 905; lex: 172; xml: 160
file content (64 lines) | stat: -rw-r--r-- 2,224 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<html>
<body>
<h1> 16_opamp_dc: dc sweep </h1>

<h2> Scope </h2>
<p>
In this simulation we are going to map a simple opamp circuit's gain
at different voltages (dc sweep).

<h2> The schematics </h2>
<p>
The single-sheet schematic contains the opamp circuit with connectors,
suitable for the PCB workflow.
<p>
<center>
<a href="16_opamp_dc.rs"><img src="16_opamp_dc.svg" width=400px></a>
<br>Click the image to get the sch-rnd sheet; also requires this <a href="project.lht">project.lht</a> in the same directory</center>
<p>

<h2> Opamp model </h2>
<p>
This example uses the lm358 macromodel from sch-rnd's stock spice
library. This model is a subcircuit of the amplifier and simulates a
lot of limiters and parasitics.

<h2> Preparing for simulation </h2>

<h3> Q1 </h3>
<p>
The model uses the standard opamp pinout so the hardwired spice/pinnum
attributes on the terminals will simply work.
<p>
The simulation setup process is largely the same as in the
<a href="../01_dc/index.html">base example of dc op point</a>. The simulation
setup in this example is called "dc gain".

<h3> Modifications </h3>
<p>
This circuit needs three voltage sources, which are both added as modifications.
The first one is a DC 5V source connected to net Vcc (and GND). The second is
a DC -5V source connected to net Vneg (and GND). These are the power supply
rails of the opamp.
<p>
The third source is connected to the net <i>in</i> (and GND). Unlike other
sources in the examples so far, this one has a name: V1. This is important
because the analysis will need a named source for the sweep.

<h3> Sim setup: output config </h3>
<p>
The analysis to use is <i>dc (lin)</i> which is a linear DC sweep: spice
will vary the voltage on V1 (selected in the source name field, refers to
V1 set up as a modification above). It is configured to run 
from -50mV to +60mV on the input, increasing voltage by 2 mV steps.
<p>
At the end the input and output voltages are plotted. The plot will use
linear X axis because of the analysis is "(lin)".

<p>
<center>
<img src="sim_run.png">
<br>Simulation setup dialog, third tab, after execution</center>
<p>
Because of the large amplification factor, the
input (red) trace is visible only when zoomed in.