This is a "Please double check my work" post. Despite all the drivers and mods I've done, I've never actually worked with an 'indicator' LED before. In this instance it'll be a red and a green LED driven directly from an MCU pin.
Now to avoid blowing up the MCU (by pulling far too much current from it), we need to add a current limiting resistor. The MCU in question will be an ATTINY13A.
At a drive current of 30mA, the LED has a Vf of 3.2V. In order to limit the current to 30mA from a fresh 4.2V battery source (this is the voltage the ATTINY will supply), the current limiting resistor needs to be (4.2-3.2)/0.03 = 33.33'ohm or just 33ohm. The power rating of this resistor must be P = Vdrop*I = 1*0.03 = 0.03W
At a drive current of 30mA, the LED has a Vf of 2V. In order to limit the current to 30mA from a fresh 4.2V battery source, the current limiting resistor needs to be (4.2-2)/0.03 = 73.33' or just 74ohm. 75ohm is the most appropriate off the shelf resistor I can find. The power rating of this resistor must be 2.2*0.03 = 0.066W
Yay or nay?
Obviously if I parallel 2 or more LEDs (of the same color of course) my resistance will change as I want the drive current to be 60mA/90mA etc. For a pair of green LEDs from a single pin this would mean a single resistor of about 17ohm. Or just pair each LED with its own 33ohm resistor.
Obviously the sink current rating of the MCU is important here so I have to figure out what my maximum drive currents can be. I just used 30mA in the examples above as they are the standard operating ratings. If the drive currents need to be lower then I'll go datasheet diving :)
You probably don’t want to be driving an indicator LED at 30 mA… it will be too bright. Try starting at around 5mA. I usually use around 220 ohm resistors… sometimes 1k.
This thought crossed my mind so thanks for confirming it. The LED has to shine through a fairly thick opaque rubber button. I might work off 5mA and buy resistors to cover 1mA up to 10mA.
No idea! I've decided to build an entirely new driver so I'm waiting for the PCBs to arrive. Good news is the led is perfectly centered and focused with zero adjustment needed. Throws well at 3A so we'll see what it can do direct driven :) I should actually do some measurements!!
I should also mention that I've been inspired by your build, though won't be going crazy with it. I'm using a 50mm aspheric to do a Mag mod with an MT-G2 that should be pretty cool. The back focus length of the 50mm lens is only 26.2mm which is fairly close to the top of the mag body when the head is screwed just past the o-ring groove. That makes the build pretty straight forward. l like that I will be able to focus the beam to be more or less "spot" as needed.
Sort of like the ultimate zoomy lol. Could be a very useful light!
I removed the stock driver completely. It's completely intact although I am pinching the switch to ensure a stock switching action. In theory I could go back to the stock setup anytime I want.
Good info. I was considering doing the same thing with my SRK that I haven't touched in over a year that I installed an illuminated switch in - https://budgetlightforum.com/t/-/15114
I only have one light with an indicator (BST), but this seems like a fun thing to try… especially after I spent part of today writing a battery check mode.