output of logic gate ?

Thread Starter

Xufyan

Joined Aug 3, 2010
114
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 ??
 

Wendy

Joined Mar 24, 2008
22,164
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.
 

SgtWookie

Joined Jul 17, 2007
22,220
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.
 

Thread Starter

Xufyan

Joined Aug 3, 2010
114
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 ??
 

MrChips

Joined Oct 2, 2009
21,880
Here are two examples.



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:

SgtWookie

Joined Jul 17, 2007
22,220
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.
 

Attachments

Last edited:

SgtWookie

Joined Jul 17, 2007
22,220
From a PM:
Xufyan said:
http://forum.allaboutcircuits.com/showthread.php?t=60213

I know how [a] comparator works like if Vi > Vref the output is Vcc and if Vi < Vref the output is -Vcc but if Vi = Vref the output is Zero ,

OK, now I want this,
If input A is greater than B, the output should be 'B' , and let me tell you that in my circuit input A will always be greater than input 'B' so is it possible to do so with comparator ?
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.
 

Thread Starter

Xufyan

Joined Aug 3, 2010
114
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 ??
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,220
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.
 

Thread Starter

Xufyan

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

SgtWookie

Joined Jul 17, 2007
22,220
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.
 
Top