HowTo-Color (8) / Hacking Electronics / Simon Monk / 236-3 / Chapter 4
64
Hacking Electronics A half-watt resistor will therefore be fine. The LM317 also needs its input to be about 3V higher than its output to guarantee 1.25V between Adj and the output. This means that a 6V battery would not be quite high enough because the forward voltage is 3.4V. However, we could drive the circuit using a 9V battery or even a 12V power supply without modification, since whatever the input voltage, the current will always be limited to about 260mA. A quick calculation of the power consumed by the LM317 will reassure us that we are not going to come near exceeding its maximum power rating. For a 9V battery, the voltage between In and Out will be 9 – (1.25 + 3.4) = 4.35V. The current is 260mA, so the power is: 4.35 × 0.26 = 1.13W. According to its data sheet, the maximum power handling capability of the LM317 is 20W, and it can cope with a current of up to 2.2A for a supply voltage of less than 15V. So we are fine.
Breadboard Figure 4-11 shows the breadboard layout for this, and Figure 4-12 displays the actual breadboard. These LEDs are almost painfully bright, so avoid staring at them. When working with them, I cover them with a sheet of paper so I can see when they are on without being temporarily blinded!
04-ch04.indd 64
Figure 4-11 The LED constant current driver breadboard layout
12/29/12 2:11 PM