CHAPTER 15 ■ COMPARATORS
The only trick to keep in mind when stringing on additional LEDs is that the voltage of each LED needs
to be subtracted from the battery total before selecting the value of the current-limiting resistor (R9). Here’s
that formula from several chapters ago:
(battery voltage - LED voltage) / (maximum LED current in mA / 1000) = minimum resistor
White LEDs need quite a bit more voltage than do red LEDs. About 3.1 V is common. If you don’t
have access to the datasheet for your white LEDs, the diode test on most digital multimeters can provide a
decent estimate. (Unfortunately, some older multimeters may not be able to test diodes with voltage drops
as high as 3 V.)
Because LEDs are tested at low current by the diode test of the multimeter, the true voltage consumed
by the LED will be larger in an actual circuit. For example, the meter’s diode test might display 2.6 V for a
white LED that actually uses 3.1 V.
That’s okay. The current-limiting resistor formula provides an improved safety margin if calculated with
the lower voltage determined by the multimeter. Of course, always provide the actual LED voltage from the
datasheets or actual circuit measurements if you can.
Here’s the formula for the headlight circuit with two white LEDs:
(9 V battery - 3.1 V white LED - 3.1 V white LED) / (30 mA maximum current / 1000) = 93 W
current limiting resistor
To be safe, I began testing the circuit with a more resistive value, 150 W. Even so, the white LEDs were
blindingly bright! So, I continued to increase the resistor value until I was happy with the brightness, which
also saves on power consumption.
Often, I’ll adjust the brightness with a trimpot and then measure the trimpot resistance with
a multimeter to determine the final resistor value to install. In fact, there isn’t any reason you can’t
permanently install a 20 kW trimpot (like the variable brightness LED circuit) and alter the headlight
brightness on the actual robot.
Figure 15-10. Schematic of the headlight circuit