Connect with us

BJT vs MOSFET for logic gates help

Discussion in 'General Electronics Discussion' started by Tristan369, Nov 19, 2020.

Scroll to continue with content
  1. Audioguru

    Audioguru

    2,999
    672
    Sep 24, 2016
    Tristan, do not read all the errors said by Ratstar.
    Tristan, since you want a non-volatile memory, then instead of randomly making one that has an extremely small capacity, buy a non-volatile memory chip? My camera and cell phone use very small low current non-volatile memory modules.
     
  2. Tristan369

    Tristan369

    29
    7
    Oct 29, 2020
    Ok a few last questions, so now I'm interested in CMOS haha. I learned how to make logic gates with CMOS and it doesn't seem very hard and according to wikipedia it is 100,000 times more energy efficient than equivalent BJT circuits. And I really like the idea of not using resistors or voltage division for some reason.

    So as I understand, the point of CMOS is so that the output is either high or low, instead of being either high or floating, right? So like in this image here https://www.oreilly.com/library/view/introduction-to-digital/9780470900550/images/ch005-f007.jpg the output will be either high or low, but not the input, so if that input weren't connected to the output of another CMOS logic gate, it would need a pull down resistor? So there needs to be at least one pull-down resistor in any CMOS circuit?
     
  3. Nanren888

    Nanren888

    346
    90
    Nov 8, 2015
    Like you said, each input is connected to high or low, never floating.
    You can arrange this any way that suits.
    .
    Normally it would be driven from some other output, such as an oscillator or similar. Another example would be a digital output sensor. Internal circuitry derives a digital representation of the correct output and that's what the next gates see. Internally things might be driven by comparators, that always drive high or low.
    .
    Yes, if for example you scanned a keyboard with cmos gate inputs, you'd likely have pull ups, or downs somewhere.
    .
    Actually if you leave a normal cmos input floating, bacuse the input impedance is so high, it will oscillate with any stray field. At that point the cmos will often get hot as it's spending all its time switching.
     
    Tristan369 likes this.
  4. Tristan369

    Tristan369

    29
    7
    Oct 29, 2020
    Ok so now I am running into a problem where I can't have one MOSFET power another because they just share capacitance or something. Here is an image to illustrate it MOSFET_help5.PNG

    The circuit on the right stays on no matter what. It would seem the only solution is voltage division but that destroys the entire point of using CMOS.
     
  5. Bluejets

    Bluejets

    4,277
    908
    Oct 5, 2014
    Cmos acts the same as other logic with the same requirements as far as floating inputs.
    It is a high impedence circuit so low current.
    I don't know what this obcession is that you have with "efficiency" is all about.
    Use resistors where required, it's not going to break the back of any power supply.
     
    Tristan369 likes this.
  6. Audioguru

    Audioguru

    2,999
    672
    Sep 24, 2016
    Tristan, why do you use the Source of your Mosfets as the output instead of using the Drain as the output like in Cmos circuits?
    What is the "C" in Cmos? It is "Complementary" which is P-channel and N-channel, not just one type.
    Here is a Cmos inverter that draws almost no current if it does not run fast:
     

    Attached Files:

    Tristan369 likes this.
  7. Tristan369

    Tristan369

    29
    7
    Oct 29, 2020
    Oh I see, so everything has to be NOT gates? Is there any CMOS NOT-NOT gate? lol Do you have to put two in a row if you want voltage to pass through the output with a high input? I guess it's arbitrary which is high and low in my case but still. And so N type MOSFET's don't really even work together unless combined with P types? I looked up NMOS and it uses P type MOSFET's too.

    Ya check it out I converted one of my basic bjt designs into a CMOS and it only uses 1.5uA. I don't know why but that is really cool to me. Totally worth the extra cost in transistors. MOSFET_help6.PNG
     
    Last edited: Nov 21, 2020
  8. Audioguru

    Audioguru

    2,999
    672
    Sep 24, 2016
    Why don't you look at the datasheets for Cmos ICs?
    A CD4001 has 2-inputs NOR gates.
    A CD4071 has 2-inputs OR gates.

    Did you notice that there are no diodes and no resistors on real CMOS logic gates?
    Why are your inputs on the right side but everybody else has the inputs on the left side?
     

    Attached Files:

    Tristan369 likes this.
  9. Tristan369

    Tristan369

    29
    7
    Oct 29, 2020
    That is true, my SR latch needs to look like this apparently
    SR-latch-designed-by-CMOS-logic.png

    I just made it the way I make them with BJT's which works but it needs those diodes. So the 2n7000 is a small N channel MOSFET, do you know of any p channel MOSFET's that are that same size? And thank you I will definitely check out those datasheets.
     
  10. Tristan369

    Tristan369

    29
    7
    Oct 29, 2020
    Check it out I was able to make the SR latch part of my non-volatile memory design CMOS and it draws much less power. There would have been two more pull down resistors if I used straight BJT's. It keeps the capacitor charged while on at a higher voltage than my BJT design, but it takes way longer to charge and discharge the capacitor. Any advice would be much appreciated.
    MOSFET_help7.PNG
     
  11. ratstar

    ratstar

    270
    11
    Aug 20, 2018
    how did u fix it? by guarding the ground with another mosfet?
     
  12. Nanren888

    Nanren888

    346
    90
    Nov 8, 2015
    I've seen three conventions.
    Electronics (Most ocmmon): Power, often positive, at the top, ground, or negative at the bottom. A sense of up is higher potential. Signal flow, usually left to right.
    Physics texts: Power supply potential is left to right, (Battery at the top) Signal flow, well often rather confused seeming but tending left to right..
    Yours: Cannot fathom the trend in the supply, potential.
    :)
    Is there a "Q" somewhere?
     
    Last edited: Nov 21, 2020
    Tristan369 and Harald Kapp like this.
  13. ratstar

    ratstar

    270
    11
    Aug 20, 2018
    + and - at the bottom, and then its like an enclosed feedback machine, like an oscillator, except its a register instead, they are similar. I figure thats why they call em flip flops, cause you just invert the logic polarity of them then they oscillate, the astable multi-vibrator is a similar situation.

    the set and reset is at the bottom as well.
     
    Last edited: Nov 21, 2020
  14. Tristan369

    Tristan369

    29
    7
    Oct 29, 2020
    Haha I basically just made it and then brought power and ground to everything to use less wire (mainly for cleanliness). The power and ground sort of both wrap around the whole thing. The ground looks like the letter C, and power looks like a backwards letter C. Left on my own I always do things the opposite as the way most people do it haha. OR like I'll find a super complicated and convoluted way of doing what is a really simple thing.
     
    ratstar likes this.
  15. ratstar

    ratstar

    270
    11
    Aug 20, 2018
    Its funny that you call this simple, I dont call any of it simple, I cant even get my oscillator to work... What's your finished product going to be? (Im making high hz'ing analogue physical logic physics engine simulator!!! Its gonna make me millions. just need to get things working.)

    Theres so much you can make once u understand electricity properly, the world is your oyster.
     
    Tristan369 likes this.
  16. Tristan369

    Tristan369

    29
    7
    Oct 29, 2020
    At first I was just trying to make a calculator and then I had a sort of eureka moment when I realized how computers work and how simple they actually are and now I want to make my own 8-bit computer and ISA with modular PCIE RAM and logic cards. And of course lots of blinking LED's. I'd even like to make a multiplex display that just connects as RAM basically. I think if I had an add function, subtract, jump, and a few others like making one register equal another, I could just about compute anything with enough memory. I'm basically making one of these or like Ben Eater's but with transistors instead of logic gate IC's.

     
    Last edited by a moderator: Nov 22, 2020
    ratstar likes this.
  17. ratstar

    ratstar

    270
    11
    Aug 20, 2018
    Hes got a secret panel on the back that makes it run at 100 gigahertz I bet. *tap the nose*
     
  18. Nanren888

    Nanren888

    346
    90
    Nov 8, 2015
    Go for it.
    The megaprocessor has quite a number of registers when you get down to it.
    Might want to read up on "RISC" designs to get an idea of how small you can go.
    .
    Why 8-bit?
    Have used 4-bit processors in the past. Can be just as much fun.
    .
    BTW: Instruction set width does not have to match data width, depending on the architecture that you choose.
    I think there is a "projects" forum.
     
  19. Harald Kapp

    Harald Kapp Moderator Moderator

    10,591
    2,360
    Nov 17, 2011
    I'll take that bet, sure to win.
     
  20. Harald Kapp

    Harald Kapp Moderator Moderator

    10,591
    2,360
    Nov 17, 2011
    You and @ratstar aren't siblings, are you?
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-