switching on and off LEDs without transistors and using an IC instead? - Page 1
Forum section: electronics / beginners

author: dentaku
author_rank: Frequent Contributor
timestamp: January 12, 2014, 02:16:08 am
content: I looked at my bin of random old 4000 series ICs I've never used before (got them from an old guy after he died) and saw what a 4011 is supposed to do, it looked simple enough. I usually don't break stuff but while I was messing with the 4011 2-input NAND IC I fried half of it THEN I readhttp://www.doctronics.co.uk/4011.htmand saw the warnings about what NOT to doAnyway... I see that you can't drive an LED directly from the outputs and that you should just use BJTs to switch on LEDs with it (OK, that's understandable)and you shouldn't let the gate inputs open without pull-down resistors (have no clue why).I know it's a strange question because BJTs are simple and cheap but just out of curiosity...QUESTION #1: Instead of using individual transistors to switch on the LEDs like the first example circuit herehttp://www.doctronics.co.uk/4011.htmIs there something handier than using bunches of single transistors to switch bunches of LEDs? I see I have a 4066 quad analogue bilateral switch but I figure this isn't appropriate for directly switching on and off LEDs either so it wouldn't help.Would something like the MPQ3725A NPN SILICON QUAD TRANSISTORhttp://www.datasheetarchive.com/dl/Datasheets-IS8/DSA00157876.pdfbe what someone would use?or is there something even more common that could be used?QUESTION#2: as stated in the doctronics article "The inputs of the gate must be connected, either to LOW or to HIGH, and must not be left open circuit. This is the function of the input switches with their pull-down resistors"How is NOT having something connected to inputs bad for it?

author: andtfoot
author_rank: Unknown
timestamp: January 12, 2014, 02:56:04 am
content: The first thing that comes to mind for driving a bunch of things (LEDs, relays, etc) is the ULN2803A or similar.www.ti.com/lit/ds/symlink/uln2803a.pdfJust keep in mind it only sinks current. An example is here:oomlout.com/8TRA/8TRA-Guide.pdfAs for the second question, generally the inputs to a chip should always be terminated somehow. If not, they float and any noise can cause unwanted operation.

author: Corporate666
author_rank: Unknown
timestamp: January 12, 2014, 03:34:13 am
content: When I have needed to drive a lot of LED's, I use constant current shift registers.It's just 4 pins and you can cascade them. The 4 pins are a latch, enable, clock and signal. Each time you cycle the clock line, whatever is on the signal line is "shifted over" to the next position in the register. When it hits the last position, it shifts into the next cascaded shift register (if there is one), or just is shifted into nothing if no other register is cascaded.These shift registers not only allow you to control essentially unlimited numbers of LED's (limited only by the maximum speed of your shift register and how quickly you need to update the info), but they also handle the constant current aspect, so you can connect the LED's directly.For small numbers of LED's, I just use discrete FET's (or SMD's with dual or quad FET's).

author: edavid
author_rank: Super Contributor
timestamp: January 12, 2014, 06:36:24 am
content: Quote from: dentaku on January 12, 2014, 02:16:08 amYou didn't read the page carefully enough. Youcanuse 4000 CMOS outputs to drive LEDs, but then the output probably won't have a proper CMOS level, so you shouldn't use the same output to drive another IC.

author: Psi
author_rank: Super Contributor
timestamp: January 12, 2014, 08:41:20 am
content: Quote from: dentaku on January 12, 2014, 02:16:08 amIf the input is left floating it can pickup random RF noise in the air and start oscillate very fast.So fast in fact, that the switching produces heat from excessive current draw.Remember, CMOS dissipates power only when switching from one state to the other and a fast oscillation spends lots of time in the states between on and off compared to a slowly changing signal.So unconnected inputs are bad in the same away as overclocking your PC is bad, except that you get all of the risks with none of the benefits.

author: dentaku
author_rank: Frequent Contributor
timestamp: January 12, 2014, 12:50:02 pm
content: Ah, that makes sense.The first 1/4 of the 4011 I killed by trying to drive an led directly. I then followed some instructions (used pull-downs and transistor for switching the LED) and got the results I was expecting using the 3 pins next to it.Then I broke something on the other side because I forgot to move the pull-down resistors over to the inputs I was testing. Now pin 9 seems to be stuck high but pin 8 does what it's supposed to. Really, I'm not the kind of person who just randomly breaks stuffOh well. It's just a 4011 I got with one of those old InterTAN 300-in-1 things for free and I've got another one.Quote from: Psi on January 12, 2014, 08:41:20 am

author: dentaku
author_rank: Frequent Contributor
timestamp: January 12, 2014, 01:01:42 pm
content: That looks very useful. It's what I was imagining.8 darlingtons in an 18pin IC and it's "500-mA Rated Collector Current (Single Output)".Quote from: andtfoot on January 12, 2014, 02:56:04 am

author: edavid
author_rank: Super Contributor
timestamp: January 12, 2014, 04:27:22 pm
content: Quote from: Psi on January 12, 2014, 08:41:20 amA 4000 pin has about 5pF capacitance, which filters ambient RF, so there's no switching. What does happen is that leakage tends to charge the pin to a voltage in the range which will turn on both input transistors, causing current to flow. With a 5V supply this is pretty small, but at higher voltages it can be enough to heat the chip. For something more complex than a gate, it can also cause the chip internals to do strange things.

author: dentaku
author_rank: Frequent Contributor
timestamp: January 12, 2014, 06:09:16 pm
content: Quote from: edavid on January 12, 2014, 04:27:22 pmThe first 1/4 that died flickered a bit for a while and I was using it from 4 old AA batteries so it was probably closer to 5V. Then I used 9V and it completely died so that sounds logical.At least I learned something about 4000 series ICs before killing something more useful to me like an up/down counter or a 4040B RIPPLE-CARRY BINARY COUNTER/DIVIDER,which I wish I had in my bin.