Connect with us

[HELP] - Basic AND gate problem

Discussion in 'General Electronics Discussion' started by infernowheels, Jan 3, 2015.

  1. infernowheels

    infernowheels

    17
    0
    Jan 3, 2015
    I'm supposed to make an AND GATE for this circuit. My problem is that the DIP Switches seem to play no role in the circuit. Removing it still keeps the LED on. My goal is that the switches 1, 2 and 3 should be switched on before the LED will light up.

    BTW, I'm only allowed to use the LS7408 IC, 4 bit Dip switch, the battery, an LED and jumpers.
    No further resistors and whatnot.
     
  2. infernowheels

    infernowheels

    17
    0
    Jan 3, 2015
    IMG_20150103_081832.jpg
     
  3. Laplace

    Laplace

    1,252
    184
    Apr 4, 2010
    Look at the input of the 74LS08. It is biased HIGH by the 20K resistor. If the input is left open, the input is HIGH. Unless at least one of the inputs is taken LOW, both inputs are HIGH and the output is HIGH. So if all you have is a SPST switch, the switch must connect the input to GND.
    SN74LS08.png
     
  4. infernowheels

    infernowheels

    17
    0
    Jan 3, 2015
    Is this correct?
    [​IMG]
     
  5. davenn

    davenn Moderator

    13,289
    1,756
    Sep 5, 2009
    no, the switch isn't doing anything good. Its doing bad by short circuiting the power rail to ground as you have permanently grounded all the inputs

    remove the grey link wires and extend the blue ones to where the grey ones went to on the switch
     
  6. infernowheels

    infernowheels

    17
    0
    Jan 3, 2015
    I've done as you said and it works. However, shouldn't the switches be at "ON"?
    [​IMG]
     
  7. Laplace

    Laplace

    1,252
    184
    Apr 4, 2010
    Well, it could be 'NO'. Just mark a 'YES' (logical TRUE) on the other side of the switch.
     
    BobK likes this.
  8. infernowheels

    infernowheels

    17
    0
    Jan 3, 2015
    Okay then, Thanks!
     
  9. Ratch

    Ratch

    1,042
    306
    Mar 10, 2013
    Wouldn't putting 2 switches in series make a 2 input AND gate? Four switches in series make a 4 input AND gate.

    Ratch
     
  10. BobK

    BobK

    7,626
    1,654
    Jan 5, 2010
    This reminds me of a story told by my high school physics teacher.

    On the final exam was the question:

    How can you measure the height of a building using a barometer?

    His best student answered:

    You take the barometer and go up each flight of stairs marking off each length of the barometer on the walls. When you get to the top, you know the height in barometer lengths.

    The teacher, knowing he was being a wise-ass gave hit another chance. He modified the question to use a barometer and a physics formula to measure the height.

    The student came up with another solution to the modified question:

    Go to the top of the building and tie a string to the barometer, lower it until it reaches the ground then raise it an inch or so. Have a partner start it swinging, then measure the period with a stopwatch. Then use this formula (omitted) to calculate the height.

    The professor gave up and gave him full credit.

    Then the student said, "well if you didn't like that one, I had several more ideas."

    I don't remember all of them, but the best one was:

    Go to the top of the building. Drop the barometer and start a stop watch. Stop the watch when you hear the barometer hit the ground. The calculate the height the (formula omitted). The formula, of course, included the correction for the speed of sound of the crashing barometer reaching the student on top of the building.

    Bob
     
  11. Laplace

    Laplace

    1,252
    184
    Apr 4, 2010
    But then how could that drive the LED without a current limiting resistor?
     
  12. Ratch

    Ratch

    1,042
    306
    Mar 10, 2013
    The current limiting resistor is not part of the logic circuit. Do what you have to do to keep the LEDs safe from the applied voltage.

    Ratch
     
    davenn likes this.
  13. Laplace

    Laplace

    1,252
    184
    Apr 4, 2010
    Then read the problem definition more carefully. One cannot do what you have to do to keep the LEDs safe while using the switches in series.
     
  14. Ratch

    Ratch

    1,042
    306
    Mar 10, 2013
    I was concerned only with the logic, not with the hardware.

    Ratch
     
  15. davenn

    davenn Moderator

    13,289
    1,756
    Sep 5, 2009
    That's really a side issue and not part of the logic problem initially discussed --- ie. why isn't the gate working

    note the OP doesn't even have a current limiting resistor on the output of the gate ... he probably should to protect the gate output transistors
    ( said with not knowing how much current they can source/sink)
     
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

-