If the LEDs are to be directly powered by the batteries, the blue, white, and possibly the green LEDs (depending on which type of green LED it is) will not work at all on 3 Volts: They require a forward voltage of 3+ Volts, 3.4 Volts as specified in the question.
Also, once the voltage starts dropping due to depletion, even the marginally lit ones (e.g. the green, may be the orange) will no longer work.
Therefore ideally only red LEDs should be used: Red LEDs typically have the lowest operating voltage amongst visible colors. Alternatively, as noted, 3 cells would be needed in series.
Now about power:
LEDs can be operated typically at half the nominal current or less. So 20 LEDs operated in parallel at around 10 mA each will require 200 mA current, well within the capabilities of typical AA Alkaline cells.
For instance, the Energizer E91 Alkaline AA battery is rated for around 3 to 4 hours at 200 mA current. Put three of those in series, add in an appropriate current limiting resistor for each LED, and it will all work.
LEDs are current driven devices, not voltage driven. Hence, as long as the drive current requirements are met, the voltage involved is merely a dependent variable, so to speak.
For both types of LEDs mentioned, a constant current buck LED driver would probably provide the lowest cost Bill of Materials for a very high efficiency design.
For instance, the Texas Instruments LM3407 constant current, floating buck converter will allow a supply of 4.5 to 30 Volts, and a LED string forward voltage of anywhere between 10% and 90% of the supply. Taking the voltage numbers provided in the question:
- Vin(min) = 11.8 Volts ==> maximum Vf of string =
0.9 x 11.8 = 10.62 V
- Vin(max) = 28 Volts ==> minimum Vf at full input voltage =
0.1 x 28 = 2.8 V
So, as long as each string is between 2.8 and 10.62 Volts Vf, this regulator can support the application. Typical implementation, taken from the datasheet:
By using switching current regulators, the issue of getting rid of surplus voltage as heat is pretty much eliminated. As can be seen from the example of the LM3407 above, switching regulators aren't too fussed even if 90% of the supply voltage needs to be dropped within the regulator: The device does cycle-by-cycle current regulation of the load (the LEDs), and simply switches off the rest of the time, hence not needing to dissipate the excess voltage as heat.
This simplifies the series / parallel LED decision significantly: Simply put as many LEDs in series as you like, up to the maximum determined by the supply voltage lower limit (10.62 Volts as calculated above).
Thus, 3 LEDs of 3.4 Vf, or 5 LEDs of 2.2 Vf can be supported per string, in this particular application.
Best Answer
LED forward voltages can vary some - enough that it would be difficult to set a precise current with them merely tied in series across a fixed voltage. Total Vf for the string can vary by several volts. You could very easily blow up the string just tying it to the supply as you’ve shown.
So, yes, you should still have a dropping resistor.
Even better, consider a constant-current driver. This not only would protect the LEDs from overcurrent, but would give consistent brightness despite variations in Vf.
There are switchmode constant-current drivers that can do this efficiently and for low cost, that also support PWM dimming.