Circuit Design - Need 35mA through UV LED using a GPIO controlled switch
Okay, the 340nm version has a chance of operating properly from a 5V supply, but as there are no minimum/maximum Vf specifications it is hard to predict the forward voltage of the sample(s) you happen to have. 

A MOSFET + resistor is the simplest approach. For example, an AO3400 (n-channel) or AO3401A (p-channel) will have less than 50-80m\$\Omega\$ resistance with 3.3V drive. 

If you pick the AO3400, the resistor will be about 29-30 ohms. If the particular LED you have is low Vf (or damaged) the current could be more, if it is high (or damaged) it could be lower. 







simulate this circuit &ndash; Schematic created using CircuitLab

Try it with just the resistor first, if you can't get 35mA you certainly won't get 35mA with the transistor in there. It's possible you've damaged the LED if you can't get close to 35mA with just a 30 ohm resistor. 

If you are doing a more professional design, an op-amp current sink would be preferable, but that won't help if the Vf exceeds about Vcc-150mV, assuming a 100mV resistor. Note also that if the circuit is wired incorrectly it will likely destroy the LED because it will conduct far over the rated current. The first circuit makes that much less likely. 







simulate this circuit