ESim/C2/Simulating-an-Astable-Multivibrator/English-timed
From Script | Spoken-Tutorial
Time | Narration |
00:01 | Welcome to the spoken tutorial on Simulating Astable Multivibrator in eSim. |
00:07 | In this tutorial, we will -
Create and simulate an Astable Multivibrator. Understand dot cir and dot cir dot out files and Observe and understand the Ngspice terminal. |
00:24 | To record this tutorial, we will use-
Ubuntu Linux OS 16.04 and eSim version 1.1.2 |
00:36 | To practice this tutorial, basic knowledge of electronics is required. |
00:41 | Earlier, we learnt how to create a schematic for an RC circuit. |
00:47 | Now I am going to reinforce the idea with an Astable Multivibrator circuit. |
00:53 | The Astable Multivibrator circuit is as shown. |
00:57 | Watch me for the next one minute as I create this circuit in eSim. |
01:04 | A considerable part of this activity has been fast forwarded. |
01:49 | I am placing a few components and making a few connections. |
01:54 | It is expected that you know how to create a schematic in eSim. |
01:59 | In case you do not know, please watch the prerequisite eSim tutorials. |
02:50 | The partially made circuit schematic is available in the Code files link. |
02:55 | Pause the video to download and extract the code files on your Desktop. |
03:01 | We will use the downloaded code file to practice the rest of the tutorial. |
03:06 | Launch eSim on your machine. |
03:09 | I have already opened eSim. |
03:12 | Click on Open Project button on the left toolbar. |
03:17 | Browse to the Desktop location and click on AstableMultivibrator. |
03:23 | Then click on the Open button. |
03:26 | Click on the Open Schematic button on the left toolbar. |
03:31 | Press the F1 key to zoom into the schematic. |
03:35 | If you have zoomed in or zoomed out too much, fit the schematic back to default. |
03:41 | To do this, press the Esc key, and click on the View option on the top toolbar. |
03:49 | Select the Fit on Screen option. |
03:53 | It will fit the schematic back to its default resolution. I will zoom in again. |
04:03 | The wires should be connected end-to-end for components, and not external outlines. |
04:11 | I will demonstrate a common mistake now. |
04:14 | Select the Place Wire tool. |
04:17 | I have clicked on one end of eSim underscore R. |
04:22 | I will drag it to the exterior outline of the eSim underscore LED and double-click. |
04:29 | The empty green box shows that the connection is not proper. |
04:34 | Press Ctrl and Z keys simultaneously to undo the changes just made. |
04:40 | Let us properly connect the eSim_LED present on the right side of the schematic. |
04:46 | Click on Place Wire tool on the right toolbar. |
04:50 | Click on the unconnected node of the resistor. Then drag the cursor till node 1 of eSim underscore LED |
05:00 | Click once on the eSim underscore LED node to place the wire. Press Esc key. |
05:07 | Select the Place Wire tool and click on the node 2 of eSim underscore LED. |
05:16 | Drag the cursor till the wire connecting the adjacent transistor and capacitor. |
05:22 | Click once on the existing wire. Now press the Esc key. |
05:28 | If the wires are placed properly, you will see a green dot where the wires intersect.
This is called a junction. |
05:37 | Right-click on plot underscore v1 and select the Copy component option. |
05:44 | plot underscore v1 will be tied to the cursor. |
05:48 | Drag the cursor near the LED on the right side. |
05:53 | Place it next to the LED by clicking once on the editor. |
05:58 | Click on Place Global Label on the right toolbar, to place a global label. |
06:04 | Click once on the editor screen. Type the text LED2 and click on OK. |
06:14 | LED2 global label will be tied to the cursor. |
06:18 | Place the LED2 global label near the LED on the right side, by clicking once on the editor once. |
06:25 | Rotate the global label if required. |
06:30 | Right-click on eSim_CP1. |
06:34 | Choose the Edit Component option, and select Value. |
06:39 | Erase the value eSim underscore CP1 using Backspace key and type 22u. Click on OK. |
06:49 | Note that we are using polarised capacitor. |
06:53 | Right-click on eSim underscore R. |
06:57 | Place the cursor on Edit Component, and select the Value option. |
07:04 | Erase the value eSim underscore R using Backspace key and type 1k. Click on OK. |
07:13 | We will assign a value to the DC source later. |
07:18 | Connect plot_v1 and LED2 global label to the junction as shown. |
07:28 | Press Ctrl and S keys simultaneously to save the work. |
07:33 | Click on Annotate Schematic tool on the top toolbar. |
07:38 | Click on Annotate option, and then on OK. |
07:43 | Press Ctrl and S keys simultaneously to save the work. |
07:48 | Click on Perform electrical rules check on the top toolbar. Click on Run. |
07:55 | We can see three warnings regarding global label, which can be ignored. |
08:02 | Click on Delete Markers and then click on Close. |
08:08 | More information on ERC errors is given in the Additional Reading Material of this tutorial. |
08:15 | Click on Generate Netlist on the top toolbar. |
08:20 | Click on Spice tab, and check the Default Format option. |
08:26 | Then click on Generate option, and click on Save. |
08:32 | Now I will switch back to eSim main window. |
08:36 | Double-click on AstableMultivibrator. |
08:40 | Click on Convert Kicad to Ngspice convertor. |
08:44 | Type the values for transient parameters as shown. |
08:49 | Click on the Source details tab. |
08:52 | Type the value of DC source as 9. You should enter only numeric values of voltages. |
09:02 | Click on Device Modeling tab. |
09:05 | Click on the Add button under d1:esim underscore led. |
09:11 | Double-click on Diode folder, select LED.lib file and click on the Open button. |
09:20 | Similarly add the library files for d2:esim underscore led |
09:26 | Click on the Add button under q1:esim underscore npn. |
09:33 | Double-click on Transistor folder, select BC547B.lib and click on the Open button. |
09:42 | Similarly add the library files for q2:esim_npn |
09:50 | Now press the Convert button to convert the KiCad netlist to Ngspice netlist. |
09:56 | A confirmation dialog box appears, click on OK. |
10:01 | Click on Simulation button on the eSim toolbar to simulate the example. |
10:08 | Ngspice terminal and plot windows open along with a Python plot window. |
10:15 | Ngspice terminal shows the values of the voltages at the nodes. |
10:21 | Ngspice commands can be entered to see plots in this terminal. |
10:27 | Type the following text in the Ngspice terminal and press the Enter key. |
10:34 | We can see the voltage at nodes LED1 and LED2 combined in a single plot. |
10:43 | Any error will be displayed on the Ngspice terminal or the value will be replaced with a question mark. |
10:50 | I will switch to Python Plot window. |
10:53 | Click on LED1, LED2 and IN check-boxes in the Python plot window. |
11:02 | Scroll down and click on the Plot button. |
11:06 | If analysis time parameters are not set properly, Python Plotting error will be generated. |
11:13 | For this particular circuit, step time is in milliseconds. |
11:18 | Right-click on AstableMultivibrator and select the Refresh option. |
11:24 | The dot cir file shows the netist file of the schematic. |
11:29 | It contains the information about the node connections and values of components. |
11:35 | The cir dot out file is passed to ngspice for running simulations. |
11:41 | It contains information about the device and subcircuit models used in the KiCad to Ngspice conversion tool. |
11:49 | It also contains the analysis time parameters. |
11:53 | Let us summarize. |
11:55 | In this tutorial, we learnt to-
Create and simulate an Astable Multivibrator. Understand dot cir and dot cir dot out files. Observe and understand the Ngspice terminal. |
12:11 | Please post your timed queries in this forum. |
12:15 | Please post your general queries on eSim in this forum. |
12:20 | FOSSEE team coordinates the Lab Migration project. |
12:24 | FOSSEE team coordinates the Circuit Simulation project. |
12:29 | Spoken Tutorial Project is funded by NMEICT, MHRD, Govt. of India. For more details, visit this website. |
12:36 | This is Saurabh from IIT Bombay, signing off. Thank you. |