Pseudo-PTAT for Bandgap

Hello! I’m trying to confirm a PTAT element’s behavior using AMI’s C5 process. However, when I compare the voltage or currents, the value at TYP temp. (i.e. 25°C) is always higher. I’ve attached a picture of the circuit below. I’m wondering if the behavior is correct?

Thanks and best regards,

Update: Got the whole BG circuit working below without curvature correction. (40 ppm)

Do you trust the models that you included from “C5_models.txt”?

1 Like

Also: What simulator are you using? I’m not aware of any “.step” supported by ng-spice. If you’re not using ng-spice, then you’re on your own, as I can’t even guess at what result your simulator is going to produce.


Good day mr. tim!
Thank you so much for your fast reply!

About the first question, I’m quite confident with the model file because I’ve tried characterizing the NMOS and PMOS and the generated curves seem to be in order.

Sadly, I’m using LTSpice. But I’ve downloaded NGSpice and am trying to set it up with Electric (it is my first time to use it). I’ve heard NGSpice is an excellent open source simulator that grants further flexibility to the designer by adding command-line functionality. Though I have doubts my results will be any different (I believe the numerical methods/algorithm behind converging toward a solution would is similar).

That is all for now.
Thank you very much.
Best regards,

By the way, “.step” is a function I used to step temperature or sweep temperature.
I was trying the “.temp” function at first but it was already obsolete.

Hmmm… apparently the following line isn’t recognized by NG-Spice
Mpmos@0 vdd gnd gnd vdd pmos L=0.6U W=12U

I’m testing a DC analysis first on a PMOS configured as a diode, so the drain and gate are connected to GND (d g s b) and the source is to VDD (there is no bulk). Using LTSpice, I get the conventional I-V curve of a diode. With NG-Spice, I’m getting the following error from the “.out” file.

Error on line 11 :
mpmos@0 vdd 0 0 vdd pmos l=0.6u w=12u
could not find a valid modelname
ngspice 1 ->

I ascertained that I set the spice model and the include file link is accessible (I had to transfer it to C:\Users\Public\Documents\C5_models.txt because the space bar in “Justin Spencer” was prompting another error (this is alright in LTSpice).

In the meantime, I’ll try attacking the problem from different angles.

Thanks and best regards,

Hopefully your results won’t be any different, but the main difference with using ngspice is that I can better help you, since I’m not at all familiar with LTSpice, and the “.step” function is clearly one way in which LTSpice and ngspice differ.

I wonder if even with the change of the space in the name, ngspice is reading the model file, or parsing it correctly, because “could not find a valid modelname” indicates that there was no “.model pmos pmos …”.
Could it be that the included file is trying to include other files in the original directory that are still failing due to the space in the directory name?

Hello! I got it! Sorry, it’s a no-brainer mistake.
My MOSFET connections for the diodes were wrong. I forgot I was using the body diodes to generate the PTAT.
So drain has to be at lower potential (cathode) and the gate has to be at GND (for it not to turn on).
This is really embarassing. Hehe.
I re-simulated again on both simulators and both .out files have the hot temp. at higher potential/current.

Thank you so much for the support!
Best regards,

Jesus, I had the MOSFETs operating in the saturation region (as resistors).
hides head in shame