Academic question about wiring a logic gate from discrete MOSFETs - Page 1
Forum section: electronics / beginners

author: JoeN
author_rank: Frequent Contributor
timestamp: March 14, 2015, 05:36:35 am
content: I want to wire up a few gates from discrete MOSFETs. I am using 2N7000s and BS250s if that matters. Did the inverter, that works. Now I am going to do an AND gate and I notice something that is a little weird on the schematic that I find everywhere for how to do this:One of the MOSFETs, Q3, is wired as a four-terminal device with the body detached from the source. Is that a show-stopper for doing this with discretes? Looking at the schematic, it feels like the gate should still work just forgetting about that body connection. Will it? If so, why and if not, why not?Maybe I should just not be so lazy and wire this and see if it works or not.

author: ataradov
author_rank: Super Contributor
timestamp: March 14, 2015, 07:02:27 am
content: It will work either way. The reason it is shown this way is that when you actually make a chip on a single p-type substrate, you automatically end up with bodies of all NFETs connected together. PFETs are usually also connected together, but this is mostly for ease of manufacture reason.It does not matter for simple gates, but may matter for more complex logic circuits and other analog trickery.

author: ataradov
author_rank: Super Contributor
timestamp: March 14, 2015, 07:12:50 am
content: And just in case you want to play with gutted "real CMOS" device, there is a funny chip CD4007. They are not that expensive and are fun to play with if you are learning about CMOS logic.

author: JoeN
author_rank: Frequent Contributor
timestamp: March 14, 2015, 07:35:55 am
content: Quote from: ataradov on March 14, 2015, 07:12:50 amVery cheap. TI still makes it. Looks like they took over this IC from Harris a while back. 27 cents reel price.http://www.ti.com/product/CD4007UBThanks for the other pointers too.

author: SeanB
author_rank: Super Contributor
timestamp: March 14, 2015, 08:05:54 am
content: The 4007 makes a pretty good analogue part as well. It is not a digital device, more like a nice matched analogue fet set that you can even use for digital work.

author: amyk
author_rank: Super Contributor
timestamp: March 14, 2015, 04:08:39 pm
content: If you really want MOSFETs with separate bulk terminals, they're available:http://www.nteinc.com/specs/400to499/pdf/nte464.pdf...but quite expensive.

author: Zero999
author_rank: Super Contributor
timestamp: March 14, 2015, 08:18:56 pm
content: http://wiki.analog.com/university/courses/electronics/electronics-lab-28#build_cmos_logic_functions_using_cd4007_array

author: free_electron
author_rank: Super Contributor
timestamp: March 16, 2015, 05:47:30 am
content: The reason for this is that the two mosses share the same well.A well is a doped region in the wafer. A well can be N or P doped.The wafer itself is intrinsic (not doped)Those two transistors really dont exist as separate elements.What we do i simply create a well and put as many gates across as we need. If we need a four input logic port we simply put four gates (mosfet gate) side by side. The piece between the gates is then the drain of one and source of the next one.

author: rs20
author_rank: Super Contributor
timestamp: March 16, 2015, 05:57:50 am
content: Just to reiterate: As mentioned briefly earlier, in many (most?) cases, these circuits will work absolutely fine with normal, discrete, 3-terminal MOSFETs. Most circuits I found didn't have the body connection drawn at all:Why? Because whether you connect the body to the local source or the global GND/VSS, the circuit generally behaves identically, at least in straightforward digital stuff. So the body isn't really worth drawing at all, and you can just build it out of discrete FETs.Exercise: use your knowledge of discrete FETs, and simulate on paper what that circuit will do for all four input permutations. Figure out Vgs for each transistor, is it on or off, etc etc. You can thus prove all of this stuff for yourself.

author: Zero999
author_rank: Super Contributor
timestamp: March 16, 2015, 08:53:46 am
content: I don' think anyone except for the original poster said it wouldn't work with discrete MOSFETs.It's just much cheaper to use the CD4007 which is also a handy IC to have around for analogue electronics.You can build a nice op-amp with the CD4007 plus a some BJTs or just use two CD4007s.

author: rs20
author_rank: Super Contributor
timestamp: March 16, 2015, 09:17:10 am
content: Sorry, by "people feeling confused", I meant any future people who scan through this thread and miss the first sentence of message #2. Everything participating in this thread is on board, I knowEdited message accordingly.

author: JoeN
author_rank: Frequent Contributor
timestamp: March 20, 2015, 07:05:39 am
content: Quote from: Hero999 on March 16, 2015, 08:53:46 amReally? What I recall saying, having just now copied it from the original message was this:Quote from: JoeN on March 14, 2015, 05:36:35 amBut I did ask if it would work or not just to be sure.P.S. I was able to get INVERT, AND, and OR gates to work out of these discrete transistors no problem.

author: Zero999
author_rank: Super Contributor
timestamp: March 20, 2015, 08:42:29 am
content: Quote from: JoeN on March 20, 2015, 07:05:39 amNote I said everyone but the original poster which is you!Did you have any problems with any of the circuits?

author: JoeN
author_rank: Frequent Contributor
timestamp: March 20, 2015, 11:23:45 pm
content: Quote from: Hero999 on March 20, 2015, 08:42:29 amNo problems with the 3 circuits referenced here which were INVERT, AND (and NAND obviously prior to the inverter stages), and OR (and NOR ...) . I went on to try a flip flop and had problems with that which the community here explained so I am reworking it but came up short on p-channel signal MOSFETs to complete that so I am waiting for a few more from an eBay seller. I have a bunch of power P-channel MOSFETs but I don't even want to mess with those.