Common!! What's wrong with the 3 LEDs in series if the power suuply
voltage is 10.5 and the LED drop voltage is 3.5? 3.5 x 3 = 10.5!!
Your LEDs wont be DEDs!! hehehe
Try adding another LED and it will give you a series/parallel
configuration..
Try this:
http://ledcalculator.net/default.aspx?values=10.5,3.5,20,4,0
Consider the consequences of one or more of the LEDs having a Vf that is
lets say 5% low, or 5% too much supply voltage. Also consider that a
typical LED has a Vf that decreases by about 2mV per deg C.
You are also actively encouraging the use of a non regulated battery supply.
A new 1.5V nominal Alkaline cell typically gives 1.55V. At 50%
discharge they tend to be down to 1.2 to 1.3V. A practical end of life
voltage is around 1V. If I use 8 alkaline cells for a nominal 12V
battery, it will start its life at 12.4V and be pretty much dead at 8V.
Hence my interest in what happens around 10.5V
If you are dropping less than about 1/3 of the supply across the series
resistor then either you will be throwing away batteries with a lot of
life left in them or you will be overdriving the LEDs with a new battery
hence my comment about DEDs (old geek humour - see early 70's AFJ
datasheet from TI). Also the brightness tracking in the 4 LED case you
gave will be abysmal. If the supply drops a mere 10%, the 3 series LEDs
will nearly extinguish while the single LED will be virtually the same
brightness.
You should read <
http://www.duracell.com/oem/Pdf/others/ATB-5.pdf>
For a regulated supply I *MIGHT* push my luck as far a 20% drop across
the series resistor, but only if I was operating at less than 50% of the
rated LED current.
Rewrite your calculator to balance the series chains as well as possible
for the number of LEDs and allow more headroom for the current limiting
resistor to do its work and provide for input of a supply voltage range,
give current in each branch for maximum and minimum supply voltage and
you *MIGHT* have something. Perform a worst case analysis (e.g 10% over
voltage, all LEDs with a Vf 10% low and resistors at minimum value for
tolerance). Also add a check box for 10% tolerance resistors.
Expect geeks to pound on your code till it breaks
Its not personal,
its just geek nature. If you register a domain rather than putting it
on your personal home page, expect harsher criticism. I do appreciate
the effort you've put in to making the site pretty, now make it useful . . .
Meanwhile, most of us will continue to solve simple stuff like this on
the back of an envelope or in our heads. Usually the process is more
driven by what resistors we've got handy than by what's ideal.