Hi, I'm just learning arduino and trying to use the analogWrite method in order to do pulse width modulation on an LED. The LED does correctly brighten and dim but it never gets very bright at its peak. Checking with a multimeter, the pin does indeed output around 5 volts at its peak but the LED is never as bright as it is when I use digitalWrite(5, HIGH);. Can someone explain why this is? Thank you.
@wmmartin
It really depends on the LED forward voltage and how many MA it uses. You can find that information by looking at the data sheet.
But if I don't know what LED I'm grabbing, I'll usually use a 1k resistor. But some of the LEDs I have use only as low as 100 ohms, but they're actual "high brightness" LEDs.
You can always use Ohms law to figure out the resistance you need.
(Supply Voltage - Forward Voltage) / Forward Current
so I just used one of the LEDs I have for an example:
(5V - 2.2V) / 20MA = 140 Ohm resistance
But if you don't know values, I'd say 1k would be "safest"
And I don't know anything about the Multimeter and PWM.:X