red board LEDs too dim

Hi

I want to build a motion sensing bathroom night-light. I am using a brand new redboard, protoboard, IR motion sensor and an extra bright white LED (no spec I am afraid)

I am not getting enough brightness out of the LED. The LED is connected to D7 via a trim pot. Adjusting the trim pot seems to have no effect on the dull brightness of the LED. I am measuring about 1mA thru the LED.

D6 gives the same result. D0 has a bit more brightness but still disappointing, and I discovered it is part of the serial link when upload stopped working. I have a 2nd brand new red board which behaves the same

If I put the LED across 5v VCC then 80ohms gives about 20mA and the LED is very bright

My understanding is that a digital pin is good for 20mA. So why am I not seeing it?

Peter

The trim pot is a variable resistor. So depending on its value it will reduce the current through the led. Usually the trimpot values are much higher than 80 ohms, so it will reduce the current even further. How did you wire this up? It matters how it is hooked up.

For larger currents you would want to use a transistor to supply the current to the led and switch this. For stable and fixed brightness you would need a constant current led driver circuit.

[EDIT] In addition, these limits apply also:

http://arduino-info.wikispaces.com/ArduinoPinCurrent

Hi

D7 - trimpot - LED - GND

I use the middle (wiper) pin of the 200 Ohm trimpot and either of the outer pins to get a trimable resistance

Peter

Is that 1 ma you measured with your current meter at the low end of it’s resolution scale? Or was there another significant digit lower on the display? If the pin was set as input with internal pull-up resistor then the current supplied through the pin would be even lower but might register as that.

You did’n’t use analogWrite to set a PWM pulse train, right?

I have found the error

I forget to set the pin to Output eg:- pinMode(led7, OUTPUT);

The LED will switch ON despite this, though with limited brightness. some kind of leakage I guess

Sorry to waste your time

Peter

We’ve all done it