Skip to content

This repository will maintain simulation files and other relevant files on the Bandgap Reference IP worked on in the EICT IITG - VSD Summer Online Internship 2020

Notifications You must be signed in to change notification settings

avinashbellana/BandgapReference

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bandgap Reference Simulation

This project simulates the designed Bandgap reference circuit to determine its performance characterisitics.

Note: Circuit not designed for optimal performance. Design yet to be modified.

A Glance at the Bandgap Reference IP

To learn more about Bandgap Reference, its principle of generation, Implementation, Issues & Improvements, consider reading this.

To gain insight into the applications and significance of Bandgap Reference in VLSI, have a look at this.

Bandgap Reference Circuit Diagram

About Ngspice

Ngspice is an open source mixed-signal circuit simulator.

Installing Ngspice

For Ubuntu

Open your terminal and type the following to install Ngspice

$  sudo apt-get install -y ngspice

Running the Simulation

Download all files from the Ngspice Simulation Folder.

Note: Before running simulation, ensure that the osu018.lib file is in the same directory as the other .cir files. Else you will need to modify the .cir files and add the approporiate path of osu018.lib

To enter the Ngspice Shell, open the terminal & type:

$ ngspice

To simulate a netlist, type:

ngspice 1 ->  source <filename>.cir

You can exit from the Ngspice Shell by typing:

ngspice 1 ->  exit

or

ngspice 1 ->  quit

There are several waveforms that need to be obtained to observe the performance of the Bandgap reference circuit.

To obtain the Vref @ VDD=3.3V & Temp= 27 C over 100ns plot

Open your terminal and change the working directory to the folder where your netlist file is saved. Run the netlist file using the following command.

$  ngspice bandgap.cir

To obtain the Vref, PTAT & CTAT voltages over -50 C through 200 C

Open your terminal and change the working directory to the folder where your netlist file is saved. Run the netlist file using the following command.

$  ngspice ptat+ctat.cir

To obtain the Vref over -40 C through 140 C

Open your terminal and change the working directory to the folder where your netlist file is saved. Run the netlist file using the following command.

$  ngspice temp_variation.cir

To obtain the Vref over supply variation 2V through 4V

Open your terminal and change the working directory to the folder where your netlist file is saved. Run the netlist file using the following command.

$  ngspice supply_variation.cir

To observe the Zero Current State

Open your terminal and change the working directory to the folder where your netlist file is saved. Run the netlist file using the following command.

$  ngspice w_o_startup.cir

To determine the Start-up time

WARNING! : This method is flawed and yields incorrect results, uploaded only to maintain Log

Open your terminal and change the working directory to the folder where your netlist file is saved. Run the netlist file using the following command.

$  ngspice with_startup.cir

About LTspice XVII

LTspice XVII is a freeware simulation software developed by Analog Devices.

Installing and Starting LTspice

For Windows

Head on to Analog Devices, download the lastest version of LTspice for your version of Windows.

  • Run the downloaded LTspice.exe file and go through with the installation.
  • Download the bgr.cir file and the osu018.lib file accompanying it from the LTspice Simulation Folder.
  • Open the LTSpice XVII application.
  • File -> Open -> Select the bgr.cir file

For MacOS 10.9+

Head on to Analog Devices, download the lastest version of LTspice for your Mac.

  • Open the downloaded LTspice.dmg file and go through with the installation.
  • Download the bgr.cir file and the osu018.lib file accompanying it from the LTspice Simulation Folder.
  • Copy the absolute path of your osu018.lib file and change the .include directive in the bgr.cir file to .lib your_path/osu018.lib
  • Open LTspice -> More Choices -> Open Other Type of File -> Select the bgr.cir file
  • Hit the Run button.

For Ubuntu

LTspice can run under WINE. No Linux version available yet. Open your terminal and type the following to install LTspice in WINE

$  sudo apt-get install wine
$  cd /tmp/
$  wget http://ltspice.analog.com/software/LTspiceXVII.exe
$  wine LTspiceXVII.exe
$  rm LTSpiceXVII.exe
  • Download the bgr.cir file and the osu018.lib file accompanying it from the LTspice Simulation Folder.
  • Applications -> LTspiceXVII
  • File -> Open -> Select the bgr.cir file

LTspice XVII Window

Running the Simulation

Note: Before running simulation, ensure that the osu018.lib file is in the same directory as the bgr.cir file. Else you will need to modify the bgr.cir file and add the approporiate path of osu018.lib

There are several waveforms that need to be obtained to observe the performance of the Bandgap reference circuit. To obtain the desired waveform, simply uncomment the relevant spice directives and comment the irrelevant ones.

To comment in LTSpice XVII, use the " * " symbol before the text.

To obtain the Vref @ VDD=3.3V & Temp= 27 C over 100ns plot

Ensure the following directives are present

Vdd 1 0 3.3V
.temp 27
.tran 0 100ns
  • Run it
  • Right click on plot plane -> add traces -> Select V(vref) -> OK

To obtain the Vref, PTAT & CTAT voltages over -40 C through 200 C

Ensure the following directive is present

.step temp -40 200 1
  • Run it
  • Right click on plot plane -> add traces -> Select V(vref) -> OK
  • Right click on plot plane -> add traces -> Select V(15) -> OK
  • Right click on plot plane -> add traces -> *Add this expression:* V(vref)-V(15) -> OK

To obtain the Vref over -40 C through 140 C

Ensure the following directive is present

.step temp -40 140 1
  • Run it
  • Right click on plot plane -> add traces -> Select V(vref) -> OK
  • Click on the Voltage Trace Label V(vref) at the top of the plot plane, cursors should now appear. Drag the cursors to determine the voltages at specific points.

To obtain the Vref over supply variation 2V through 4V

Ensure the following directives are present
Vdd 0 1 3.3V
.dc Vdd 2 4 0.1
  • Run it
  • Right click on plot plane -> add traces -> Select V(vref) -> OK
  • Click on the Voltage Trace Label V(vref) at the top of the plot plane, cursors should now appear. Drag the cursors to determine the voltages at specific points.

To observe the Zero Current State

Ensure the following directives are present

.ic  V(8)=0V V(9)=0V
.tran 0 50ns

Comment out the start-up ckt

  • Run it
  • Right click on plot plane -> add traces -> Select V(vref) -> OK

To determine the Start-up time

WARNING! : This method is flawed and yields incorrect results, uploaded only to maintain Log

Ensure the following directives are present
.ic  V(8)=0V V(9)=0V
.tran 0 50ns

Uncomment the start-up ckt

  • Run it
  • Right click on plot plane-> add traces -> Select V(vref) -> OK
  • Click on the Voltage Trace Label V(vref) at the top of the plot plane, cursors should now appear. Drag the cursors to determine the start-up time.

Author

Sheryl Serrao

Acknowledgments

Contact Information

About

This repository will maintain simulation files and other relevant files on the Bandgap Reference IP worked on in the EICT IITG - VSD Summer Online Internship 2020

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published