LED sequencing problem

Thread Starter

Oxbo Rene

Joined Feb 20, 2009
201
Uh Oh ! !
Fan has gone out in my computer !
Going to have to shut her down til I get it replaced.
BBL = ( Be back Later)...........
 

Thread Starter

Oxbo Rene

Joined Feb 20, 2009
201
OK, hopefully fan is OK.
Removed, blew it out, tried it, runs slowly.
Sarge, I was using a TC4011BP Nand chip,
Replaced with MC14011, still couldn't get anything going.
Put chip on seperate breadboard and can't get any of the gates to flip.
Inspected inverter chip seperately, found 4 of 6 inverter gates bad.
So, realizing these chips are over 10 yrs old, I really don't trust them.
I need to buy some new ones, and get the ones I need.
Could you offer up a shopping list of logic gates I need to have on hand, say ANDs, Inverters, ORs,. Specifically what I want is the numbers of the chips, you assumed I was using a 4093 NAND chip, nope, no got, but realize perhaps that is a better one than I have, etc. You probably have the scoop on the best ones available today, etc.
Will order approx 5 of each from Digi-Key ($7.00 shipping) so need to make it worth my while.
In the meantime, am going to abandon this project and get back to my boat alarm, etc.............
VCC was 12V, did measure inputs to one NAND gate at12V and output measured at 9.8V, tried to flip it (input=1&1 should've went to 0, didn't).
That's about as far as I got when I decided check em individually.
My fan should've kicked into high gear by now, ain't doin it, so, probably got to look further into that.
Ole Lady is getting ansie over all the time I'm wasting, getting nowhere fast, days are just flying by, not getting anywhere, etc..
Got to mow the lawn, fix the toilet, look for a job, Jesus ! ! !
OK. I'm outa here.........
 

thatoneguy

Joined Feb 19, 2009
6,359
Wives sometimes are a great impediment in the advancement of 'home technology' :D

With your PC Fan, it most likely overheated when it stopped, so the 'built in' oil of the sealed bearings was pushed out. A new $8 fan is suggested, otherwise it will stop again in the near future.

If finances are tight, there are big lots of random logic ICs in non-surface mount packages going for around $30 shipped for hundreds of new in tube ICs, no more than 20 of any one type. Out of curiousity, I got a box a year or more ago, and all of them tested good on a logic IC tester, I was impressed, though I have no idea what I'll use some of the more obscure ones for. In addition to all the "normal" 4011/4060/etc, three 'tubes' of the 16GAL Programmable gates were in there too!
 

Bernard

Joined Aug 7, 2008
5,784
I was a little hasty in condeming the 4017 for your application , so here is another shot at 4017 using home built diode OR gates. The AND serves as LED drivers, [ 4081B ] . Not knowing LEDs , resistor values just representave.
Wish you luck with boat, VW, computer, and fishing.
 

Attachments

Thread Starter

Oxbo Rene

Joined Feb 20, 2009
201
If finances are tight, there are big lots of random logic ICs in non-surface mount packages going for around $30 shipped for hundreds of new in tube ICs, no more than 20 of any one type. Out of curiousity, I got a box a year or more ago, and all of them tested good on a logic IC tester, I was impressed, though I have no idea what I'll use some of the more obscure ones for. In addition to all the "normal" 4011/4060/etc, three 'tubes' of the 16GAL Programmable gates were in there too!
thatoneguy
Where can I take a look at these bulk buys ??
------------------------------------
Tx's Bernard.
---------------------
Got to looking in Digi-Key and made up a shopping list.
I think tomorrow (Mon) I'll run back to Skycraft and see if I can pick up any of these chips.....
CD4071B/CD4072B - 4 & 2 input OR gates
CD4001B/CD4002B - 4 & 2 input NOR gates
CD4082B/CD4081B - 4 & 2 input AND gates
CD4093B - 2 input NAND gate
MM74C14 - inverter
Am working on it Sarge, have patience, got a lot of things in the fire, gotta keep moving forward, etc...........
 

SgtWookie

Joined Jul 17, 2007
22,230
OK, if you're looking at getting some inverters, go for the 40106 instead of the 74C14; less expensive at around $0.50 vs $0.75.

4093 NAND gates and 40106 inverters both have Schmitt-trigger inputs; this feature helps to "square up" input signals that may be transitioning slowly (high rise/fall times). The Schmitt-trigger input causes the output to change states only after the input has exceeded 2/3 Vdd or decreased below 1/3 Vdd. Standard 4000 series CMOS inputs won't handle slow transitions well.
[eta]
Driving relatively high-current devices like LEDs directly from 4000 series CMOS is problematic, particularly if you're also trying to use the same signal to drive other CMOS logic.

The way to get around the problem is to use driver transistors. This leaves the loading on the logic circuitry light; the drivers do the "grunt work".

You can get ICs that have multiple Darlington transistor pairs inside of them.
ULN2003A IC's have seven Darlington pairs inside; designed to be driven by 5v CMOS/TTL signals.
ULN2803A IC's have eight Darlington pairs inside; designed to be driven by 5v CMOS/TTL signals.
ULN2003A IC's have seven Darlington pairs inside;designed to be driven by 6v to 15v CMOS signals.
ULN2804A IC's have eight Darlington pairs inside; designed to be driven by 6v to 15v CMOS signals.

These drivers sink current, they cannot source current. You use them to switch the ground side of a load.

The ULN2x03A's are a bit more versatile, as they can be used with inputs higher than 5v if additional resistance is used; roughly 780 Ohms per volt over 5v. The ULN200x's seem to be a bit less expensive than the ULN280x's, roughly $0.65 vs around $1.

If you want to go the "discrete transistor" route, it's always handy to have some PN2222/MPS2222/2N2222 NPN and PN2907/MPS2907/2N2907 PNP transistors around. The 2Nxxxx versions come in a TO-18 package, and are more expensive. The PN/MPS versions are in a TO-92 plastic case, and are around $0.11/ea in quantities of 10.
 
Last edited:

Thread Starter

Oxbo Rene

Joined Feb 20, 2009
201
Tx's Sarge,
That's what I needed, some guidance so as not to waste more money, etc....
You are an amazingly smart fellow !
Surely you must be an EE, or Prof that teaches electronics.......
Will take me awhile to digest this info, then will head out to Skycraft in the morning, etc...
Tx's so much,
Oxbo
 

Bernard

Joined Aug 7, 2008
5,784
What ICs would be in my inventrry, pulled a project with more than 10 ICs and found some 4017's ,2 in NANDs & NORS mostly, and one schmitt inverter,+ some transistors. For general usage , might throw in a few multi input gates, 4002[ 2X 4 in NOR ], a FF 4013[ 2 X D FF ]or 4027 [2 X JK FF ] and maybe a 4029 [ up/dn bin/ dec counter ].
 

thatoneguy

Joined Feb 19, 2009
6,359
thatoneguy
Where can I take a look at these bulk buys ??
State auctions, some online auctions that are "members only", and quite a few show up on eBay, usually from the previous sources, but at a higher price. SMD Fabrication has gotten cheap enough for in house now, so there are a lot of businesses clearing out their "Old" (usually 1-4 year old date code) DIP stocks.

Here is an example, though it is for higher end ICs than you are looking for. Packging is similar. Seach For "lot logic ic" on eBay

--ETA: For "Which IC's:

I use the normal smattering of NAND/NOR, and a lot of inverting buffers. JK Flip Flops can be made to about any FF, ripple counters, and the 4060 Counter w/Oscillator, parallel-serial and serial-parallel shift registers, and multiplexers. If you have a programmer, a bunch of the 16VAL or 16GAL programmable logic save a lot of time and wiring. I use these with microcontrollers and FPGA design as well, since sometimes it is much simpler to combine some input instead of wasting pins.

For "Handy to Have", I made the list, some can obviously be omitted if combining with a uC. Some are also obsolete/hard to find...

Quicklist in 74xx
7400 (nand)
7404 (inverter)
7413 (schmidtt nand)
7432 (nor)
7450 (and-or-invert)
7472 (jk flip flip, edge trig)
74151 (1 - 8 data selector)
74161 (8 bit counter)
74174 (Hex D Flip flop, edge trig)
74354 (Transparent multiplexer)
74673 (16 bit ser-par shift)
74164 (8 bit par-ser shift)

4000 series:
4011 (nand)
4014 (shift register)
4016 (bilateral switch -sometimes useful)
4018 (divide by n)
4049 (inverter, truckloads of these)
4060 (oscillator/counter)
4094 (shift register)
4099 (addressable latch)
40106 (schmitt trigger inverters, also a bunch)
4516 (binary up/down counter)
4521 (24 stage frequency divider)
 
Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
Be wary of buying on auction sites!
Be sure to check on shipping/handling charges before bidding; many charge absurd prices.
Beware that the market is getting flooded with counterfeit IC's and semiconductors! This has become a real problem over the last few years, and it appears that many of the counterfeits are coming from Asia.
Your best bet is to buy components from an authorized distributor, like Digikey, Mouser, Allied, Newark, etc, or from the manufacturer themselves. That way you can be certain that you are getting "the real thing", not some counterfeit junk.

If you're going shopping at Skycraft, better look for the 74C14's or 74HC14's; they've been out of stock on the 40106's for awhile.

If they have the 'C14's, they'll be near the top shelf in the front corner opposite the door.
 
Last edited:

Thread Starter

Oxbo Rene

Joined Feb 20, 2009
201
Results of testing Johnson counter with "AND" gates.
----------------------------------------------------
Checked all four "AND" gate chips (unused inputs to gnd) = all good
Put into circuit, double ck'd circuit wiring = good
Checked all diodes = good
-----------------------------------
First chip =
#1-1st LED lights
#2-2nd LED lights
#3-2 & 3 LEDs light
#4-4th LED lights, 2&3 go off
#5-all off
-----------------------------------
2nd and 3rd chip = same results
-----------------------------------
4th chip =
#1-1st LED lights
#2-2nd LED lights
#3-3rd LED lights
#4-4th LED lights
#5-all off
---------------------------------
Pulled chip out, rechecked = good
Re-checked all chips, individually & in circuit = same results
----------------------------------------------------------------
Removed "AND" gates & Diodes from circuit, put ckt back to original configuration.
Checked voltage at output from Johnson counter with LEDs in circuit = 4V
Removed resistor from circuit, checked voltage at output of Johnson Counter = 12V
See attached pic. (using red LEDs)
---------------------------------------------------------------------------------
Overall opinion =
End of experimenting ! ! !
Suspect that the 4V is not enough to drive the "AND" gates.
Perhaps have Johnson counter output directly into "AND" gates and have gates
drive LEDs. ?? Or if not able to do that, drive switching transistor, etc.......
Bernard, fixing to look at your circuit..........
----------------------------------------------------
Have a great day......
Oxbo
 

Attachments

thatoneguy

Joined Feb 19, 2009
6,359
Be wary of buying on auction sites!
Be sure to check on shipping/handling charges before bidding; many charge absurd prices.
Beware that the market is getting flooded with counterfeit IC's and semiconductors! This has become a real problem over the last few years, and it appears that many of the counterfeits are coming from Asia.
Your best bet is to buy components from an authorized distributor, like Digikey, Mouser, Allied, Newark, etc, or from the manufacturer themselves. That way you can be certain that you are getting "the real thing", not some counterfeit junk.
This is ESPECIALLY true when buying transistors and MOSFETS! Anything critical, I use DigiKey for, since they are literally next door.

Only buy from a US name that has sold for a bit and has 100% feedback. Some have names like "Surplus" in them, based in US Metro areas that are usually safe. When advertised as "NOS"/New Old Stock, those are the clearances, they usually have the reason for dumping them in the ad.

If they are from the far east, and say "These are not counterfeit", they probably are. :mad:

eBay isn't a place for the faint of heart, it sounds like you have an IC tester, so run everything through it the day it arrives. Also, if there is a "handling charge" that is 5x the cost of the item, skip it as well. Reason: If they are US based, you can get a refund and/or replacement parts. If they are outside the US, you are plain screwed.
 

Thread Starter

Oxbo Rene

Joined Feb 20, 2009
201
Yea, I went down today and got a bunch.
Bought only RCA and a couple Motorola.
Unfortunately, couldn't find some I wanted that Sarge suggested, so, will be ordering them from Digi-Key, etc
 
Last edited:

Thread Starter

Oxbo Rene

Joined Feb 20, 2009
201
Bernard;
If I'm not mistaken, these "NOR" gates add up to be just regular "OR" gates, and I have redrawn the circuit with just "OR" gates and it definitely seems that it'll work.
I think that's where me and Sarge went wrong with the "AND" gates, there just isn't enough there (Johnson Counter) to power the LEDs and the "AND" gates.
I did fail to mention that when I pulsed the third time the 2nd and 3rd LEDs would blink from coming on to off. Having thought about it, I figure perhaps they tried to come on but didn't have enough there to "hold", and thus failed/went off.
So, it definitely should work with the ULN2004A.
Will find out tomorrow.......
 

Attachments

Bernard

Joined Aug 7, 2008
5,784
You are right; NORs are more common than ORs and did not know what you had in your inventory. I have loaded 4017's down with 20 mA LED loads, but not while driving other logic.
 

SgtWookie

Joined Jul 17, 2007
22,230
Oxbo, I didn't realize that you had used such small resistors and were using such a high voltage.

Wtih a 12v supply and using 100 Ohm resistors (assuming a Vf of 2v on the LEDs) you were trying to put (12v - 2v)/100 Ohms = 100mA current through the LEDs! Had the IC's not dropped the voltage across themselves, the LEDs would've gotten toasted.

4000 series CMOS won't source more than a few mA current without dropping quite a bit of voltage across the IC itself. If you had increased the 100 Ohm resistors to 2.2k, you would've likely had much different results.
 

Thread Starter

Oxbo Rene

Joined Feb 20, 2009
201
Good morning;
Yes, the way that happened is that I had several LEDs in the drawer with no info on them, I tried them with a 100 ohm resistor and they seemed to work fine (without any circuit), brightness looked about right to me, so I just went with them and their 100 ohm resistors. This occurred a couple weeks ago before you sent me that info about the correct figuring of using LEDs. Anyway, I figured, hey, they work just fine with 100 ohm resistors, so stayed with them.
Now, I was laying there in bed last night thinking about it and speculated that with a low value resistor there would be less voltage to power the gates, but more current (not sure that's right, less voltage on resistor = more voltage on gate ??), etc.
Never did put higher value resistor in because I favored the present brightness (due to current) as opposed to being not-so-bright (less current).
I will get out there this morning and play with it some more, just to kill the curiosity bug, can't abandon it now, after all the work that's been put in it. If I go out there and use 2.2K resistors and the LEDs won't light, then, again, end of experiment. I wouldn't understand why they wouldn't light, but, everything I touch seems to always have some idiotic particularity to it I never heard of before.
(Devil did it).
Yes, I always work with 12V.
Like I say, I been out of this game for years and years, really never paid a lot of attention to theory, just looked and guessed for end results.
Definitely learning a lot here on the forum and certainly do appreciate it everybody.
Have a nice day,
Oxbo
 

Thread Starter

Oxbo Rene

Joined Feb 20, 2009
201
Picked up some "red" LEDs @ Radio Shack.
Data states = 2.6v @ 28ma.
In 12v ckt = 12v-2.6v = 9.4v @ 28ma = 335 ohm limiting resistor = 330 ohm.
Using 2.2k resistors = 9.4v/2200 = 4.27ma.
Why do I want to use a 2.2K resistor ?
-----------------------------------------
Re-set up circuit with "AND" gates using 2.2K resistors on LEDs.
#1 - #1 LED lights
#2 - #1 & 2 LEDs light
#3 - #1 & 2 & 3 LEDs light
#4 - #1 & 2 & 3 & 4 LEDs light
#5 - All off
---------------------------------
MY GOD ! ! ! ! ! ! ! !
---------------------------------
Replaced 2.2K resistors with 100 ohm resistors
#1 - #1 LED lights
#2 - #2 LED lights (#1 goes out)
#3 - #2 & 3 LEDs light
#4 - #4 LED lights (others go out)
#5 - All off
-----------------------------------
Conclusion =
2.2K resistors indeed accomplished the task !
Red LEDs seemed about the same brightness.
Inquiry =
Please explain how/why you came up with the values of 2.2K ??
--------------------------------
Bernard;
This circuit (AND) uses only (1) chip to accomplish the task.
Your circuit requires (3) chips, therefore I must conclude that the "AND" circuit is the more econimical one.
----------------------------------
Thanks SOOOOOooo much Sarge ! ! ! ! !
(And everybody else)
Finally I can move forward again.
 

Attachments

Top