# Cave Eyes



## Servomation (Oct 30, 2009)

I'm trying to finish up a set of blinking LED "cave eyes" based on Cowlacious' tutorial, but I'm a little bit stuck on resistors.

Here's his schematic
http://www.cowlacious.com/CaveEyes.htm

I want to use (30) SuperBrites, rated at 3v 20mA.
I know how to calculate for resistors when wiring single LEDs, but I've never worked with a microcontroller or multiple LEDs, and it's confusing me. It looks like he's hooking each pair of LEDs in series (?), but throwing the multiplexer in there, do I treat the circuit as a parallel hook-up?
I'd also like to run it off a 6- or 9-VAC wall wart.

So how would I calculate the rating for each resistor?
Any help would be greatly appreciated!
Thanks in advance.


----------



## spinman1949 (Jun 29, 2009)

*Hope this helps.*

Looks to me like the pair of led's are wired in series with a 470 ohm resistor. All pairs share a common ground. There really is no parallel aspect since the positive is supplied individually from the PIC. So you need to design your circuit as though each pair is a single circuit.

Here is a link to an array calculator. http://led.linear1.org/led.wiz

According to this, you need a 1 ohm resistor for each pair of eye's ( LED'S)

I entered 30 led's and it designed the array exactly as you want. Except the positive is coming from PIC. So you can kind of think it as a parallel array with switches to each pair of led's if that helps.


----------



## fritz42_male (May 5, 2009)

I know it doesn't help now but I've knocked up a 6 pairs of LED version based on a Picaxe chip. No resistors and the addition of a capacitor allows a fade effect per pair of eyes. Uses a 4.5V source (3xAA)

I've mixed 5mm Orange, Green, Red and ultrabright white along with 10mm blue (in pairs obviously). Speaker connectors on the box and Cat5 cable for the cable run.


----------



## Servomation (Oct 30, 2009)

Thanks so much, Spinman.
I have to say I'm still a little confused, though. There's something I'm still not catching.
Obviously it's not entirely clear what type/rating LEDs Cowlacious was using in his schematic, but assuming they're a (or what I think is a) typical 20mA for _non_-SuperBrites, @ 1.8... pluging that into the LED wizard, I'm getting resistors of 33 ohms. Far from the 470 ohms he has in his original circuit. So it seems like there's something more that needs to be figured into the calculation, no?

@fritz42_male - did you write anything up on your build? Would love to get more details. I'll be building more eyes.

Thanks to both of you. I really do appreciate it!


----------



## Servomation (Oct 30, 2009)

Doh!
I just noticed when I switched to 1.8v LEDs, the schematic that the wizard produced had 3 LEDs per run, instead of just a pair. That might start to explain the discrepancy. 

Wish there was a way to control that in the wizard.


----------



## spinman1949 (Jun 29, 2009)

*That's odd.*

When I used the wizard I gave you the link too, it set up an array of 15 pairs. I entered the following. 6 volt supply, 3 volt forward bias led, 20 ma, 30 leds. I think that is the correct array according to the information you provided.


----------



## spinman1949 (Jun 29, 2009)

*Better Wizard*

I remember sometime back there was a wizard that allowed you to determine the array desired. I will search for it and if I find it, I will post it to you.


----------



## spinman1949 (Jun 29, 2009)

*I must be getting old.*

I had the answer all along. Don't think of this as an array. It is a bunch of individual circuits as I stated earlier. Just open the wizard and put in 2 leds. The confusion is the array calculator wants to save circuit space, so it puts any combination of led's together. Still does not answer why cowlacious uses 470 Ohm resistors.

Anyway two leds, one 1 ohm resistor. Not sure where you can get a 1 ohm resistor.


----------



## HomeyDaClown (Oct 3, 2009)

The reason for placing pairs of leds in series here is to satisfy the 6 volt output from each pin of the 74HCT154 as well as for making pairs of eyes. The 470 ohm resistors are there to limit current drawn from the pins of the 74HCT154 below it's maximum of 20 ma. not for the leds. The maximum supply voltage for the 74HCT154 is 7 volts. If your leds are rated at 3 volts 20 ma. you should not have to change a thing. If you pull more than 20 ma. from each pin of the 74HCT154, it will heat up and die quickly so I would keep the current limiting resistors as is. If you decide you need more than 20 ma., I would add either a transistor (2N2222 or 2N4401...) to each output pin or better yet, use a couple ULN2003 driver chips. The ULN2003 will drive 500 ma. per pin max.


----------



## spinman1949 (Jun 29, 2009)

HomeyDaClown said:


> The reason for placing pairs of leds in series here is to satisfy the 6 volt output from each pin of the 74HCT154 as well as for making pairs of eyes. The 470 ohm resistors are there to limit current drawn from the pins of the 74HCT154 below it's maximum of 20 ma. not for the leds. The maximum supply voltage for the 74HCT154 is 7 volts. If your leds are rated at 3 volts 20 ma. you should not have to change a thing. If you pull more than 20 ma. from each pin of the 74HCT154, it will heat up and die quickly so I would keep the current limiting resistors as is. If you decide you need more than 20 ma., I would add either a transistor (2N2222 or 2N4401...) to each output pin or better yet, use a couple ULN2003 driver chips. The ULN2003 will drive 500 ma. per pin max.


So if you were just lighting LED's in an array, the 1 ohm resistor based on the paired LED's in series with 3 volt 20 ma LED's and a supply voltage of 6 volts would be correct? But since you are using a chip to drive the LED's you must increase the resistance to keep from frying the chip. I guess what I am confused on is with that much resistance in the circuit, how bright will the LED's be?


----------



## HomeyDaClown (Oct 3, 2009)

spinman1949 said:


> So if you were just lighting LED's in an array, the 1 ohm resistor based on the paired LED's in series with 3 volt 20 ma LED's and a supply voltage of 6 volts would be correct? But since you are using a chip to drive the LED's you must increase the resistance to keep from frying the chip. I guess what I am confused on is with that much resistance in the circuit, how bright will the LED's be?


Actually no resistor would be required in that scenario. The voltage drop across the series wired Leds would just be 6 volts (3+3) and both Leds would draw a total of 20 ma. directly from a power supply. The purpose of the resistors in this case is to protect the IC.

Leds are current animals by nature and are happy with their rated current rather than voltage. Leds are current-driven devices in which the light output depends directly on the forward current passing through them. To get more light out of this circuit, you would need to add more efficient Leds (more light at same current rating) or some type of driver stage to push more current for more powerful Leds without over taxing the IC output pins.


----------



## fritz42_male (May 5, 2009)

Servomation said:


> @fritz42_male - did you write anything up on your build? Would love to get more details. I'll be building more eyes.


Mine was a very simple, last minute job. I took this board and a 14M processor (I had a couple sitting round):

http://81.134.141.187/epages/Store.storefront/?ObjectPath=/Shops/Store.TechSupplies/Products/AXE117

And built it into a box with all the outputs wired to speaker connectors. I used Cat5 cable to run 4 pairs of LEDs per cable. The eyes were just 2xLEDs on a piece of 6mm MDF drilled and glued in place with a 'chocolate block' screw terminal connector screwed to the MDF - I terminate a pair of the Cat5 wires to this block and wire them to the LED. If I want a fade effect, I just added a 2200uF capacitor between the pos n neg on the screw block.

If anyone wants the random blink for random time program I'd be happy to give it to them. I'll knock up a howto on this after tonight (VERY busy at moment)

The whole thing is battery powered off a 3xAA battery pack. The thing lasts at least 4 days on a set of batteries.


----------



## Servomation (Oct 30, 2009)

> The 470 ohm resistors are there to limit current drawn from the pins of the 74HCT154 below it's maximum of 20 ma. not for the leds.


Amazing! Exactly the key I needed. That explains it perfectly.
Thank you, Homey!

And thank you Spinman for all your input. Good information there, too.

fritz42_male, I've never worked with a PICAXE. Do you flash them the same way as a straight PIC? And are they only sold in the UK?? Looks like an intriguing platform.


----------



## fritz42_male (May 5, 2009)

Servomation said:


> fritz42_male, I've never worked with a PICAXE. Do you flash them the same way as a straight PIC? And are they only sold in the UK?? Looks like an intriguing platform.


Nope, you program them in pbasic using a USB or serial cable. VERY simple to program and use.

Sold throughout the world - in the US by Sparkfun.

For next year I'll be coming up with a few general purpose howtos based on these. Keep an eye on HPropman's posts too as he uses them (his posts got me hooked on them).


----------

