Need some help with LEDs

Do you have a technical question that doesn't really fit a specific console? Want some general info on electronics, hacking, making cookies, etc? Here's the place to ask! Go nuts.

Moderator:Moderators

Post Reply
adric22
Posts:7
Joined:Mon Oct 30, 2006 9:59 am
Contact:
Need some help with LEDs

Post by adric22 » Wed Nov 01, 2006 4:48 pm

I need to run some LEDs off of a shift register. I currently have it setup and working with some cheap green LEDs and I have them sinked via the negative side directly to the outputs on the sift register.

However.. that was an experiment. Once I got the software working, I now need to expand that. I need to have several super-bright LEDs (preferably in series running from 12V) running off of each leg of the shift register. That means I need some kind of transistor on each leg. (Or relay, or something) I'm very good with digital electronics, but I know nothing on the analog side. Can somebody give me an example of what kind of transistor i would need to use and how it is oriented in there (they have 3 legs)

User avatar
codeman
Posts:314
Joined:Mon Aug 15, 2005 2:29 pm
Contact:

Post by codeman » Wed Nov 01, 2006 5:33 pm

I'm not sure exactly when you want the LEDs to light up...are you saying that when one of the pins on the shift register is low, you want a series of LED's to light up?

If that's the case, i would use two NPN bipolar transistors, like the 2N2222A. They're cheap and easy to find. To hook it up, put the output of your shift register through a 1k resistor to the base of the first transistor(Q1). The base of the second transistor (Q2) is connected to +5v (if that's what your running the shift register off of) through a 1k resistor, and the base of Q2 is also connected to the collector of Q1. Both emitters are connected to ground. The collector of Q2 is then connected to the cathode of your LED, or LED chain if you want. Sorry for the lack of schematic...too lazy
What I have shown you is reality. What you remember, that is the illusion.

"Say, what does this button do?"

All the dishes rattle in the cupboards when the elephants arrive

User avatar
timmeh87
Senior Member
Posts:3047
Joined:Mon Nov 14, 2005 10:19 pm
Location:Ontario, Canada

Post by timmeh87 » Wed Nov 01, 2006 6:57 pm

if you want to run an led of each output of a serial-parallel shift register, then they sell transistor arrays in convinient common-emitter packages like the ULN2801
Image

"Linux is only free if your time is worthless"

User avatar
codeman
Posts:314
Joined:Mon Aug 15, 2005 2:29 pm
Contact:

Post by codeman » Wed Nov 01, 2006 7:56 pm

Right...but the way it sounds like he wants it, he was "sinking" the LED current through his shift register...which i took to mean that he wants the LED to turn on with a low signal. The darlington array you just said is an active high, so he'd still need another BJT inverter somewhere
What I have shown you is reality. What you remember, that is the illusion.

"Say, what does this button do?"

All the dishes rattle in the cupboards when the elephants arrive

User avatar
timmeh87
Senior Member
Posts:3047
Joined:Mon Nov 14, 2005 10:19 pm
Location:Ontario, Canada

Post by timmeh87 » Thu Nov 02, 2006 10:31 am

well the same company makes an active-low chip with a slightly difffernet model number, IIRC
Image

"Linux is only free if your time is worthless"

adric22
Posts:7
Joined:Mon Oct 30, 2006 9:59 am
Contact:

Post by adric22 » Thu Nov 02, 2006 1:02 pm

codeman wrote:I'm not sure exactly when you want the LEDs to light up...are you saying that when one of the pins on the shift register is low, you want a series of LED's to light up?
Thank you for your help.. but the truth is, it doesn't matter to me whether the LED lights up when the pin on the shift register is low or high. I can change it in software in just a matter of seconds to solve that problem. The only reason I'm currently running it the way I am is because the datasheet for the shift register I have says it can sink more current when sinking low, than with high. But I do not believe it will be able to sink enough current to run multiple LEDs, especially super-bright LEDs. Not to mention, I want to make it as power efficient as possible, so I was hoping to be able to run the 3 or 4 LEDs (depends on what voltage and color I go with) in series and just use one resistor off of a 12V source. But if it will simply things any, I could just run several LEDs in parallel off of the 5V system and use seperate resistors for each.

I'm not picky.. Please, just anything that will work. My only requirements is that I can run multiple LEDs (I don't even have a set number in mind.. somewhere between 3 and 5) off of a single pin on a shift register.

The goal will be this.. My star-trek like shuttlecraft I'm making in my back-yard needs some moving lights on the warp engines. I have constructed the sides of the engines to have 16 different compartments covered a translucent plastic. I have already designed software and tested it with a 8-bit shift register in order to make a pattern of moving light. For the final product, I am going to daisy-chain two shift registers together (to get 16 sections) and each section of each warp engine will have several LEDs in order to be very bright. I plan to use a seperate set of shift registers for each engine, so as far as design goes I only need to concentrate on a single engine. So that is 2 8-bit shift registers with a lot of bright LEDs connected. So I'm not picky on the design. Whatever is easiest is what I'll go with!

Post Reply