Wondering if this is possible/practical?

Hi everyone, I just received my arduino uno board and am working on a fairly large LED project involving transistors and shift registers powered by a 12 volt 8 aa cell battery pack and before i commit to it, I have a few general questions.

First off, is it possible to connect 6 8 bit shift registers to an uno board with this method of connecting 2 shift regs (http://www.arduino.cc/en/Tutorial/ShiftOut), is there a max number of shift regs you can connect?

Second question, is 12 volts enough to power roughly 184 LEDS with 140 transistors and 324 resistors, and if so how can I calculate how long the batteries would last? There would be 16 of these: http://www.flickr.com/photos/87989001@N00/4933258821/ which is 64 LEDs running at 25-30 mA

Then there would be the remaining 120 LEDs running at 20 mA

I plugged all this info into a simple LED calculator and got around 2000-2500 mA current draw from the source, not too sure what that means on a scale of battery output, requirement, or battery life.

As a side note, this has been done on a slightly smaller scale with 9 volts using 3 shift regs with 116 LEDs...

Any advice or personal experience in this type of stuff would be greatly appreciated! Thanks in advance!

is it possible to connect 6 8 bit shift registers to an uno board with this method of connecting 2 shift regs

Yes. Put decoupling caps on each shift register. Don't put a capacitor on the clock or shift lines. http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

is there a max number of shift regs you can connect?

In theory no but you need to buffer the common signals and add decoupling capacitors for anything over 20.

Second question, is 12 volts enough.....

It depends on how you wire them up.

64 LEDs at 25mA each is 64 X 25 = 1.6A so for an hours use you need a battery capacity of at least (and probably more) of 1600 mA hours

By the way, this is a typical beginner over ambitious question. Start with something smaller and build up.

Thanks a lot for the reply and the link. I do understand this is a pretty over ambitious first project, I plan to put the whole thing together a shift reg at a time.

As for how I plan to wire them up, I will be using a resistor for each LED and all of them will be in parallel. 64 of them will be wired the same as the link with 4 per board. After that all the other LEDs will be controlled by transistors.

So 64 * 25 = 1.6A 120 * 20 = 2.4A

That gives me 4000mA and if a standard AA alkaline battery can produce about 2.8 amp hours at 1.5 volts, Im guessing I will have enough power and if Battery life (hours) = battery mAh rating/battery current then (2.8 * 8) / 4 = 5.6 hours?

then (2.8 * 8) / 4 = 5.6 hours?

No sorry, if you have a 2.8 Amp / hour battery then putting 8 of them in series doesn't multiply the current you will still get 2.8Amps per hour but at 12V in place of 2.8 Amps per hour at 1.5V. By the way rechargeable batteries only give 1.2V and not 1.5V.

I will be using a resistor for each LED and all of them will be in parallel. 64 of them will be wired the same as the link

I don't understand. Only one LED per shift register output? Or are you saying 64 LEDs per shift register output. Why use 12V you will just waste the power in the resistors?

I drew out a diagram of how the shift regs will operate: http://www.flickr.com/photos/55927001@N02/5219302602/

Basically the color bars will have 4 LEDs per board with 8 boards on each side, which is the 64 LEDs I am referring to. Each board will have a transistor controlling the output from the first reg.

Reg 2 and 3 will each have 8 LEDs and control both sides.

Reg 4 and 5 will have 7 transistors controlling the output of the 6 x 7 LED matrix.

Reg 6 will be controlling the EKG with 3 LEDs and the smaller LEDs.

Sorry that is not a schematic by any stretch of the imagination. It doesn't show how you will wire things up.

Controlling a 6 X 7 matrix needs multiplexing you can't do this in the middle of a long chain of shift registers.

each have 8 LEDs and control both sides.

What do you mean by both sides?

I know it is no schematic, just a basic diagram for the layout of the LEDs.

What I mean by both sides is, it will also control the LEDs on the other side of the helmet so that the output of the LEDs on one side is mirrored on the other by using the same shift register, or cant i do that?

As for the matrix your right, I meant to say array. It will act like an equalizer and just light up random LEDs in the sequence.

just a basic diagram for the layout of the LEDs

So as such I can't say if it will work or not. In general I would say that you haven't convinced me on the need to use 12V to power the LEDs, to make best use of the batteries I would use about 1V over the forward voltage drop of the LED. Failing that use 4V, any more is wasted power. If you can draw a section of the circuit I could tell from that.

You have what is fundamentally a simple problem, just hook 6 SRs in a row. But the devil is in the details as always.

184 LEDS with 140 transistors and 324 resistors

You'd never fit all this in the helmet and shouldn't need any of it (well you need the LEDs of course) anyway, if you use high/constant-current driver chips you can ditch the transistors and resistors. For example the TLC5940 will drive 16 "LED driving pins" but you can have many LEDs in series on a pin (depending on your voltage) to reduce the number of driver chips.

And then there are the multi-digit mux driver chips like the MAX7219 and MAX7221, they'll drive 64 LEDs each, so you'd only need 3 chips. May not be bright enough if the helmet is going outside though and would need some fancy coding.


Rob

If you have 12V available and you are turning all 4 LEDs on your little card on at once (I assume the 3 pins are power, ground, control) then you are better off wiring them in series - +12V to the 4 LEDs in series to the resistor to the transistor to ground. Then you have 4 LEDs that can turn on full at 20mA instead of 80mA. Saves on assembly time and current draw. I did something similar here:

Thanks everyone for all the input so far, as for other methods vs using shift regs, I already have most of the stuff I need to do it my way, but if that doesnt end up working/fitting in the helmet I will definitely look into alternate routes.

Here are some pictures of this same project that I am attempting except I am trying to make it a little more complex and programmable instead of using LED drivers.

These are the 16 boards for the color bars on both sides of the helmet which will be connected to a single shift reg:

This picture shows the 2 rows of 8 LEDs that go right under the color bars along with the transistor board that controls it. I want to try to make a 16 transistor board so that I can control each individual LED rather than only controlling a vertical pair, this will require 2 more shift registers.

I also want to add rectangular LEDs instead of going the route this guy took by using regular 5mm's and making a pattern from color gels for the light to shine through:

As for fitment, I cant say Im too worried because the helmet is a good deal larger than my head and the arduino and batteries will be in a wallet sized box that will fit in a pocket. This is another guys helmet and what how he fit the boards in:

This is basically what I want it to be able to do, except that mine would have more programmability: http://www.youtube.com/watch?v=VDtRCbOoTGA

So as such I can't say if it will work or not. In general I would say that you haven't convinced me on the need to use 12V to power the LEDs, to make best use of the batteries I would use about 1V over the forward voltage drop of the LED. Failing that use 4V, any more is wasted power. If you can draw a section of the circuit I could tell from that.

So you are saying that 4 volts is capable of powering all of those LEDs? And if I did use 12 volts with the same current draw vs lets say 6 volts would last the same length of time?

If you have 12V available and you are turning all 4 LEDs on your little card on at once (I assume the 3 pins are power, ground, control) then you are better off wiring them in series - +12V to the 4 LEDs in series to the resistor to the transistor to ground.

I might have to look at this route instead, thanks for the suggestion.

So you are saying that 4 volts is capable of powering all of those LEDs?

If they are wired in parallel then yes. If they are wired in series then no.

And if I did use 12 volts with the same current draw vs lets say 6 volts would last the same length of time?

If you use 12V when you only need to use 6V you are wasting half your battery capacity. It would last the same time but you would only need half the number of batteries. Or you could parallel up the batteries (don’t just connect them in parallel) and get twice the life.

I am going to try and use 9 volts and parallel up 2 leds in a series, thanks again for all the help/suggestions. I will post a schematic soon.

parallel up 2 leds in a series

You can have them in parallel OR in series but not what you said.

I will post a schematic soon.

Good that reduces the chances of vocabulary error. :wink:

Okay, so we’re all talking the same thing now?
Columns of LEDs, current limit resistors sized to match the battery & 20mA max draw.
Driven in parallel so 1 transistor can do both sides of the helmet, or 2 or 3 together on one side for a wider display.
If the transistor drops 0.7V and the LEDs are 2.2V each that will take 9.5V, so a 12V supply is probabaly a better idea (or say three 3.7V Li batteries in series, 11.1V). Or use a MOSFET with lower Rds. If the MOSFET has turn-on resistance of .012ohm (12 milliohm) and you have 40mA going thru it, it will see V=IR <1mv, then a 9V source would be okay.

Gravitech has 3.7V Li batteries, 1000mAH, for $12. 3 of those would give 11.1V supply, the math says you could drive 50 colums of 4 LEDs for nearly an hour before recharging is needed.

The idea is to match your source voltage to what the LEDs needs so that you’re not wasting a lot of energy heating up resistors & transistors and draining your battery(s) too fast.

Hard to tell from what you’ve posted how much you have built and how much is pictures of someone elses build.

Well each led for the color bars has a 3.3 voltage drop and are capable of 30mA, I drew up a quick schematic of one of the boards, there will be 16 of these total. I will try and post an entire schematic later today.

Yeah, that would do it.

For the current limit R you would need: (9- 3.3 -3.3 -0.7)/0.03 = 57ohm, I would go with next higher 68 ohm. (9- 3.3 - 3.3 - 0.7)/68 = 25mA, give your self a little margin.

If the 3.3 was actually 3.0, then 82 might even be safer (9-3-3-0.7)/82 = 28mA

3.3V huh? What kind of LED is that?

Here are the LEDs I'm using: http://www.superbrightleds.com/cgi-bin/store/index.cgi?action=DispPage&Page2Disp=%2Fspecs%2FW15120_specs.htm

Those are going to make up most the the LEDs in the helmet but I will probably run the rest at 20 or so ma because the ones in the color bars have foam and color gels over them, I want them to run 25-30.

The rectangular LEDs which I am working on a schematic for are 2 volts and 20 ma and I'm going to need 84 of those. I will be wiring them much like the color bars but 3 in a series.

I did a quick rough calculation of 2320 ma of current draw, is that practical for 6 aa batteries?

I don't know - I have a brand new package of Kodak XtraLife alkalines, (LR6 / AA) and I don't see any indication of how many maH they are goood for.

Wikipedia seems to think alkaline AAs are good for 2700mAH: http://en.wikipedia.org/wiki/List_of_battery_sizes

I'd go with C or D batteries myself.

I don't understand your LED choice. The W15120 are only 1500 mCD and cost $1.05 in one lot. At 20mA they'll be pretty bright. The W6030 is 4 times as bright (6,000mCD) on the same current and only costs $0.79. You can run these on less current for the same brightness. I know the viewing angle is less, but you are mounting them under a diffuser anyway to make a broader area appear to light.

I am using some of these - they are blindingly bright also at just a few mA, and are 1/5 the price. http://www.mpja.com/prodinfo.asp?number=17145+OP