The first method is to use a proper size resistor in series with the LEDs. The resistance value is chosen to limit the flow through the LED at maximum voltages the battery will operate at (usually during charging). The second method is to use the proper number of series connect x-mass tree bulbs as a varistor (change in resistance with increase in voltage). The positive increase in resistance with increase in current is used to advantage and this method is more efficient at producing light than a simple resistor. The third method of driving LEDs is by use a LM 317 integrated circuit chip in series with a resistor that limits current to given value over a wide range of input voltages. This method works best when input voltage is expected to vary over a wide range. The following shows the resulting current for different values of R.
Offered by Mike.