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.

XOR and KYB power supply

Status
Not open for further replies.

volk

New Member
XOR and KYB power supply - help please

Hi all.
I'm quite a newbie at electronics. I bought a Fairchild 74HC86 quad XOR gate and built a circuit as seen in the picture.
For the power supply I use the same power supply as the standard PC kyb uses (I disassembled it and connected it to the computer) Vcc=4,78V.

The circuit doesn't seem to work though. I've tried several things, and if i connect Vcc to pins 9 ans 10 the LED shines up, but after I break disconnect pin 9 or 10 the LED shines for about 1/2 a second before going off.

Could there be a problem with the input current - from the KYB? It seems as if the chip is leaking???? :(
 

Attachments

  • vezje1.jpg
    vezje1.jpg
    13.1 KB · Views: 188
Last edited:
You have make the classic mistake that thousands had made.

74HC86 is a CMOS device and all its input pins are high impedance. That means you must "fix" the pin voltage at Vcc or ground and never to let them unconnected.

You can do that by directly connecting the pin to Vcc or ground or connect them using any 1K ~ 100K resistor.
 
I did that, and it isn't any better. I measured the input current though. It's 66mA, and the datasheet says it should not exceed 20μA.

Is there a way to lover the input current?
 
Even pin-10 needs a resistor to ground...when the button is open it's floating. 10K would work. If that doesn't solve it...disconnect the LED and Button (leave grounding pin-10 resistor)...with all inputs grounded and all outputs open, if you still get high current, you've let the "magic smoke" out and it's dead. :(

Ken
 
The max input leakage current for 74HCxx Cmos is only 0.1uA when its supply voltage is at its max allowed voltage of 6V. The current is less at 5V.
The max allowed output is 25mA but an output will try to sink or source 66mA if you don't limit the current.

All unused inputs must be grounded or be connected to the power supply voltage so they don't float.
 
Thanks for the answeres. If I understand the whole thing should look like this (attached pisture)

All resistors (except tle LED one) are 10K
 

Attachments

  • vezje3.jpg
    vezje3.jpg
    20.6 KB · Views: 177
Volk,

Attached is a schematic of what you need to do.

All unused outputs (3,6,11) are left open.

All unused inputs (1,2,4,5,9,12,13) must be tied to common or +5v, through resistors or directly (see examples in second schematic).

The button input (10) is tied to common through a resistor, so when the button is open it is pulled to common, and when the button is closed it is pulled to +5V.

The output (8) with the LED/resistor is OK.

If you are still getting high supply current with the LED off, the chip is toast.

Hope this helps.

Ken
 

Attachments

  • XOR.jpg
    XOR.jpg
    12.8 KB · Views: 176
  • Unused CMOS Inputs.jpg
    Unused CMOS Inputs.jpg
    7.4 KB · Views: 159
Last edited:
Thanks it's been a great help - the first chip got toasted, but since i know myself I bought 3 of them :)

I connected everything according to the scheme, and it WORKS - hurrrrray.

Just one other thing: when the button is not pressed the pin is connected to common, and when I press it it is connected to +5V?

What about if I want to connect pin 3 to pin 5? Will try some other stuff tomorrow, and I'm sure allot of now questions will arise.

What program are you using to draw the schematics?
 
Schematics should be saved as a very clear GIF or PNG fike type, not as a very fuzzy JPG file type.
 
volk said:
Thanks it's been a great help - the first chip got toasted, but since i know myself I bought 3 of them :)

I connected everything according to the scheme, and it WORKS - hurrrrray.

Just one other thing: when the button is not pressed the pin is connected to common, and when I press it it is connected to +5V?

What about if I want to connect pin 3 to pin 5? Will try some other stuff tomorrow, and I'm sure allot of now questions will arise.

What program are you using to draw the schematics?
Pin 3 is an output. Never connect outputs directly to either supply rail, as it may cause the release of the magic smoke.
 
Volk,

My schematics are composed in ExpressPCB software. It's a free program for schematic development and PCB layout. Downside is, you can only have the PCBs made at their board house. The schematic part is very easy to use and to create custom components. Also, it produces what I feel is the best looking schematics for "publication". I never liked the appearance of schematics from programs like Eagle and some of the simulation packages...but, then that's just me. ;)

https://www.expresspcb.com/

audioguru,

Thanks! :) I've been exporting from ExpressPCB in a Metafile format...opening the .emf file in Microsoft office Picture Manager...cropping the out ExperssPCB's standard frame...and saving as a .jpg, because I knew it was universally viewable. I just did a little trial, and exported a schematic in 600 DPI .bmp (866kb) format from ExpressPCB, opened in Picture Manager, cropped and saved as: .tif (15.4kb), gif (15.6kb), png (46.6kb) and .jpg (80.4kb). Zooming-in in Picture Manager showed no difference in resolution from the original .bmp image. I think the Metafile export was where I was loosing image quality.

Hate days when I don't learn something new. ;)

Ken
 

Attachments

  • Audio-Servo Amp1.gif
    Audio-Servo Amp1.gif
    15.6 KB · Views: 151
  • Audio-Servo Amp1.jpg
    Audio-Servo Amp1.jpg
    80.4 KB · Views: 147
  • Audio-Servo Amp1.png
    Audio-Servo Amp1.png
    43.7 KB · Views: 171
Hi Ken,
Your schematic looks pretty good even when it is a fuzzy JPG file type.
The JPG is lossy so it produces "fuzz" dots around every line.
GIF and PNG file types have no loss so are very clear.

I zoomed in and increased the contrast for this comparison:
 

Attachments

  • fuzzy JPG file type again.PNG
    fuzzy JPG file type again.PNG
    15.6 KB · Views: 177
So if I want to control 2 LEDS, and the first one is connected to the first XOR gate and the second one to the second XOR, and I want that the first one on untill i press the button. when the button is pressed the scond one should light up.

I hope I got the scheme right this time.
 

Attachments

  • vezje4.jpg
    vezje4.jpg
    12.4 KB · Views: 168
Reverse the position of the 10k resistor and the pushbotton switch. resistor to +5 and switch to common from pin 2.
**broken link removed**
Look near the bottom for th truth table for XOR...1 = +5v and 0 = Common. This should help you figure it out in thefuture.

Ken
 
KMoffett said:
Reverse the position of the 10k resistor and the pushbotton switch. resistor to +5 and switch to common from pin 2.
**broken link removed**
Look near the bottom for th truth table for XOR...1 = +5v and 0 = Common. This should help you figure it out in thefuture.

Ken
Ken, looks to me like he is right and you are wrong. Were you looking at the XNOR truth table?

EDIT: I am assuming the switch is normally open, as shown.
 
Last edited:
Volk...and Roff,

I owe you an apology. You were right and I was wrong. I've been sick for the last couple of days and for some strange reason yesterday morning I thought I was good enough to at least get online...and I defininatly wasn't. When they warn you about not to "operate heavy machinery", I never put a keyboard in that catagory. I woke up in the middle of the night, last night, wondering how I could have thought your circuit wrong? My wife now promises to hide the keyboard if I'm "under the influance" again.

Keep up the good work volk!

Roff, that may have been the XNOR floating in my head.

Ken
 
Last edited:
Ken I have stuck my foot in my mouth several times on this forum, and others. I have been able to extract it before being caught in most cases.
Don't you hate it when you realize your mistake in the middle of the night? You want to get up and fix it, hopefully before anyone sees it, but you're dog tired, so you just lie there awake, fretting about it. I've done that.
 
Hi Ken,
I was wondering why your very clear GIF schematic had only 15.6KB file size but the PNG had 44KB.
It is because the GIF is Black + white but the PNG is True Color.

I converted the PNG to Black + White and its file size dropped to only 8.7KB and it looks the same as before.
 
Roff,
It was like you were there last night. ;)

Uncle $crooge,
I'll have to play with that tonight.

Ken
 
audioguru said:
Hi Ken,
I was wondering why your very clear GIF schematic had only 15.6KB file size but the PNG had 44KB.
It is because the GIF is Black + white but the PNG is True Color.

I converted the PNG to Black + White and its file size dropped to only 8.7KB and it looks the same as before.

The PNG was probably true colour and the GIF was probably 256 colour.

GIFs support a maximum of 256 colours but they do support 16 colour and 2 colour modes although most image eding programs only use the 256 colour setting.

PNGs support 16 million, 65536, 16 and 2 colour modes but most programs only use 16 million by default.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top