Hello I'm having trouble with Proteus to do this CMOS logic simulation, I used transistors, I can do the logic perfectly, but when I use CMOS for some reason the logic doesn't work. I used the methods of feeding voltage or applying a digital signal and it still doesn't work. Is there any modification that I must do on top of the component?
3 Answers
Your image from Sedra & Smith doesn't indicate which terminal is the source because it doesn't need to. The PMOS source is by definition the terminal at the higher voltage. Also, the body will be connected to the highest voltage in the circuit, whether that happens to be the source or not.
Your schematic uses MOSFETs with the source tied to the body. If you use those transistors you must connect the source to the higher voltage point. Your MOSFETs Q1 and Q2 must be flipped source/drain.
You should really be using a 4-terminal MOSFET if you want to simulate these circuits properly.
First of all, the way you had drawn the BJT (bipolar) NAND gate was wrong. The topology was wrong, and your Q5 and Q6 were drawn upside down, and to top it all off: you need base resistors. The circuit won't work without base resistors, since the E-B diode of Q5 would conduct in series with B-E diode of Q7, causing a short circuit.
Secondly, you've drawn Q1 and Q2 upside down. I've drawn them correctly below, using symbols that include the body diodes. As you can see, when Q1 and Q2 are upside down, their body diodes are forward-biased and conduct, so effectively Q1 and Q2 are conducting no matter what their gate voltage is.
Now, the schematic below can be simulated and is interactive: just click on the "0" and "1" buttons, press space, and they toggle, and you can immediately see the results.
You will note that the bipolar (and only bipolar!) version of the gate will still work if you flip the transistors upside down - with a caveat: the output must not be loaded. As soon as you load the output using the current source I1 - just 5mA is sufficient - the output will not be correct anymore.
That's because when the bipolar transistors are "upside down", they still work, but have a very low current gain. The base resistors can drive about 0.5mA into the bases. Since the current gain is very low - usually between 1-5, the base current multiplied by the gain is insufficient to overcome the load current.
simulate this circuit – Schematic created using CircuitLab
You should be able to redraw the schematic above in Proteus, and I guarantee that it will work - as long as you don't make any mistakes. It'll also work if you assemble it on a breadboard, using "reasonable" mosfets like the BSS138/BSS84 (N/P channel, respectively).
Since this site has integrated CircuitLab, you can use it to experiment - for such simple circuits, it's much nicer than Proteus.
-
\$\begingroup\$ As per the qeustion, the circuit is NAND, while yours is NOR. \$\endgroup\$ Aug 5, 2022 at 6:51
-
\$\begingroup\$ I don’t have a clue what the original circuit was meant to be, sorry. \$\endgroup\$ Aug 6, 2022 at 17:25
You need to invert Q5 and Q6
PNP transistors source current with the emitter on the positive side.
-
\$\begingroup\$ My problem is not the transistors. My problem is MOSFET'S. They are not working. The rest leaves as a demonstration. \$\endgroup\$– LUFERFeb 1, 2021 at 1:14
-
-
\$\begingroup\$ Disagree, see the source. '''''Microelectronic Circuits- SEVENTH EDITION - SEDRA/SMITH - page 1096 \$\endgroup\$– LUFERFeb 1, 2021 at 1:54
-
\$\begingroup\$ @LUFER Regarding Q5 and Q6: the transistors might "work" the way you've drawn them because bipolar transistors can be used that way in special applications. They have a very low current gain, but also a lower saturation voltage. The circuit may appear to work, but it works very poorly. You've drawn Q1 and Q2 upside down just as you did Q5 and Q6. So I'm thinking the mistakes are all yours. At least you were consistent :) \$\endgroup\$ Apr 17, 2022 at 8:44
-
\$\begingroup\$ @LUFER And just to set the record straight: p.1096 of Sedra&Smith 7th ed. does not show any bipolar transistors. Q5 and Q6 you got wrong is your own idea, or maybe you copied it from a diagram with a mistake. Q1 and Q2 are drawn using discrete MOS symbol, not used in Sedra&Smith. So you had to guess how to connect those, and you connected them upside down. S&S uses symmetric symbols that take understanding to translate into discrete symbols. \$\endgroup\$ Apr 17, 2022 at 8:46