I'm new to electronics and am trying to make a night vision circuit. A similar question has been asked before, but with priority on efficiency. I want to control a 700mA-1000mA IR LED using a 5v input and an ESP8266 microcontroller as part of a night camera project. The LED should be able to be switched on/off from the MCU and will be off most of the time.
One solution is to use a dedicated LED driver / constant-current power supply, which is expensive (e.g. this LED driver for $7+shipping). Another solution is to use a single high wattage resistor, which is very inefficient. See:
How to drive high powered LEDs as efficiently as possible
How to drive high power LED and Arduino by the same power source?
I'm looking for a method of driving the LED using components that I can get cheaply (typical Arduino hobbyist components - a quarter watt resistor multipack, a transistor multipack (e.g. with BC337 and 2N2222 NPN transistors), buck/boost converters, the microcontroller itself).
LED specifications
These LEDs: https://www.aliexpress.com/item/32810764742.html
Forward Voltage: DC1.4-1.6V
Forward Current: 700-1000mA
Simple resistor method
My first thought is to use a current-limiting resistor. Then, from R=V/I we get R=5/0.7=7 ohms. From P=IV we get P=0.7*5=3.5 watts. I only have quarter watt resistors (and 3.5 watts sounds like a lot of power to dissipate), so this solution is not desired.
2-transistor method
I read about a method of limiting current using 2 transistors (schematic attached below).
Source 1 http://www.physics.unlv.edu/~bill/PHYS483/current_lim.pdf
Source 2 https://www.homemade-circuits.com/universal-high-watt-led-current-limiter/
This would satisfy my requirements of being a cheap solution and using simple components. I have BC337 and 2N2222 transistors. I think the BC337 can handle 800mA, with hFE being 100-630 (info for BC337 here). In the sources, they use an hFE value of 30. How do I know what value to use?
Questions
- How to choose hfe?
- What values should be used for R1 and R2?
- How much power will the BC337 transistor need to dissipate?
- Is the sensitivity to temperature tolerable? (e.g. 0-30 celsius)
- The ESP8266 can output a PWM signal. Would this be useful for the circuit?
Here is my attempt at a schematic. This doesn't yet incorporate switching using 3.3v logic from the ESP8266.