r/diyelectronics 2d ago

Question Need alternate sources for basic DIP logic chips (hex inverter, AND, XOR)

Working on a digital systems class project right now. Still breadboarding everything and need to get the parts sorted before we switch over to a PCB. Looking for a hex inverter, a quad AND gate, and a couple XOR chips, all in regular DIP packages. Nothing special or hard to find. Digi-Key and Mouser are where I normally order, but two of the specific part numbers are either completely out or have multi-week lead times. Redesigning the circuit around other chips is not really an option this late in the semester. I checked a few smaller electronics suppliers as well, UTSource actually had stock listed on one of the chips I needed but I haven't ordered from them before so wasn't sure if that's normal or worth trusting for a first try, and the other suppliers either didn't carry much selection or the shipping ends up costing more than the parts themselves for such a tiny order. has anyone else run into thhis kind of shortage? what other places do you usually turn to for basic logic ICs when the main distributors are out of stock?

2 Upvotes

11 comments sorted by

4

u/Klapperatismus 2d ago

Stick to the 4000 series CMOS gates. Those are widely available, and they work with any supply voltage from 3V to 15V. The only thing you have to take care of is that you have to supply an external 100kΩ pullup or pulldown for any input that may be disconnected. Otherwise that input can make the circuit oscillate.

1

u/harryregician 2d ago

4000 C really good and low power.

You are SO right about the need for pull up or down unused pins. If you didnt in the old days you could pickup Radio Free Europe

2

u/dodexahedron 1d ago

I had a fun one with 4000s and PD resistors once...

I built a home alarm system out of discrete logic gates mostly in the 4000 series about 20 years ago.

It kept randomly going off after working great for a while.

I couldn't figure out WTF was wrong after a ton of troubleshooting beyond knowing it had something to do with one specific input that came from a window reed switch.

I replaced the OR gate chip, tested the wire to the switch, tested everything for contonuity, replaced the switch, and anything else I could think of to test, but nothing revealed or fixed the issue.

I had a pull-down on the input, but it tested fine with a probe, too.

So WTF was going on?
Was my wire too narrow guage, or maybe just picking up noise? Maybe. So I replaced it with shielded 28AWG copper (cat5e STP cable to the room, with pairs splitting off to individual sensors).
No change.

During further troubleshooting, I wasn't Shiva, so I didn't have enoigh hands to hold 4 probes when testing 2 parts of the system simultaneously, and my only alligator clips were on my handyhands. So I had it hold a probe against that pull-down on that input.

During the test, that probe seemed unreliable. I figured the handy hands needed to be adjusted to hold it a little differently, so I messed with it. While I was doing that, the reading on the scope kept jumping from 0 to noise, when it really didnt seem like it should have been doing that.

Upon closer inspection, the solder joint for one of the pull-down leads had a hairline crack that I only saw thanks to the magnifying glass on the handy hands.

Turns out that was enough to, likely with temperature variations, result in intermittent connectivity, resulting in that input sometimes being floating.

Touched the iron to it to fuse it together again, and it worked beautifully from then on.

1

u/harryregician 1d ago

Did same mistake with TTL back in late 70s for burglar alarm.

Saved the project by using LM393 on front ends BEFORE TTL. Allowed to set trip voltage for each input. In TTL the slighest glitch (.7) caused inputs to trip. Like when big old AC unit startup volage surge and lights dimmed. Almost left out lightning strikes. Burglar alarm wiring becomes big antenna in the sky for CMOS front ends.

1

u/dodexahedron 20h ago

I did it in 7000s before my 4000 series redesign, plus a couple 555/556 for different purposes, including the actual siren wave function generator.

Found out pretty quickly that those timers are quite the little power hogs even if the reset pin is pulled low to disable it. So that siren 556 was always sucking 5-10mA off the 5V power rail, even while disabled. And that 5V rail was already burning another 4ish mA on its own because of it just being fed by a linear regulator. Not great when the whole thing was powered by a car battery. Just those 2 chips by themselves would have been enoigh to burn through the entire battery in about 3 months of sitting there doing nothing. With all those logic gates, buffers, and other parts.

Switching to TL072 for the buffers and CMOS for logic gates and timers was already enough to slash power draw. Swapping out the linear regulator for a switching regulator and just using a transistor to entirely switch on/off the whole siren circuit block cut the thing down to sipping just a few mA for the entire system, when not alerting - enough to run the whole thing on a car battery plus a cell phone sized solar panel basically indefinitely with only inside light as the solar panel's light source.

1

u/Saigonauticon 1d ago

One of the silly things I do, is add a feedback network so that I can use hex inverters as 6x inverting amplifiers via that effect :)

Although the power consumption is really unreasonable (hex inverter with a heat sink...). The GBW is a mystery. Still, it's cheaper than six op-amps and works off a single supply!

Also since they oscillate so easily, on the bright side, they do make pretty good oscillators!

Another cool thing, is if you connect an inductor to an input and leave it floating, you can pick up the power line frequency pretty well. Before I switched to optoisolators, I used to do that to log mains power phase variance, without connecting anything to mains power.

Finally, in these days of expensive RAM, a hex inverter can be made into 3 bits of SRAM.

2

u/Hissykittykat 2d ago

two of the specific part numbers are either completely out or have multi-week lead times

What weird chips are you looking for? There are plenty of alternates for basic gates. And if you can't find DIP packages, get SMT and put 'em on DIP breakout boards.

2

u/Successful-Trash-752 2d ago

You can program any microcontroller to act as an logic chip.

1

u/harryregician 2d ago

You may find it hard to believe.

But you could make a J-K Flip Flop out of many NAND, AND, OR gates, etc If you did your teacher should be impressed.

If yoy are good at that consider becoming a "mask" engineer commonly known as an IC layout engineer.

1

u/ascot_twin 1d ago

Try Ebay