Indeed, an approach would be, using the PWM capabilities of your controller. You can generate a PWM waveform by using the analogWrite() function.
Parameters for your function:
pin: the pin to write to.
value: the duty cycle: between 0 (always off) and 255 (always on).
So, if your duty cycle is 255 that means you will have 5V, for 3.3V duty cycle should be somewhere close to 168.
However remember that "On most Arduino boards (those with the ATmega168 or ATmega328), this function works on pins 3, 5, 6, 9, 10, and 11".
All you need to know about this matter, you can find here http://arduino.cc/en/Reference/analogWrite
Anyhow, don't forget that when dealing with LEDs - polarity is important and also you should (actually must) have a resistor in the circuit so that the current is limited.
Just one more thing - analogWrite, as you may already know, does not use the digital to analogue converter - it uses the PWM capabilities of you controller. This is just FYI :)
Regarding the issue that you mentioned "To avoid unnessesary power/heat (even if not too much)" as Olin mentioned above, run you LEDs at low currents.
For a standard LED 20mA would be the nominal value. However 20mA is the "recommended" maximum output for your controller outputs :)
Solution: If you think 15mA is OK for the LED and your planning on feeding it at 5V (from a digital output pin) and considering that the diode forward voltage is, as you said, 3.3V use this right here http://led.linear1.org/1led.wiz and you'll see that you're gonna need a 120 Ohm resistor :) A bigger value would lead to a less brighter LED and a smaller value to a brighter one, but keep in mind that a too low value resistor will lead to your controller port being... fried :)
Plan using a lot of LEDs? Try a LED matrix approach, either way I think that what you want is the resistor version, not the PWM.
Good luck and all the best, sorry for the rusty english,
Dan
Be SURE that you are implementing this circuit.
Diode is needed (1N400x will do to start for motors under a few amps)
The MOSFET you are using is marginal for use with 5V gate drive.
A "logic FET" with a lower gate turn on voltage will be better.
The action you describe indicates either that the MOSFET is dead or connected wrongly.
The above circuit diagram is modified from fig 8. here
This is a useful page that will teach you things that you want and need to know.
Best Answer
You can drive the ULN2003a with 3.3V outputs- they don’t put any voltage onto the driving circuit.
Of course if you mess up the circuit or the grounding your chances of ruining the Pi are much higher than if you use 3.3V only.
You need series resistors for the LEDs and you should make sure that the maximum total current can be supplied by the 5V supply. Since they don’t tend to be grossly overrated it’s unlikely an extra 800mA will be acceptable. Also, in your comment you mention 7 ohms, which would yield several hundred mA and quickly destroy the LEDs and the ULN2003.
If you use an auxiliary supply the ground must be common. Connect the supply ground to the ULN2003 ground directly and that junction to the Pi ground.
If you’re making a PCB there are nifty SOT-23 MOSFETs that have very low voltage drop at 100mA and can be driven directly from the Pi.