Author Topic: switching on and off LEDs without transistors and using an IC instead?  (Read 3684 times)

0 Members and 1 Guest are viewing this topic.

Offline dentaku

  • Frequent Contributor
  • **
  • Posts: 849
  • Country: ca
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 read http://www.doctronics.co.uk/4011.htm and saw the warnings about what NOT to do :)

Anyway... 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 here http://www.doctronics.co.uk/4011.htm
Is 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 TRANSISTOR http://www.datasheetarchive.com/dl/Datasheets-IS8/DSA00157876.pdf be 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?
 

Offline andtfoot

  • Supporter
  • ****
  • Posts: 352
  • Country: au
Re: switching on and off LEDs without transistors and using an IC instead?
« Reply #1 on: January 12, 2014, 02:56:04 am »
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.pdf

Just keep in mind it only sinks current. An example is here:
oomlout.com/8TRA/8TRA-Guide.pdf


As 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.
 

Offline Corporate666

  • Supporter
  • ****
  • Posts: 2007
  • Country: us
  • Remember, you are unique, just like everybody else
Re: switching on and off LEDs without transistors and using an IC instead?
« Reply #2 on: January 12, 2014, 03:34:13 am »
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). 
It's not always the most popular person who gets the job done.
 

Offline edavid

  • Super Contributor
  • ***
  • Posts: 2970
  • Country: us
Re: switching on and off LEDs without transistors and using an IC instead?
« Reply #3 on: January 12, 2014, 06:36:24 am »
Anyway... 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

You didn't read the page carefully enough.  You can use 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.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 7566
  • Country: nz
Re: switching on and off LEDs without transistors and using an IC instead?
« Reply #4 on: January 12, 2014, 08:41:20 am »
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?

If 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.
« Last Edit: January 12, 2014, 08:45:12 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline dentaku

  • Frequent Contributor
  • **
  • Posts: 849
  • Country: ca
Re: switching on and off LEDs without transistors and using an IC instead?
« Reply #5 on: January 12, 2014, 12:50:02 pm »
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 stuff :)

Oh 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.

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?

If 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.
 

Offline dentaku

  • Frequent Contributor
  • **
  • Posts: 849
  • Country: ca
Re: switching on and off LEDs without transistors and using an IC instead?
« Reply #6 on: January 12, 2014, 01:01:42 pm »
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)".
 
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.pdf

Just keep in mind it only sinks current. An example is here:
oomlout.com/8TRA/8TRA-Guide.pdf


As 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.
 

Offline edavid

  • Super Contributor
  • ***
  • Posts: 2970
  • Country: us
Re: switching on and off LEDs without transistors and using an IC instead?
« Reply #7 on: January 12, 2014, 04:27:22 pm »
If 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.

A 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.
 

Offline dentaku

  • Frequent Contributor
  • **
  • Posts: 849
  • Country: ca
Re: switching on and off LEDs without transistors and using an IC instead?
« Reply #8 on: January 12, 2014, 06:09:16 pm »
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.

The 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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf