Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

XNOR circuit - Can any one build XNOR circuit

Status
Not open for further replies.
sxy,

The primary problem with that circuit is that it doesn't show how the inputs should be connected, and his breadboards show him using (SPST) pushbuttons connecting to Vdc to create 1-level inputs; but that means the inputs are not 0-level when the button is not pressed, but rather are left floating. That seems to work with the specific npn transitors that he is using, but not with the ideal npns provided by the falstad simulation.

Try this falstad implemetation. Note the use of SPDT switches to ensure 0-level inputs are at ground, not floating. Its still imperfect, but true to the circuit in the video you've been following.

You might also find this falstad sim interesting. It implements OR, AND, NOT, NOR, NAND, XOR and XNOR gates using at most one transitor. (teh OR and AND gate use none.)

Also note that the XNOR circuit is different to the rest in as much as the transitor is a PNP rather than NPN. It is -- the circuit -- drawn upside down (ground at the top; Vdc at the bottom) in order to demonstrate that it is the same circuit layout as the XOR circuit, but the direction of the diodes, transitor and power have been reversed. Ie. its a mirror image.

Enjoy.
 
Last edited:
BUK thank you for the circuits on falstad, but the first circuit you send me, is not working as xnor circuit.
When both inputs are low the led is not light up.
thanks a lot
 
Last edited:
When both inputs are low the led is not light up.
I did say:
Its still imperfect, but true to the circuit in the video you've been following.
The point being, the circuit you are using appears to be broken. Quite frankly I cannot see any way for that circuit to supply voltage to the LED when both switches are closed.

It's the internet, not everything you find is good. Look for a different source.
 
When the bottom input is off (and the upper input is on)
why the led don't light up?,
and also how the transistor near the led works in that state, that no current is apllied to its base.
I am reffering to the logic gates circuit not to the last.
thanks a lot.
 
Last edited:
Ignore the XNOR circuit in the logic gates; it was meant to serve a purpose, but it is bad.

This is the last one in all 4 states:

When both switches are off, there is a direct route from Vdc via R3 through LED to ground.

When SW1 is open (top right) current flows via D1 and R2 to the base of Q2, which turns on and provides a more direct route to ground for the current through R3; depriving it from the LED.

When SW2 is open (SW1 off; bottom right), the current flows via D2 and R2 to the base of Q2 with the same result as above.

When both SW1 & SW2 are on, both D3 & D4 are reverse biased, so D5 becomes forward biased and it provides a path for the current through R1 to the base of Q1; which switches Q1 on and providing a preferential route to ground for the current through R2, turning Q2 off.


1629548243745.png
 
In the XNOR gate when the bottom input is off ( and the upper input is high)
why there is no current from the 1K resistor to the led, although, there is a current flowing from the collector to the emittor of the rightmost transistor.
thanks a lot.
 
why there is no current from the 1K resistor to the led,
Put your mouse over the junction between Q1, R3 & the LED and look at the voltage shown in the grey box bottom right of the screen.
I see 30.056mV. The other side of the LED is at 0V.

0.030056V is not enough to turn the LED on. The default LED in falstad requires 2.228V
(Right click the LED; click "Edit"; click "Create New Simple Model" to see this.)
 
Last edited:
In the last 4 states, you confused in the last case: "When both SW1 & SW2 are on".
You switched beteeen Q1 and Q2.
thanks a lot.
 
Too much complexity.
LTspice simulation below of a simple, 3-transistor XOR, XNOR (for the LED) circuit:

EDIT: The circuit requires a 0V or 5V input for proper operation.
If the zero input is an open circuit then each input will need a resistor to ground (e.g 10kΩ or so).


1629570678079.png
 
Last edited:
In practice, that would blow the LED driver transistor as there is no current limiting for its base.
Add a series resistor to make it practical.
My post is just a (as best as I could) faithful reimplementation of crutschow's LTSpice circuit above, in falstad. It doesn't work (as an XNOR), so I didn't try to fix anything else.
 
In practice, that would blow the LED driver transistor as there is no current limiting for its base.
Nope.
The base doesn't need current limiting.
The LED driver is acting as a emitter follower so the base only takes the current it needs.
Even if it didn't, the base would be able to draw only the current that goes through the 10k resistor to ground.
 
My post is just a (as best as I could) faithful reimplementation of @crutschow's LTSpice circuit above, in falstad. It doesn't work (as an XNOR)
I trust LTspice, Falstad not so much.
Show us the Falstad simulation.
 
My post is just a (as best as I could) faithful reimplementation of @crutschow's LTSpice circuit above
Not so faithful.
I'm using a PNP to drive the LED, not an NPN.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top