<b>Narration</b>

1
00:00:01 --> 00:00:06
Welcome to the spoken tutorial on <b>Simulating Astable Multivibrator </b>in <b>eSim</b>.

2
00:00:07 --> 00:00:23
In this tutorial, we will -
<p>Create and <b>simulate</b> an <b>Astable Multivibrator</b>.
</p><p>Understand <b>dot cir </b>and <b>dot cir dot out</b> files and
</p><p>Observe and understand the <b>Ngspice terminal</b>.
</p>

3
00:00:24 --> 00:00:35
To record this tutorial, we will use-
<p><b>Ubuntu Linux OS </b>16.04 and
</p><p><b>eSim </b>version 1.1.2
</p>

4
00:00:36 --> 00:00:40
To practice this tutorial, basic knowledge of electronics is required.

5
00:00:41 --> 00:00:46
Earlier, we learnt how to create a <b>schematic</b> for an<b> RC circuit.</b>

6
00:00:47 --> 00:00:52
Now I am going to reinforce the idea with an <b>Astable Multivibrator circuit.</b>

7
00:00:53 --> 00:00:56
The <b>Astable Multivibrator circuit</b> is as shown.

8
00:00:57 --> 00:01:03
Watch me for the next one minute as I create this <b>circuit</b> in <b>eSim</b>.

9
00:01:04 --> 00:01:48
A considerable part of this activity has been fast forwarded.

10
00:01:49 --> 00:01:53
I am placing a few <b>components</b> and making a few connections.

11
00:01:54 --> 00:01:58
It is expected that you know how to create a <b>schematic</b> in <b>eSim</b>.

12
00:01:59 --> 00:02:49
In case you do not know, please watch the prerequisite <b>eSim</b> tutorials.

13
00:02:50 --> 00:02:54
The partially made <b>circuit schematic</b> is available in the <b>Code files link</b>.

14
00:02:55 --> 00:03:00
Pause the video to download and extract the <b>code files</b> on your <b>Desktop.</b>

15
00:03:01 --> 00:03:05
We will use the downloaded <b>code file</b> to practice the rest of the tutorial.

16
00:03:06 --> 00:03:08
Launch <b>eSim </b>on your machine.

17
00:03:09 --> 00:03:11
I have already opened <b>eSim.</b>

18
00:03:12 --> 00:03:16
Click on <b>Open Project </b>button on the left toolbar.

19
00:03:17 --> 00:03:22
Browse to the <b>Desktop</b> location and click on <b>AstableMultivibrator.</b>

20
00:03:23 --> 00:03:25
Then click on the <b>Open </b>button.

21
00:03:26 --> 00:03:30
Click on the<b> Open Schematic</b> button on the left toolbar.

22
00:03:31 --> 00:03:34
Press the <b>F1 </b>key to zoom into the <b>schematic</b>.

23
00:03:35 --> 00:03:40
If you have zoomed in or zoomed out too much, fit the <b>schematic</b> back to default.

24
00:03:41 --> 00:03:48
To do this, press the <b>Esc</b> key, and click on the <b>View </b>option on the top toolbar.

25
00:03:49 --> 00:03:52
Select the <b>Fit on Screen </b>option.

26
00:03:53 --> 00:04:02
It will fit the <b>schematic</b> back to its default resolution. I will zoom in again.

27
00:04:03 --> 00:04:10
The wires should be connected end-to-end for <b>components</b>, and not external <b>outlines</b>.

28
00:04:11 --> 00:04:13
I will demonstrate a common mistake now.

29
00:04:14 --> 00:04:16
Select the <b>Place Wire</b> tool.

30
00:04:17 --> 00:04:21
I have clicked on one end of <b>eSim underscore R</b>.

31
00:04:22 --> 00:04:28
I will drag it to the exterior outline of the <b>eSim underscore LED</b> and double-click.

32
00:04:29 --> 00:04:33
The empty green box shows that the connection is not proper.

33
00:04:34 --> 00:04:39
Press <b>Ctrl</b> and <b>Z</b> keys simultaneously to undo the changes just made.

34
00:04:40 --> 00:04:45
Let us properly connect the <b>eSim_LED</b> present on the right side of the <b>schematic</b>.

35
00:04:46 --> 00:04:49
Click on <b>Place Wire </b>tool on the right toolbar.

36
00:04:50 --> 00:04:59
Click on the unconnected <b>node</b> of the <b>resistor</b>. Then drag the cursor till <b>node 1</b> of <b>eSim underscore LED</b>

37
00:05:00 --> 00:05:06
Click once on the<b> eSim underscore LED node </b>to place the wire. Press <b>Esc</b> key.

38
00:05:07 --> 00:05:15
Select the <b>Place Wire</b> tool and click on the<b> node 2</b> of <b>eSim underscore LED</b>.

39
00:05:16 --> 00:05:21
Drag the cursor till the wire connecting the adjacent <b>transistor</b> and <b>capacitor</b>.

40
00:05:22 --> 00:05:27
Click once on the existing wire. Now press the <b>Esc</b> key.

41
00:05:28 --> 00:05:36
If the wires are placed properly, you will see a green dot where the wires intersect.
<p>This is called a <b>junction</b>.
</p>

42
00:05:37 --> 00:05:43
Right-click on<b> plot underscore v1 </b>and select the<b> Copy component</b> option.

43
00:05:44 --> 00:05:47
<b>plot underscore v1 </b>will be tied to the cursor.

44
00:05:48 --> 00:05:52
Drag the cursor near the <b>LED </b>on the right side.

45
00:05:53 --> 00:05:57
Place it next to the<b> LED </b>by clicking once on the <b>editor</b>.

46
00:05:58 --> 00:06:03
Click on <b>Place Global Label</b> on the right toolbar, to place a <b>global label</b>.

47
00:06:04 --> 00:06:13
Click once on the <b>editor</b> screen. Type the text <b>LED2 </b>and click on<b> OK.</b>

48
00:06:14 --> 00:06:17
<b>LED2 global label </b>will be tied to the cursor.

49
00:06:18 --> 00:06:24
Place the <b>LED2 global label</b> near the<b> LED </b>on the right side, by clicking once on the <b>editor</b> once.

50
00:06:25 --> 00:06:29
Rotate the <b>global label</b> if required.

51
00:06:30 --> 00:06:33
Right-click on <b>eSim_CP1</b>.

52
00:06:34 --> 00:06:38
Choose the <b>Edit Component</b> option, and select <b>Value.</b>

53
00:06:39 --> 00:06:48
Erase the value <b>eSim underscore CP1 </b>using <b>Backspace</b> key and type<b> 22u.</b> Click on <b>OK.</b>

54
00:06:49 --> 00:06:52
Note that we are using <b>polarised capacitor</b>.

55
00:06:53 --> 00:06:56
Right-click on <b>eSim underscore R</b>.

56
00:06:57 --> 00:07:03
Place the cursor on <b>Edit Component</b>, and select the <b>Value</b> option.

57
00:07:04 --> 00:07:12
Erase the value <b>eSim underscore R </b>using <b>Backspace</b> key and type<b> 1k.</b> Click on <b>OK.</b>

58
00:07:13 --> 00:07:17
We will assign a value to the<b> DC source</b> later.

59
00:07:18 --> 00:07:27
Connect <b>plot_v1 </b>and <b>LED2 global label </b>to the <b>junction</b> as shown.

60
00:07:28 --> 00:07:32
Press <b>Ctrl</b> and <b>S</b> keys simultaneously to save the work.

61
00:07:33 --> 00:07:37
Click on <b>Annotate Schematic</b> tool on the top toolbar.

62
00:07:38 --> 00:07:42
Click on <b>Annotate</b> option, and then on <b>OK</b>.

63
00:07:43 --> 00:07:47
Press <b>Ctrl</b> and <b>S</b> keys simultaneously to save the work.

64
00:07:48 --> 00:07:54
Click on<b> Perform electrical rules check </b>on the top toolbar. Click on <b>Run.</b>

65
00:07:55 --> 00:08:01
We can see three warnings regarding <b>global label</b>, which can be ignored.

66
00:08:02 --> 00:08:07
Click on <b>Delete Markers</b> and then click on <b>Close.</b>

67
00:08:08 --> 00:08:14
More information on <b>ERC errors</b> is given in the <b>Additional Reading Material </b>of this tutorial.

68
00:08:15 --> 00:08:19
Click on <b>Generate Netlist</b> on the top toolbar.

69
00:08:20 --> 00:08:25
Click on <b>Spice</b> tab, and check the <b>Default Format</b> option.

70
00:08:26 --> 00:08:31
Then click on <b>Generate</b> option, and click on <b>Save</b>.

71
00:08:32 --> 00:08:35
Now I will switch back to<b> eSim </b>main window.

72
00:08:36 --> 00:08:39
Double-click on <b>AstableMultivibrator.</b>

73
00:08:40 --> 00:08:43
Click on<b> Convert Kicad to Ngspice convertor.</b>

74
00:08:44 --> 00:08:48
Type the values for <b>transient parameters</b> as shown.

75
00:08:49 --> 00:08:51
Click on the <b>Source details</b> tab.

76
00:08:52 --> 00:09:01
Type the value of <b>DC source</b> as <b>9</b>. You should enter only numeric values of <b>voltages</b>.

77
00:09:02 --> 00:09:04
Click on <b>Device Modeling </b>tab.

78
00:09:05 --> 00:09:10
Click on the <b>Add</b> button under <b>d1:esim underscore led.</b>

79
00:09:11 --> 00:09:19
Double-click on <b>Diode</b> folder, select <b>LED.lib</b> file and click on the <b>Open</b> button.

80
00:09:20 --> 00:09:25
Similarly add the <b>library files</b> for <b>d2:esim underscore led</b>

81
00:09:26 --> 00:09:32
Click on the <b>Add</b> button under <b>q1:esim underscore npn.</b>

82
00:09:33 --> 00:09:41
Double-click on <b>Transistor</b> folder, select <b>BC547B.lib</b> and click on the <b>Open</b> button.

83
00:09:42 --> 00:09:49
Similarly add the <b>library files</b> for <b>q2:esim_npn</b>

84
00:09:50 --> 00:09:55
Now press the <b>Convert </b>button to convert the<b> KiCad netlist </b>to<b> Ngspice netlist.</b>

85
00:09:56 --> 00:10:00
A confirmation dialog box appears, click on <b>OK.</b>

86
00:10:01 --> 00:10:07
Click on <b>Simulation </b>button on the <b>eSim </b>toolbar to simulate the example.

87
00:10:08 --> 00:10:14
<b>Ngspice terminal </b>and <b>plot </b>windows open along with a <b>Python plot</b> window.

88
00:10:15 --> 00:10:20
<b>Ngspice terminal</b> shows the values of the <b>voltages</b> at the <b>nodes</b>.

89
00:10:21 --> 00:10:26
<b>Ngspice commands</b> can be entered to see plots in this <b>terminal</b>.

90
00:10:27 --> 00:10:33
Type the following text in the <b>Ngspice terminal</b> and press the <b>Enter</b> key.

91
00:10:34 --> 00:10:42
We can see the <b>voltage</b> at <b>nodes LED1 </b>and<b> LED2 </b>combined in a single plot.

92
00:10:43 --> 00:10:49
Any error will be displayed on the<b> Ngspice terminal</b> or the value will be replaced with a question mark.

93
00:10:50 --> 00:10:52
I will switch to <b>Python Plot</b> window.

94
00:10:53 --> 00:11:01
Click on<b> LED1, LED2 </b>and<b> IN </b>check-boxes in the <b>Python plot</b> window.

95
00:11:02 --> 00:11:05
Scroll down and click on the <b>Plot</b> button.

96
00:11:06 --> 00:11:12
If <b>analysis time parameters</b> are not set properly, <b>Python Plotting</b> error will be generated.

97
00:11:13 --> 00:11:17
For this particular <b>circuit, step time</b> is in <b>milliseconds</b>.

98
00:11:18 --> 00:11:23
Right-click on <b>AstableMultivibrator</b> and select the <b>Refresh</b> option.

99
00:11:24 --> 00:11:28
The <b>dot cir</b> file shows the <b>netist </b>file of the <b>schematic</b>.

100
00:11:29 --> 00:11:34
It contains the information about the <b>node</b> connections and values of <b>components</b>.

101
00:11:35 --> 00:11:40
The <b>cir dot out</b> file is passed to <b>ngspice</b> for running <b>simulations</b>.

102
00:11:41 --> 00:11:48
It contains information about the <b>device</b> and <b>subcircuit models</b> used in the<b> KiCad to Ngspice </b>conversion tool.

103
00:11:49 --> 00:11:52
It also contains the <b>analysis time parameters</b>.

104
00:11:53 --> 00:11:54
Let us summarize.

105
00:11:55 --> 00:12:10
In this tutorial, we learnt to-
<p>Create and <b>simulate</b> an <b>Astable Multivibrator.</b>
</p><p>Understand <b>dot cir </b>and <b>dot cir dot out</b> files.
</p><p>Observe and understand the <b>Ngspice terminal</b>.
</p>

106
00:12:11 --> 00:12:14
Please post your timed queries in this forum.

107
00:12:15 --> 00:12:19
Please post your general queries on <b>eSim</b> in this forum.

108
00:12:20 --> 00:12:23
<b>FOSSEE</b> team coordinates the <b>Lab Migration</b> project.

109
00:12:24 --> 00:12:28
<b>FOSSEE</b> team coordinates the <b>Circuit Simulation</b> project.

110
00:12:29 --> 00:12:35
Spoken Tutorial Project is funded by NMEICT, MHRD, Govt. of India. For more details, visit this website.

111
00:12:36 --> 00:12:41
This is Saurabh from IIT Bombay, signing off. Thank you.

