Really dim LEDs

Hi all,

I have set up a circuit wtih 10 LEDs and 5 infrared distance sensors with code to light up certain LEDs It was all working fine and then i moved the circuit and the arduino and then used a DC adaptor, which i have used before at 6V and 7.5V plugged into the mains. The circuit then didnt seem to work. I have now rewired the circuit and re-programmed to test each LED. I have it plugged into the computer that it use to work on with the USB cable. They light up individualy but are very very dim.

Does anyone know what the issue could be? Is it to do with the current they receive? I have tested all the infrared sensors and they are working fine. Could something have been knocked or moved?

Thanks in advance

I'm confused. Are they dim when plugged into the computer, or when using external power?

The voltage regulator needs 7v+ (if you're using a wall adapter) to provide enough stable voltage to the ATmega.

Its plugged into the computer when they are dim.... they never use to be ?

Its plugged into the computer when they are dim.... they never use to be ?

Is it just ten LEDs? Maybe you're drawing too much current. What are the LEDs rated at? Bear in mind that you should only draw a maximum of 200mA of current from the Arduino at any given time. It's also possible you're applying too much current, and they're burning out. I've killed quite a few LEDs, but they tend to dim out and die within a few seconds of applying too much current/voltage..

I hadnt done anyhing differently though? Would it burn out all 10? i havent changed how much current i am drawng though as i am still just using the USB cable?

I hadnt done anyhing differently though? Would it burn out all 10? i havent changed how much current i am drawng though as i am still just using the USB cable?

The USB cable provides up to 500mA of current, but you shouldn't draw more than 200mA. Like I said, I suppose the LEDs could slowly burn out over time if being over-currented/voltage(ized? :P).

You still didn't answer one of the questions though: What kind of LEDs are they, and are you using resistors of an appropriate value? :-?

when i plug in the AC/DC adaptor now set at 7.5V to the mains it it asslightly brighter LED than the USB but still not close to the brightnes it was. Does this mean the resistance has increased somewhere along the lines?

they are 5mm red LEDs i believe 20mA forward current maybe 30?

What is weird is that it was working fine. Then i moved it, now the LEDs are dim. They use to be very bright.

anyone else experienced this?

const int ledPinPlay = 13; // the pin that the LED for Play/pause is attached to
const int analogPinVol = 0;    // the pin that the volume is attached to
  const int ledCount = 6; 
   
  // Variables will change:
 int ledPins[] = { 
   7, 9, 10, 11, 12, 13 };   // an array of pin numbers to which LEDs are attached
 
 
  void setup() {
       // loop over the pin array and set them all to output:
   for (int thisLed = 0; thisLed < ledCount; thisLed++) {
       
   }
  }
  
   void loop() {

   // read the volume:
   int sensorReading = analogRead(analogPinVol);
   // map the result to a range from 0 to the number of LEDs:
   int ledLevel = map(sensorReading, 120, 600, 0, ledCount);
   // loop over the LED array:
   for (int thisLed = 0; thisLed < ledCount; thisLed++) {
     // if the array element's index is less than ledLevel,
     // turn the pin for this element on:
     if (thisLed < ledLevel) {
       digitalWrite(ledPins[thisLed], HIGH);
     } 
     // turn off all pins higher than the ledLevel:
     else {
       digitalWrite(ledPins[thisLed], LOW); 
           }
   }
   }

with this code in place with the analog volume sensor… the LEDs wont light up although theLED on the board, Pin 13, does light up as you move closer to the sensor (analogPinVol). Currently plugged into PC with USB

It is as though the board isnt getting enough current?

Any ideas?

can you set up a single led and 1k resistor and see how it looks. get all the code and cruft out of the way.

what resitors are you using now?

220 ohm. red yellow black black brown? sorry im new to this stuff

220 ohm. red yellow black black brown? sorry im new to this stuff

I could be wrong, but I thought 220 Ohms was Red Red Brown? :-?

220 would be red red brown

wht am i using then :s ?

if its a 5 band resistor it would be ~240 ohms, close enough (use your ohm meter to make sure)

yeah 240.... thats right :). But still how come so dim all of a sudden? i havent changed anything?

red yellow brown is 240, that’s fine. what do you get with just the led and resistor?

dont know, without seeing anything (and even then its going to be hard over the internet)

what I would do is break out the meter and test all points, disconnecting parts of the circuit and testing each area should help you narrow it down

(ie the power supplies, then the arduino, then a bank of led’s then the next ect)

This sounds like the sort of problem you might get if you hadn't got the grounds connected properly.