ESim/C2/Uploading-a-Spice-Device-Model/English

From Script | Spoken-Tutorial
Revision as of 12:11, 4 August 2020 by Glorianandihal (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Uploading a Spice Device Model in eSim

Author: Gloria N

Keywords: eSim, Device model, KiCad, eeschema, Simulation, Analysis, Knee voltage, Forward characteristics, Forward current,Spice,xml, Schematic


Visual cue Narration
Show Slide:

Opening Slide

Welcome to the spoken tutorial on Uploading a Spice Device Model in eSim.
Show Slide:

Learning Objectives

In this tutorial, using eSim we will learn -
  • To create a Schottky Diode using the Upload option.
Show Slide:

Systems Requirements

To record this tutorial, we will use-
  • Ubuntu Linux OS version 16.04
  • eSim version 2.0
Show Slide:

Prerequisites

To practice this tutorial,
  • To create a circuit schematic and simulate the netlist file in eSim.

If not, watch the prerequisite eSim tutorials on this website.

Show Slide:

Device Models

The device model file begins with a dot model statement.
  • mname indicates the model name like diode model 1N4007, 1N534A.
  • Component type indicates the type of model used.

For example: D is used for Diode,M for MOSFET,and

NPN or PNP for BJT.

  • pname is the parameter name and
  • pval is the parameter value.
Show Slide:

Introduction

The model components are already added in eSim.

The model library files added using the Upload option will be saved in the User Libraries folder under deviceModelLibrary.

The model library files are used with the components present in eSim underscore Devices.

You can also refer to the spice models available in the Ngspice manual.

System Computer:

Desktop icon

To launch eSim, you need to double-click on the eSim icon on your Desktop.
System Computer:

eSim startup window

I have already opened eSim.
Show Slide:

Code File

Pause the video here.

Download the Schottky diode 1N5711 library file from the Code file section available on this page.

Save it on your Desktop with dot lib extension.

eSim Main Window:

Click on Model Editor

On the eSim window, click on the Model Editor button from the left toolbar.

In the previous tutorial, we have seen how to add a Device model using the New option.

Now, we will add a Device model library using the Upload option.


Model Editor tab:

Click Upload >>

Click on Desktop>>

click on Schottky_diode.lib >>

click Open

On the Model Editor tab, click on the Upload button.

I have already downloaded the Schottky diode IN5711 model and saved it on my Desktop.

Click on the Desktop.

Click on the Schottky dot lib file.

Click on the Open button.


Model Editor tab:

Type New Model Name as Schottky >>

click OK

A pop-up window Model Name will appear.

In the Enter Model Library Name, type New Model Name as Schottky.

Click on the OK button.

The device model Schottky and its xml file will be saved under the User libraries folder.

eSim Main Window: Let us simulate the characteristics of Schottky diode.

We will open the example Diode Characteristics from the eSim Examples folder.

eSim Main Window:

Click on Open Project from the top toolbar >>

Double click on eSim-2.0 >>

Click on Examples>>

select Diode_characteristics >>

click Open.

We will open the Diode characteristic example from the Examples folder of eSim.

On the eSim' window, click on the Open Project button from the top menu.

Locate the directory where the eSim is installed.

Double click on the Examples folder.

Scroll down and select the Diode underscore characteristics.

Click on the Open button.

The Diode characteristics example is added to the eSim window under Projects.

eSim Main Window:

Select Diode_Characteristics under Projects>>

Click on the Open Schematic>>

Click Yes

To see the schematic, select Diode characteristics.

Click on the Open Schematic button from the left toolbar.

It directs us to the schematic editor.

eSim Schematic editor:

Press F1 key.

Press F1 key to zoom in the schematic.
eSim Main Window:

Select Diode_characteristics>>

click on Convert Kicad to Ngspice

Let us go back to the eSim window.

on the eSim window,select the Diode underscore characteristics.

Click on the Convert Kicad to Ngspice button from the left toolbar.

Kicad to Ngspice Converter:

Analysis Tab >>

Select DC

Enter the values.

In the Analysis tab, Select DC.

Scroll down to enter values.

Enter Source 1 as V1.

Enter Start as 0.

Enter Increment as 0.1.

Enter Stop as 0.4.

Kicad to Ngspice Converter:

Source Details Tab: Enter 1 for DC source V1.

In the Source Details tab, enter the value as 1.
Kicad to Ngspice Converter:

Device Modeling Tab Click on ADD>>

Double click on User Libraries folder>>

click on 'Schottky.lib file>>

click Open.

Skip the Ngspice Model tab.

Click on the 'Device Modeling tab.

Click on the ADD button.

Double-click on the User Libraries folder.

Select Schottky dot lib file and

Click on the Open button.

Kicad to Ngspice Converter:

Click on Convert>>

Click OK

On the Kicad to Ngspice tab, click on the Convert button.

Click on the OK button in the Information dialog box.

eSim Main Window:

Click on Simulation.

Now, let us generate the plots.

On the eSim window, click on the Simulation button from the left toolbar.

Ngspice Window:

Maximize the i(v_u1) ngspice plot.

Hover the mouse on X-axis to point voltage.

Hover the mouse on Y-axis to point current.

This diode has a knee voltage or turn-on voltage of around 0.2.

The forward current is 95 microampere.

These diodes are used in power rectification applications.

Close the Ngspice terminal and plots.

Python Plot Window:

Check In and Out node>>

click Plot

In the Python plot window, check the In node and Out nodes.

Then click on the Plot button.

You can see the input and output plot.

Close the Python plot.

Show Slide:

Summary

Let us now summarise.

In this tutorial, we learnt to create,

  • Schottky Diode using Upload option.
Show Slide:

Forum to answer questions

https://forums.spoken-tutorial.org/

Do you have questions in this Spoken Tutorial?

Choose the minute and second where you have the question.

Explain your question briefly.

Someone from the FOSSEE team will answer them.

Please visit this site.

Show Slide:

FOSSEE Forum

https://forums.fossee.in/

For any general or technical questions on eSim, visit the FOSSEE forum and post your question.
Show Slide:

Circuit Simulation

https://esim.fossee.in/circuit-simulation-project

The FOSSEE team coordinates the Circuit Simulation project.

We give Certificates and Honorarium to the contributors.

For more details, please visit this site:

Show Slide:

Lab Migration

https://esim.fossee.in/lab-migration-project

The FOSSEE team coordinates the Lab Migration project.

For more details, please visit this site.

Show Slide:

Acknowledgment

http://spoken-tutorial.org

Spoken Tutorial Project is funded by NMEICT, MHRD, Govt. of India.

For more details, visit this site.

Thank you slide This is Gloria N from IIT Bombay signing off.

Thank you

Contributors and Content Editors

Glorianandihal, Nancyvarkey