The use of LEDs in daily life, in recent years has increasingly taken hold.
With the release on the market of power LEDs (1W, 3W, 5W, 10W …) the ability to illuminate our lives with these diodes is within everyone’s reach.
Unfortunately, the integrated power LED (like brand name bulbs) have costs still high enough, but the individual leds are affordable.
The problem for many is the power, as compared to classic 20mA LED that typically are fed at 12V with a 470Ω series resistor, this type of LED need, considering the power, to be fed not with constant voltage, but with constant current.
When you buy a high power LED, often the seller also provides its specified power driver at prices not always acceptable.
Hence my research on the various sites and blogs for a system to power these LEDs, which give me the ability to be dimmed even by a PWM circuit or by a microcontroller (such as Arduino).
I found two interesting projects, simple, easy to implement, experienced and above all economic and built with components very common and widespread.
The first circuit that I want to present, is constructed using the integrated circuit LM317, which is a variable voltage regulator, but in this case we will use it as a current regulator.
The circuit shown here is quite simple to understand. Between Vout and ADJ is present a reference voltage of 1.25 V, then applying Ohm’s law I = V / R, with a voltage of 1.25 V and a resistance of 3.6 Ω, we will have a constant current of approximately 347mA flowing through LED1, irrespective of the input voltage. This circuit is therefore suitable for example for powering a 1W LED (which typically uses 350mA).
Of course you can put more LEDs in series, but remember that the dropout is about 3V, so the input voltage must be at least 3V higher than the nominal LED voltage. However, if the voltage is too high the chip will warm up too much as all the excess voltage is dissipated just from LM317.
In fact this circuit from the point of view of yield is not the maximum; to power a 1W LED, the circuit draws approximately 4W.
We must also think about the fact that the power dissipated by resistance is about 1.25V multiplied by the circuit current (347mA in this case), then we should pay attention that resistance is adequate to power (we can put two or more resistences in series or in parallel to avoid this problem).
Everything is “PWM capable“, so we can feed the device with a PWM power driver (maybe i will public one in a future post), or drive the LED with a low power PWM signal, such as the output of a 5V Arduino. In this case the schematic will be modified as follows:
We had to change the value of the resistance R1 because introducing R2, the reference value is brought to 1.75V approx. It should be tested and measured with an current meter.
In this circuit VCC, that is the TTL input of our circuit (PWM output of an Arduino, rather than the logic output of a NE555), when is at a high value (+5V), the transistor Q1 conducts and the ADJ pin of the LM317 goes to ground, inhibiting the flowing of current in R1 and then in the LED. Conversely, if I bring the logic input to a low value (0V) the transistor does not conduct allowing the flowing of current: the LED lights up as in the previous example. Obviously logic works in reverse and then in microcontroller programming this should be taken into account, or at least you can add an additional transistor to invert the logic again.
In a future post, we’ll create another circuit that has the same function, but using a transistor instead of the LM317.