saving . . . saved Problem using P MOS and N MOS has been deleted. Problem using P MOS and N MOS has been hidden .
Problem using P MOS and N MOS
Title
Question
Hi,
Whenever I try to use P MOS, N MOS(even in a simple inverter), every time I get the error message after giving values in netlist conversion step.

Error message: "Time step too small"

Thanks..

KiCad Designing-circuit-schematic-in-KiCad 00-01 min 0-10 sec 01-05-14, 9:18 p.m. 7skysurfers

Answers:

You need to tell me more about the circuit. Copy paste the netlist and let me know what circuit you are building. You also need to tell me the values you gave in Analysis Inserter and Netlist Converter.
02-05-14, 12:36 p.m. rakhiwarriar
* eeschema netlist version 1.1 (spice format) creation date: thu 01 may 2014 01:03:26 pm pdt

* Plotting option vplot8_1
v1  2 4 pulse(0 5 1n 1n 1n 0.5m 1m)
q2 4 2 1 mos_n
q1 1 2 3 mos_p

.tran  100e-06 5e-03 0e-00

* Control Statements 
.control
run
plot v(1) 
.endc
.end

02-05-14, 12:43 p.m. Huzefa
* EESchema Netlist Version 1.1 (Spice format) creation date: Thu 01 May 2014 01:03:26 PM PDT

* To exclude a component from the Spice Netlist add [Spice_Netlist_Enabled] user FIELD set to: N
* To reorder the component spice node sequence add [Spice_Node_Sequence] user FIELD and define sequence: 2,1,0

*Sheet Name:/
U1  1 VPLOT8_1<span class="Apple-tab-span" style="white-space:pre"> </span>
v1  2 4 PULSE<span class="Apple-tab-span" style="white-space:pre"> </span>
Q2  1 2 4 MOS_N<span class="Apple-tab-span" style="white-space:pre"> </span>
Q1  3 2 1 MOS_P<span class="Apple-tab-span" style="white-space:pre"> </span>

.end
02-05-14, 12:43 p.m. Huzefa
First one is for cir.out and other one is for .cir
02-05-14, 12:45 p.m. Huzefa
Quick comment: You need to change the reference of PMOS and NMOS from Q to M. To do that, right click on the component and click Edit and edit the 'reference' from Q to M. Then carry out the usual steps of analysis insertion and netlist conversion.
02-05-14, 12:49 p.m. rakhiwarriar
02-05-14, 4:25 p.m. Huzefa
It is showing unable to find the defination of n-mos and p-mos
02-05-14, 4:25 p.m. Huzefa
Use the Model Builder to add models for NMOS and PMOS. 
02-05-14, 4:42 p.m. rakhiwarriar
How can i do it?

02-05-14, 5:03 p.m. Huzefa
You may want to go through the chapter on model builder on our book on Oscad - <a href="http://www.oscad.in/resource/book/oscad.pdf">http://www.oscad.in/resource/book/oscad.pdf</a>
02-05-14, 5:14 p.m. rakhiwarriar
I have to build model circuit for both NMOS and PMOS in my single circuit,because i m using both nmos and pmos(e.g NOT Gate by using NMOS and PMOS)?

02-05-14, 6:08 p.m. Huzefa
https://www.dropbox.com/sm/create/mos.zip I m not getting the output of this circuit. So please just check it.

02-05-14, 6:35 p.m. Huzefa
OK.
02-05-14, 7:28 p.m. rakhiwarriar
When I try to download the file,  I get a message "File not found". Re-upload and send me the link.
02-05-14, 10:47 p.m. rakhiwarriar
https://www.dropbox.com/s/niwnnr2krj0c91b/mos.zip
04-05-14, 8:01 a.m. Huzefa
After replacing Q1 and Q2 by M1 M2 respectively then i have gone for model builder then by clicking at 'FILE '-'NEW'. i entered the name of component M1(for MOS_P in which i have replaced Q1 to M1) and then check the radiobutton in for 'PMOS'. Similarly i have done the process for M2(for MOS_N.....). After doing this i have exported and imported the library.. Is it the right way which i have done ?
04-05-14, 8:07 a.m. Huzefa
https://www.dropbox.com/s/e8o5120xpx6k9a0/Screenshot%20from%202014-05-03%2020%5E%2516%5E%2501.png
04-05-14, 8:54 a.m. Huzefa
https://www.dropbox.com/s/zeq9qw2p2lo9nfh/Screenshot%20from%202014-05-03%2020%5E%2518%5E%2538.png
04-05-14, 9 a.m. Huzefa
After importing and exporting the above things happened(2 images)
Please Help me from above problem,
Thank you
04-05-14, 9:01 a.m. Huzefa
Quick comments: You have to add DC sources in place of Vdd and Vss components. You may want to have a look at Examples/sedra_smith/Chapter9 for an example of CMOS inverter.
Regarding model building - You need to go to Model Builder, click on File->New. Type mos_p. Select PMOS. Click on OK. Then you will get a window to add values to parameters. Click on OK when you are done. Now do a netlist conversion.
when you do the netlist conversion, the converter asks for a multiplicative factor - Please key in 1 as the value.
I have another question for you - How many parameters are there in the model for NMOS?

04-05-14, 9:11 a.m. rakhiwarriar
yaa i have looked in to that example... And for the parameters i m uploading the link of the snapshot.
04-05-14, 9:18 a.m. Huzefa
https://www.dropbox.com/s/6djpqqdnk609anj/Screenshot%20from%202014-05-03%2020%5E%2547%5E%2534.png
04-05-14, 9:23 a.m. Huzefa
You need not use the complicated model (this is a level 8 model). You can replace the NMOS.lib and PMOS.lib files in the /OSCAD/modeEditor folder with the ones uploaded here - http://www.fileswap.com/dl/f1WqIvHEgD/
You may want to keep a back up of these files before replacing. Once you are done replacing, go to schematic editor and generate netlist again. Now do the model building steps as I mentioned above. Give the length of MOSFET as 0.5u and multiplicative factor 1.
04-05-14, 10:19 a.m. rakhiwarriar
i dont have account in fileswap... And i have many doubts regarding this topics.
(1)-When i m using single NMOS for making NOT gate then following things happen-(giving 5v dc then it should print 0 as it is not gate but it is giving me output 4.983 and while i m giving 0v dc then it is giving me true ans as 5.00. It means it is giving me true ans for 1 case i.e for 0v not for 5v)
(2)-<span style="line-height: 1.428571429;">When i m using single PMOS for making NOT gate then following things happen-(giving 0v dc then it should print 5.00 as it is not gate but it is giving me output 5.12e-02 and while i m giving 5v dc then it is giving me true ans as 0.00. It means it is giving me true ans for 1 case i.e for 5v not for 0v)</span>
<span style="line-height: 1.428571429;">(3)-When i m using both NMOS and PMOS for making NOT gate then f</span><span style="line-height: 1.428571429;">ollowing things happen-(giving 5v dc then it should print 0.00 as it is not gate but it is giving me output 4.839 and while i m giving 0v dc then it is giving me true ans as 5.00. It means it is giving me true ans for 1 case i.e for 0v not for 5v)</span>
<span style="line-height: 1.428571429;">
</span>
<span style="line-height: 1.428571429;">
</span>
Please look at this problem
Because my all steps of model builder and Netlist genrating are right but output is not proper
In the above cases i have given the width, length and multiplication factor as default

04-05-14, 10:41 a.m. Huzefa
You need not have an account in fileswap to download this. Even I don't have one!

Please don't give W, L, M as default. (There is a bug.) Use the files that I gave. Please use these files and replace them in OSCAD/modelEditor. Give L = 0.5u, Multiplicative factor = 1 and give W = 100u
04-05-14, 11:06 a.m. rakhiwarriar
But how to use these files, I m not knowing?
<font color="#4e585f" face="Arial, sans-serif" size="2"><span style="line-height: normal; white-space: nowrap;">
</span></font>
<span style="color: rgb(78, 88, 95); font-family: Arial, sans-serif; font-size: 13px; line-height: normal; white-space: nowrap; background-color: rgb(234, 242, 247);">
</span>
04-05-14, 11:14 a.m. Huzefa
Yes. Please click on the Download option to download the zip file.
04-05-14, 11:16 a.m. rakhiwarriar
https://www.dropbox.com/s/jsinkivudbr4qok/PMOS11.lib
https://www.dropbox.com/s/fkvsueqyrlbl72e/PMOS%20.lib
https://www.dropbox.com/s/epnuvct0vdo4ixg/PMOS.lib

I have this PMOS library in my OSCAD/modelEditor. Similarly in NMOS.
Now what i have to do?

04-05-14, 11:25 a.m. Huzefa
Yes, I have replaced them.
Now, do i have to replace Q to M in Schematic Editor?
04-05-14, 11:28 a.m. Huzefa
Replace the PMOS and NMOS.lib files. Once you are done replacing, go to schematic editor and generate netlist again. Now do the model building steps and in netlist conversion Give L = 0.5u, Multiplicative factor = 1 and give W = 100u for NMOS and Give L = 0.5u, Multiplicative factor = 1 and  W = 300u for PMOS.
04-05-14, 11:28 a.m. rakhiwarriar
yes Q has to be replaced by M
04-05-14, 11:29 a.m. rakhiwarriar
Ok, I m trying for that
04-05-14, 11:30 a.m. Huzefa
Yes, i have done and bugs are removed but the above topics problem is not changed.. Still it is giving me the same answer as mentioned above...
04-05-14, 11:41 a.m. Huzefa
Did you have a look at how CMOS inverter is created in sedra_smith/Chapter 9? Did you add DC sources instead of Vcc and Vss?
04-05-14, 11:43 a.m. rakhiwarriar
yaa i have given DC Source only..
04-05-14, 11:50 a.m. Huzefa
Can u just try the Inverter by just PMOS or NMOS ... In that example they used both NMOS and PMOS .... And i have Design all these BY-[1. PMOS 2. NMOS 3. BOTH] .. But in all 3 cases it is giving me wrong ans for any 1 of (5v or 0v)
04-05-14, 11:53 a.m. Huzefa
yes, Problem related NMOS solved,It is giving me right answer.... Now two problems are left by-(PMOS and BOTH).
04-05-14, 12:27 p.m. Huzefa
                                                                      INVERTER
For Single NMOS-
5v-(w=100u,l=0.5u,factor=1)
0v-(Same as above for 5v)

For Single PMOS-
5v-(Keep default value)
0v-(w=300u,l=0.5u,factor=1)

For Both-
5v-(PMOS-Keep default values
      NMOS-w=100u,l=0.5u,factor=1)
0v-(Default for both PMOS and NMOS<span style="line-height: 1.428571429;">)</span>
<span style="line-height: 1.428571429;">
</span>
I have done the analysis by taking these values, then it is showing me 'correct answer'
Can u please tell me, these method is right for further any analysis related to PMOS and NMOS.?
04-05-14, 1:23 p.m. Huzefa
Actually, I did not understand your question. ..:)
By the way, when I said use W = 300u for PMOS, I meant that you should take PMOS width 3 times of that used in NMOS to make the drain currents same,
because the mobility of p carriers is only 1/3rd of that of n.
04-05-14, 2:13 p.m. rakhiwarriar
You are telling that PMOS width is  3 times the NMOS is true.. but if u will try the above my problem then u will face the problem of between the width and length of PMOS and NMOS.. I have  tried other examples too(i.e for AND NOR .. etc)then it is not showing me right ans...If m considering above width and length then only it is showing me right ans.
04-05-14, 2:53 p.m. Huzefa
<a href="https://www.dropbox.com/s/skgjqrwzu62tyz6/EXAMPLE-3.1.zip" target="_blank" title="https://www.dropbox.com/s/skgjqrwzu62tyz6/EXAMPLE-3.1.zip">https://www.dropbox.com/s/skgjqrwzu62tyz6/EXAMPLE-3.1.zip</a>

Please Verify this Example which i have done.
04-05-14, 3:11 p.m. Huzefa
In this example, you have not given M = 1. I told you there is a bug in the Netlist converter, which gives M=100u by default. So you SHOULD type M = 1 when asked for.
04-05-14, 3:20 p.m. rakhiwarriar
According to the values given by u for PMOS(w=300u,l=0.5u,M=1), NMOS(w=100u,l=0.5u,M=1), I m not getting the output as required. You can see this snapshot given below:
https://www.dropbox.com/s/da9ct39up05xfpa/1.png

But for the values which i have taken, the required output is coming for both HIGH as well as LOW.
The below snapshot is for LOW value:
https://www.dropbox.com/s/h24dy4t6naj3ap6/2.png

for HIGH value:
https://www.dropbox.com/s/9yjwizxtn4qr9lc/3.png

04-05-14, 3:52 p.m. Huzefa
Quick comments: You have connected drain of NMOS and source of  PMOS together!
 and when you use a PMOS and NMOS in different series/parallel combinations, the sizing (i.e., width) should be designed accordingly. You may want to refer to a book that explains how to do the sizing. And one more thing - in case of 0.5um technology (the one which you are using now) the DC supply is 3.3V and not 5V
04-05-14, 9:12 p.m. rakhiwarriar

Login to add comment


Log-in to answer to this question.