kommi10:
Asuming that each LED will consume around 20mA of current, how is it possible to string 7 of them together onto one petal?
Unless each LED is eating way less than the 20mA’s?
You knew the answer all along. From the diagram in your link, Leah puts 7 (normal type I think) LP "LEDs" in parallel off just 1 I/O pin. Just how much current is going through each "LED" is hard to say but it's certain that it's less than 40/7 = 5.7 mA. It may be just enough to get them to glow, but not very brightly.
I use quotes for the LP LEDs because the LP “LEDs” come in 2 types, normal and Micro. The normal type has an LED in series w/a 100 ohm resistor in the package and so is more than just an LED. The Micro LEDs are just naked LEDs, no added resistance inline other than that due to the conductive thread. As to why there are 2 types … well that’s covered below.
kommi10:
Also, not sure how I would use Ohm’s Law to calculate anything here. I know the current (I) as 40mA, and I know the resistance of the thread as 28 ohms per foot (lets say 2 feet are used, so 56 ohms). So I can use Ohm’s Law to calc the volatge needed as 2.24 volts. But not sure how that helps me? I plan on using a 3V 250mAh coincell battery to power the lilyPad itself.
Ohms law assumes the device, say a resistor, is a linear device. Double the voltage and you double the current. Halve the resistance and you double the current, V = I*R. Alas diodes and LEDs are not linear and so it's a bit tricky to know how much current you'll get or what resistance is needed to prevent too much current from flowing and smoking the LED.
It’s generally a safe assumption that a generic LED can tolerate 20 mA, maybe 30 mA, continuously. If you know the output voltage, you can get a good guess at the resistor needed by assuming a voltage drop across the LED and then use Ohms law. Now the actual (forward) voltage drop (aka Vf) across an LED is (primarily) dependent on the color of the LED and then how much current is passing through it. If that current is assumed to be 20 mA, then there are kind of standard voltage drops for each color. Red LEDs might be 1.8V, yellows a bit more, greens perhaps 2.0-2.2V but blues and whites would in the range of 3.0 - 3.4V. The shorter the wavelength of the color (IR is max, UV is min), the higher the Vf.
So take the output voltage, subtract the assumed LED drop, and use 20 mA and get your resistor needed. ie - (5V - 1.8V)/0.02A = 160 ohms. If you happen to be off a little, it won’t make a practical difference. And if you use a normal LP LED, remember there’s already 100 ohms in the circuit. In this example your thread should add around 60 ohms.
And so, looking at the above, and asking “but what happens if I want to use blue LEDs in a 3.3V system”, you’ll see why there are LP Micro LEDs, w/o any resistor in the package. Indeed the resistor needed may already be larger than the minimum provided by a single conductive thread, using a Micro LP LED. So what happens then ? Well, give it a try first. The LED may light up, just not as bright as it would normally. If it’s too dim, then you might try a shorter thread and/or using multiple threads in parallel. Two threads in parallel have 1/2 the resistance of a single thread. Do this to and from the LED. But you may find that as the battery drains down, the output voltage is just too low to run any white or blue LED. That’s a limitation you’ll have to live with … or use a 5V system.
If you look at page 2, the plot of Forward Current Vs.Forward Voltage in the datasheet below, you can see just how much the typical “normal type” LP LED drops for voltage vs color and current.
https://www.sparkfun.com/datasheets/Dev … 50OVS4.pdf
You can find similar plots for the other LEDs.
https://www.sparkfun.com/datasheets/Dev … ANB4-H.pdf
https://www.sparkfun.com/datasheets/Dev … 6QWF-D.pdf
If you don’t want to do the math above, there are online calculators that do it.
http://led.linear1.org/1led.wiz