standard constant current source buck module, input 3.6-5V, output 0-300mA up 3V - Page 1
Forum section: electronics / projects

author: ballen
author_rank: Regular Contributor
timestamp: December 24, 2022, 08:59:53 am
content: I'm building a light source for an autocollimator, based on a 1W green LED. The LED has an operating voltage of about 3V, current up to 300mA.I'd like to be able to use both an 18650 Li-ion battery (3.6-4.2V) and 5V USB jack as the power source, plus a potentiometer to control the current over a range of 0-300mA.Is there a small (probably made in China) buck converter board that can do this out of the box? I can't use a 1117-style LDO regulator because I'd need a minimum input voltage of 3 + 1.25V = 4.25V.

author: Zero999
author_rank: Super Contributor
timestamp: December 24, 2022, 09:29:41 am
content: Does it have to be switched mode?How about a voltage reference, op-amp and transistor?

author: ballen
author_rank: Regular Contributor
timestamp: December 24, 2022, 05:37:01 pm
content: Thanks for the circuit. It's a nice solution - if I understand correctly, after subtracting the collector-emitter drop of 0.7V, this can supply up to about 2.9V to the LED. And to vary the current from 0 to 300mA I just replace R3 with a 15k pot and use the center tap to drive the positive input of the comparator.There are a two reasons why I would prefer a switched solution, especially if there is a packaged one ready to drop in. First, I think that D1 might need as much as 3.3V driving it at high currents, which would require at least a 4.0V supply in your design. Less important, it would be more efficient when running off a battery at lower currents, although in your design the losses are probably at most ~20%.So my question stands: is there a small standard SMD board containing a buck regulator which can be configured as a constant current source?

author: Zero999
author_rank: Super Contributor
timestamp: December 24, 2022, 06:55:40 pm
content: Not quite. The minimum voltage loss is dependant on the saturation voltage of Q1 + VR1. In this case the Q1 will saturate at just over 100mV, say 130mV at 300mA, with the LM358 outputting 10mA, so it will be able to drive LEDs at power supply voltages as low as VF+430mV, so 3.43V, with a 3V LED. Adjusting R1 to R3, so the voltage across R3 is lower will reduce the loss, but there's a point when the offset voltage of the LM358 starts to introduce a significant error and a more expensive op-amp is required.I wouldn't recommend replacing R3 with a potentiometer, because variable resistors have a high tolerance, typically 20% or worse, which would introduce a large error. It would be better to use the spare op-amp in the LM358 package as a buffer between R2 & R3 and the potentiometer.A buck regulator would be more efficient, but the difference would be greater at higher power supply voltage. The efficiency of a linear regulator is simply the VOUT/VIN, so about 83% at 3.6V and 60% at 5V, with a 3V LED.It's possible to build a crude buck regulator with a comparator, but it's probably not much more efficient than linear, at lower voltages and it's much more complicated.

author: Zero999
author_rank: Super Contributor
timestamp: December 25, 2022, 09:23:46 am
content: How about the LM3405A?https://www.ti.com/lit/ds/snvs508d/snvs508d.pdfAs simpler option is the PAM2804, but it's not adjustable.https://www.diodes.com/assets/Datasheets/PAM2804.pdf

author: ballen
author_rank: Regular Contributor
timestamp: December 26, 2022, 11:38:24 am
content: Thanks for correcting me on the voltage drop across the transistor. I was thinking of base-emitter not collector-emitter.I've done some experimentation with the LED and discovered that if I drive it at 300mA it is much too bright. In fact even at 100mA it is probably brighter than needed. So I'm going to go with the first circuit you proposed, modifying it to vary the current and going up to just 100mA.(Precision/linearity of the pot is irrelevant here. This is setting the intensity for a visual measurement system, so as long as it varies smoothly over the pot range, all is good.)

author: ballen
author_rank: Regular Contributor
timestamp: December 28, 2022, 11:23:43 pm
content: FYI I just tested your circuit with some small modifications (ie a standard zener rather than a shunt reference). It works very nicely, over a wider range of Vin than I need. Thank you again!