I want to vary output DC current(0-450mA) Of LED driver keeping voltage constant using arduino output voltage (0-5 Volt) is there any IC or current regulator operated on arduino (0-5 volt )i.e at 0 volt(of arduino ) 0mA current and if 5 volt(of arduino ) 450mA current i.e whene i increase or decrease output voltage of arduino then output current of driver is also increase or decreases respectively
closed as unclear what you're asking by Voltage Spike, Dmitry Grigoryev, uint128_t, Autistic, ThreePhaseEel Jan 22 '17 at 2:15
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
As this is roughly linear, you would use an LED Driver with an enable and/or PWM pin. Use PWM on the output pin of your Arduino. At 100% PWM, the full current will be seen 100% of the time. At 50%, the average current seen in the time period will be 50% of the full current. I.E. 450mA for 1/2 second and 0mA for 1/2 second is 225mA over 1 second average.
As LED lighting is not linear though, you will not see the LED at 50% brightness. We perceive brightness Logarithmically. Adjust your PWM as you see best.
What you're talking about is a voltage to current converter. You can roll your own using an op amp and a MOSFET.
A few notes which you must pay attention to:
1) R2 must be rated for at least 3 watts. It carries as much current as the LEDs, and at full current is dropping 5 volts to match the control voltage.
2) V1 must be about 8 to 10 volts greater than the LED voltage. It must supply the LED voltage plus 5 volts for R2 plus a few volts for the MOSFET.
3) V2 cannot be 3.3 or 5 volts. I don't care if that's convenient because you're already providing it for the Arduino. You need to provide an output of at least about 9 volts - 5 volts for R2 and 4 volts for the gate drive of the FET (and maybe a bit more). So 12 volts is a minimum, and 15 is better.
4) Because you want to control the current down to 0 amps, you cannot run the op amp as a single-supply, or at least not reliably. V3 must be a negative voltage, and for the TL081 it's a minimum of -5 volts. Getting +/- 12 or +/- 15 is easier.
5) The MOSFET must have a heatsink.
There are tricks you can play, such as
Here, the input resistors divide 5 volts down to 455 mV, and a convenient 1 ohm resistor will produce 455 mv for 455 mA. This uses more resistors, but the sense resistor becomes a very convenient value, and it power dissipation drops to less the 1/4 watt. This also reduces the requirement for excess voltage from V1.
Overall, this is simple and reliable, but it takes more parts than a dedicated LED driver.