Voltage Regulator and Resistors for LED Circuit
Lowest cost solution from a battery.


Load Power = 3.3V*20mA*17=1.1W @340mA , which would be short operating time for AA's and 5V USB pack has no tolerance specs, cost or other obvious assumptions were given.
until then, this is the cheapest.








simulate this circuit &ndash; Schematic created using CircuitLab



If Vf@20mA is matched with 1% ( expected from same batch)  and Board has good copper heat radiation on pads for cooling, you can eliminate all the R's and drive with 3.3V Buck regulator rated for >350mA.

Or use a 3.3~3.7V LiPo cell and 3.3 Buck regulator with 90% efficiency max or TPS736-3.3 LDO (0.4A) for $0.75 but same efficiency as 17 * 15ohm R's but depends on 1% matching but gives constant If output to Vbat=3.4.


For a Boost Regulator with 20mA output, you need an array of 17S1P with 17*3.3V = 56.1V.

The problem

You cannot trust any EBAY specs for Ah when there is no datasheet to prove how they perform when loaded faster than 20h discharge rates are used. Anything must be proven with a datasheet and supported by supplier.
 Not all 18650 cells or USB packs are the same!!
Buyer beware!