Logic gates(Schematics)

Discussion in 'The Projects Forum' started by Zanac-X, Jul 13, 2013.

  1. Zanac-X

    Thread Starter Member

    Dec 23, 2011
    51
    1
    hello everyone :)

    my project is to assemble all the gate circuits in one pcb but using only the fundamental components (resisters diodes etc) and i was wondering (using my attachment pic) :

    1- is there any other circuit that is simpler and/or more economic/higher "η" ?
    2-can i make my schematic design more compacted (im having trouble with the XNOR and XOR gates)

    my ultimate goal is to have the perfect sheet that can help any student to understand the fundamental of logic gates and how it can be connected to give complex logic circuits

    thanks very much for helping
     
  2. panic mode

    Senior Member

    Oct 10, 2011
    1,320
    304
    for once, get rid of all the duplicate power sources. they are all referenced to same point so there is no reason to have 5-6 of them.
     
    • XOR.png
      XOR.png
      File size:
      7.9 KB
      Views:
      51
    Zanac-X likes this.
  3. Zanac-X

    Thread Starter Member

    Dec 23, 2011
    51
    1
    awesome :D

    thanks for the pic that was a lot of help now all i need is to simulate it ;)

    about the power sources i know it represents the same point but i kept it that way so that it can explain how the circuit works or because it will give a more compacted circuit design without using (from-to) points
     
  4. DickCappels

    Moderator

    Aug 21, 2008
    2,651
    632
    Further, try to make your schematic representations more conventions. Put the most positive potential at the top of the schematic, use a ground symbol and consistently show signal flow from left-to-right. Draw the inverting transistors with the emitter grounded and the base connection going to the left. That will go a long way toward making this more readable.

    In my own opinion, it would be best to not show the inputs connected to the power supply or ground, but left "floating" so the reader can more easily imagine what effect having each input high or low would have on the output.

    Looks like a fun project.
     
    Zanac-X likes this.
  5. Zanac-X

    Thread Starter Member

    Dec 23, 2011
    51
    1
    Thanks very much i will gladly fallow your advice now that you have mention it,it is easier to make the input signals flouting.but now that i have simulated it my circuits need a ground even if i make it a floating point in a real pcb the thing is when representing logic zero the circuit can not function without ground connected to the source representing the input signal, and the floating point(power rail) only have one pin so now im asking :

    im i missing something here because im assuming that when i turn of the switch to give a logic zero im just connecting to ground right ?

    sorry for troubling you and thanks very much :)
     
  6. WBahn

    Moderator

    Mar 31, 2012
    17,724
    4,788
    You don't indicate where your output of each circuit is. Since you are saying that the point is to make it easy for students can use these to build up more complex logic circuits, it is important that they see how they are supposed to connect these together.

    For instance, how would someone take your circuit for an OR gate and your circuit for a NOT gate and put them together to form a 2-input NOR gate?

    You gates have switches as input and photons as output. But to be useful to interface together, you need to have compatible inputs and outputs.
     
  7. LDC3

    Active Member

    Apr 27, 2013
    920
    160
    If you still want to use switches as the input, you can use a SPDT switch and have one pole connected to Vcc and the other to ground. The common will be the signal into the circuit.
     
    Zanac-X likes this.
  8. Zanac-X

    Thread Starter Member

    Dec 23, 2011
    51
    1
    thank you all for everything :D :

    this is the last update to my sheet, although I've found a way to simulate the circuit using signals instead of sources but i kept it as it is to give students the ability to fallow the circulation of current in each circuit

    thank you very much for your help and i'll be glad if you can help me with making it even more compacted .

    Zanac-X
     
  9. panic mode

    Senior Member

    Oct 10, 2011
    1,320
    304
    no, that is terrible idea... you do not want to put switches in parallel with voltage sources - ever!
    also the XOR gate circuit is wrong, you switched emitter and collector
     
  10. Zanac-X

    Thread Starter Member

    Dec 23, 2011
    51
    1
    thanks for telling me but may i ask why not to connect a switch parallel to a source as my simulation is done as in real life with explosion happening if something is wrong so............

    also i did not get correct results until i flipped the transistors maybe you should try to simulate it and see if something is wrong :)

    im using circuit wizard as a simulator
     
  11. panic mode

    Senior Member

    Oct 10, 2011
    1,320
    304
    just use simulation to measure current through switch and try to estimate suitable wire size... since you are college student (dept. of electrical power) ask your professors for assistance. i'd love to see their faces when they see the circuit. :-D

    as for simulation - i do not need one as this can easily be calculated in head (at least for simple circuits and this one is a no-brainer):

    we are dealing with digital circuits so transistors are expected to operate as switches.

    you have 5V and 9V sources.

    main current through transistors is collector-emitter (base current is much smaller and neglected).

    to light up LED you have to get it' cathode to potential lower than anode (lower than 9V - Vf).

    the way you drew it, that lower potential is +5V. so if either transistor conducts we get 9V-5V = 4V across LED and it's resistor. if LEDs Vf=2.3V then LD current is
    (4V-2.3V)/220 Ohm = 7.7mA which is ok.

    but for this to work, (and you are using NPN transistors) emitter would have to be on lower potential than collector. but since collector is at 5V and emitter can only be between 5V and 9V this is impossible.

    i do not need simulator for such trivial things. note BJTs also have beta in reverse but it is much smaller than forward beta. suppose forward beta is 100 and reverse beta is 5.

    then if you had transistors in normal orientation, Ib = (5V - 0.7V)/10k = 0.43mA
    and Ic= 100*Ib = 43mA. But this cannot happen since Ic is limited by LED and resistor to 7.7mA so transistor is in saturation (good).

    but if transistor is in reverse (as you have shown) then we must use reverse beta so Ic=5*Ib=2.1mA and since 2.1mA<7.7mA transistor is not in saturation (not working as a switch).

    normal LEDs are rated for 20mA but 10mA will be just fine. 7.7mA will still look ok but 2.1mA will be very dim.

    with slight modification (for example using spdt buttons on inputs and 5V supply), you would get almost 5V across LED and resistor and some 12mA. if you stick with 9V then LED current would go to 30mA and we don't want that in continuous mode.
     
    Zanac-X likes this.
  12. panic mode

    Senior Member

    Oct 10, 2011
    1,320
    304
    note, if you do not plan on using inputs and outputs on gates then all of these circuits can be much simpler!!!
     
    Zanac-X likes this.
  13. WBahn

    Moderator

    Mar 31, 2012
    17,724
    4,788
    But he IS planning on this, otherwise it defeats his stated purpose from his original post: "my ultimate goal is to have the perfect sheet that can help any student to understand the fundamental of logic gates and how it can be connected to give complex logic circuits."
     
    Zanac-X likes this.
  14. WBahn

    Moderator

    Mar 31, 2012
    17,724
    4,788
    Would you ever take a metal wrench and short the terminals of your car battery?

    Hopefully the answer is no.

    Shorting a voltage source results in the largest current that the source is capable of producing, being limited only by the intermal resistance (or limiting circuitry) of the source. For many sources, even small batteries, that current can be high enough to dissipate enough power to result in a fire or an explosion (many batteries give off hydrogen gas as a normal byproduct of operation and the higher the current the faster the gas is given off).
     
    Zanac-X likes this.
  15. Zanac-X

    Thread Starter Member

    Dec 23, 2011
    51
    1
    :D fair enugh.....you have all the right to say that but let me explain :

    1st : thank you very much for your help it really means a lot :)

    2nd : we dont have "professors" we have teachers whom i like to call "copy cats" as they just copy pages from the first book they see and just repeat some fancy words so that they can sound awesome (and one time a teacher said that we can connect a negative resistance [as in real resistor] to balance a Y-connected load)

    long story short i live in a contry that just wont admit that you are right and if i showed it to my "teachers" they will not get whats in the sheet (i did really try that with some old pojects) and they will say one of two things :

    1-good good excellent keep up the good work :rolleyes:
    2-wrong go simulate it again :mad:

    so im really trying to catch up with what im supposed to study thats why im studying the chapters of this site

    so now i hope you can understand the level that im at (im trying to become a real electrical power engineer on my own) and im really sorry if im asking silly Qs :)

    3rd : with what you have said (which no makes me feel better about what ive done, i will try to fix it

    thank you very much for the explain
     
  16. Zanac-X

    Thread Starter Member

    Dec 23, 2011
    51
    1
    panic mode : of course,now that you have explained whats going on (which is just what i needed) now i can work properly

    and yes i was thinking of using SPDT switches but i thought im just Exaggerating and i just needed a normal switch to get the job done

    thank you very much im really glad for the help
     
  17. Zanac-X

    Thread Starter Member

    Dec 23, 2011
    51
    1
    WBahn : ok now i admit........im an idiot..........i know that but i just didnt see it.

    thanks for telling me
     
  18. WBahn

    Moderator

    Mar 31, 2012
    17,724
    4,788
    Not necessarily an idiot. You are asking the questions, which shows you want to learn. Like everyone, as you learn about A and learn about B, you tend to put the pieces together a bit at a time and so don't see how A and B relate to each other right away. Sometimes the connection becomes apparent on its own, and other times it needs to be pointed out. As an engineer the first thing that you need to be able to do is to ask the right questions, only then can you start finding the answers.
     
    Last edited: Jul 18, 2013
    Zanac-X likes this.
  19. Zanac-X

    Thread Starter Member

    Dec 23, 2011
    51
    1
    i think its done........how about you guys ?
     
  20. WBahn

    Moderator

    Mar 31, 2012
    17,724
    4,788
    But, as I said a long time ago, if your goal is to show how simple gates can be used to build complext logic circuits, how do these circuits accomplish that? How do you connect these gates together? Your inputs are switches and your outputs are LEDs.
     
    Zanac-X likes this.
Loading...