Is it safe to connect a #30 bulb directly to the arduino output pin

http://www.bulbtown.com/30_MINIATURE_BULB_WIRE_TERMINAL_BASE_p/30.htm
Is it safe to drive directly from a pin?

Maybe ... The specs seem to say it has 21mA current draw at 4.5V
I think I'd measure its 2 leads, see if it has reading of around 200 ohm to confirm that.
Or get a current measurement while powering from 3 AA batteries for confidence first.

Is it safe to drive directly from a pin?

Well the spec sheet says: 4.5 Volt 0.021 Amp. So that would on the surface say it would work great with an Arduino output pin. However (seems there is almost always a however) incandescent lamps have a property that initially there cold resistance will be lower then it's running resistance. So what is it's inrush current, and would it exceed the Arduinos absolute 40ma limit. I don't know, do you? I guess you could measure it's cold resistance to see how bad a situation it might be, but that doesn't tell you how fast it's resistance increases from inital turn on.

I would rather ask, why use an incandescent lamp at $2.73 a pop, marked down from $3.25? High brightness white leds are cheaper (.32 each in bulk, link below) then that and have no current inrush problem, and don't burnout like incandescent lamps.

Lefty

No, it's not safe.
In cold state resistance approx. 10 times less than it in hot condition.
It would overload output when turn on up to 200 mA, that is too much.

The measured current draw at 4.8v input is 26ma.

I would rather ask, why use an incandescent lamp at $2.73 a pop, marked down from $3.25? High brightness white leds are cheaper then that and have no current inrush problem, and don't burnout like incandescent lamps.

A. I already have one
B. It casts omni directional light
C. It can be PWM'd without flickering.

A. I already have one

Well if you must use it, just have a transistor do the current switching with the arduino output pin controlling the transistor.
B. It casts omni directional light

Have you ever tried diffused leds, I use them in my 5x5x5 led cube and they can be seen from any angle, even from their bottom where the leads come out.

C. It can be PWM'd without flickering.

That should be something you can 'fix' with software, leds don't flicker on their own.

C. PWM. Isn't normal PWM at 490-500 Hz? Can you see that flickering? I thought above 24H the brain put it together as steady. Good computer monitors used to go 60Hz, maybe 72. 500 for an LED would seem sufficient.

White ΓΈ 5mm Clear LED Extra Bright 20,000mcd - dipmicro electronics $0.26
Shipping $2.50
Get some other stuff at the same time, the price really drops with at qty 4 and then again at 10.
1 = 26 cents. 4 = 63 cents total. 10 = 94 cents total. 20 = $1.47 total.
Get some other colors for your next project!

You run one of these bad boys at 20mA, will seem omnidirectional it is so bright! I've read if you lightly sand the outside to diffuse it, will seem even more so.

I already have a high brightness LED and it has noticeable flicker at the low end of the PWM.

Try putting a cap in parallel to smooth it out.

I guess I will hook the bulb up with an external transistor.
Is a 2N2222 acceptable?

smeezekitty:
I guess I will hook the bulb up with an external transistor.
Is a 2N2222 acceptable?

Yes it is.

I already have a high brightness LED and it has noticeable flicker at the low end of the PWM.

Well that's weird...