output of logic gate ?

Discussion in 'General Electronics Chat' started by Xufyan, Oct 4, 2011.

  1. Xufyan

    Thread Starter Member

    Aug 3, 2010
    114
    0
    Hello,

    Suppose i have an AND gate,
    one of its input is coming from another AND gate and the other input is from DC supply , i want the output of that AND gate to be dependent on the second input (DC supply input) and independent of the other input,

    like, if the input from DC supply is 4 volts the output must be 4volts,

    is this possible ??
     
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    See the attached for a discrete AND gate that will accomplish what you are talking about.
     
  3. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    There are many chips that will allow differences in power supply voltages and still interpret logic levels correctly. CMOS can do it to a small extent.

    If it is an extreme difference you need something called a logic converter, which can be a chip or a circuit.
     
  4. MrChips

    Moderator

    Oct 2, 2009
    12,452
    3,371
    Use an open collector or open drain output gate such as a 74LS07.
     
    Last edited: Oct 4, 2011
  5. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    IC's can be problematic to use with different voltage levels for inputs; you wind up having to use interface ICs or discrete components along with the IC.

    While the discrete component circuit I posted seems to have a lot of parts in it, it will work pretty reliably as long as both A and B inputs rise to 2v or more, and input A is higher than input B.

    D1 and D2 are to ensure that the input signals exceed ~1.3v before the output goes high. If you wish for input B to trigger at a lower voltage, D1 can be replaced by a straight piece of wire.
     
  6. Xufyan

    Thread Starter Member

    Aug 3, 2010
    114
    0
    is that possible to do this with OPamp comparator circuit ?
    like as long as the Input B is greater than input A , the output should be equal to input B ??
     
  7. MrChips

    Moderator

    Oct 2, 2009
    12,452
    3,371
    Here are two examples.

    [​IMG]

    The first circuit uses an open collector buffer. The analog input V is fed through the pullup resistor.

    The second circuit uses an analog switch. The logic input A is the control for the switch.
     
    Last edited: Oct 4, 2011
  8. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You could use comparators; that would work.

    [eta]
    See the attached.

    74 series and 4000 series ICs would be problematic, as 74 series want to see 4.5v to 5.5v for Vcc (74HC can go as low as 3v and as high as 6v) but you'd still have problems with the input B. With 4000 series, you really need to stay out of the indeterminate region, which is about 1/3 to 2/3 Vcc. You might get by with a Schmitt trigger input, like is available on a 4093 or 40106/4106, but Your Mileage May Vary with the non-Schmitt trigger input ICs.
     
    Last edited: Oct 4, 2011
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    From a PM:
    You need to specify some kind of a threshold for B. Right now, in the last schematic I posted, the output will be high if B >= 1/3 A.

    If you want some other threshold, you need to give some voltage value that can be used.
     
  10. Xufyan

    Thread Starter Member

    Aug 3, 2010
    114
    0
    this is what i am trying to do,

    look at the attach circuit , there are two log circuit on the left side then there is one subtractor and summing circuit in the middle and then antilog and then inverting circuit,

    suppose i have two switches , when switch 1 is on the two output of log circuit must be connect to the two input of summing opamp and when s2 is on the two output of log circuit must be connect to the input of subtractor, i was trying to do that with logic circuits but as you said this is not possible, what is the other way to do this ??
     
  11. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    WHY are you using 741 opamps? Terrible choice; they are ancient. Almost anything else would be better.

    The two opamps that have no reference designators (to the left of U9 and U12)
    have their OUTPUTS connected directly together. If they were real-world components, you would see those two opamps disappear in a blaze of smoke, flame and glory. In other words, you cannot have the OUTPUTs of two opamps connected together unless you wish to see smoke.

    If you want to use an analog switch, you can consider using a CMOS 4066. You will need to buffer the output, as a 4066 has ~150 Ohms impedance. The input signal cannot exceed the power rails.
     
  12. Xufyan

    Thread Starter Member

    Aug 3, 2010
    114
    0
    but LM741 is in our university course, subject name is Amplifiers and Oscillators and we are using LM741 everywhere as told by university
     
  13. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    I see.

    Well, you have done a very poor job of describing what needs to be done, as well as posting your inquiry in the wrong forum; this should be in the Homework Help section.

    I suggest that this thread be abandoned, and you start off again in the Homework Help thread, post your schematics showing what you have done, as well as your formulas, etc - and explain what you are trying to accomplish; what signals you need to see at the output.

    Without a thorough explanation up front, you will waste a lot of time; both yours and ours.

    Also, we cannot do your homework for you. We can help you when you are "stuck", but we are not a "do my homework" service.
     
Loading...