I have been more interested in optimizing the user interfaces of my flashlights. Ramping FW like Narsil and from Toykeeper have the features I want and are intuitive to use. Maybe an even more intuitive UI is a sliding switch controlling the brightness from off to full. The way I chose to implement this was to continuously vary the gate voltage to a MOSFET via a voltage divider with a sliding variable resistor.
The light I put it on is my 7xXPL modded Convoy L2. I had previously drilled a small hole to the driver cavity to use an e-switch, and I used this hole to route the wires to the variable resistor outside the light. The variable resistor I used was this 10Kohm one. The MOSFET was the Vishay one from mtnelectronics.
This method really simplifies the system. There is no MCU or firmware, just a MOSFET and two resistors. The biggest challenge with implementing this is dealing with the heat dissipated by the MOSFET, which is up to 10W in this particular light. Below is a graph, for this particular light, of the power, in watts, the MOSFET must dissipate as a function of current, in amps. Basically it is the voltage the FET must “burn off” multiplied by the current. The heat the FET must dissipate is small at low and full power and maximum at half power.
The main heat dissipating contact of the FETs we typically use is that of the drain which is connected to the LED negative, so it must be kept electrically insulated from the flashlight body. At first I tried mounting the top of the FET to the bottom of the shelf using thermal paste and some epoxy, as shown below. I knew this was not optimal but I hoped it would be good enough. It wasn’t; the drain solder point desoldered within a few seconds at half power (which corresponds to max FET heat dissipation).
Next I used a 16mm MCPCB. I sanded the top down to reveal some copper and soldered the FET drain to the copper. The source and gate contacts were left overhanging. The plan was to attach the MCPCB to the bottom of the shelf. The shelf bottom in the L2 had a raised part in the middle so I sanded that down until it was acceptably flat. To electrically isolate the MCPCB from the flashlight body I used a layer of Kapton tape. This tape material has a thermal conductivity of 0.12 W/m*K and is 1-2 mils thick. Over the area of the 16mm MCPCB one layer of tape adds only 1-2 K/W of thermal resistance. I attached the MCPCB with thermal paste and some epoxy around the perimeter and clamped it down while the epoxy cured.
Judging by how hard it was to get the solder up to temperature to solder the LED negative wire, the thermal path is pretty good. The sliding switch is secured to the light with epoxy. The variable resistor goes from 0 to 10Kohms, and I chose 22Kohm for the other resistor in the divider. So the gate voltage can be adjusted from 0V to ~8V(10/32)=2.5V. The conductance changes quite quickly within a small voltage range, so only about the middle third of the resistor travel significantly adjusts the output.
A benefit of using constant current is that it is more efficient at producing light. Below is a graph of the approximate output (measured by ceiling bounce test) versus the current at the tailcap for the PWMing a FET and constant current through the FET. To measure the current I measured the voltage across a shunt resistor of 10mOhms. The cell voltage in each case was about 4.05V. There is not a huge difference in output between the two methods in this case, partly because the pulsed current is not that high, between 3 and 4A per LED. Higher pulsed currents lead to less efficiency.
Thanks for looking!