Resistors for LEDs

Hi there!

I'm trying to make a clock based on Arduino, but I'm not too familiar with designing my own electronic circuits. I have designed an array of LEDs connected in a series/parallel grid, and I am not sure exactly what kind of resistors I need, or where I should put them in order to keep from destroying the LEDs.
The LEDs look like this:

I am connecting them to a 5v power supply from a wall outlet, if that helps.

Thanks!

I am connecting them to a 5v power supply from a wall outlet, if that helps.

Well it helps me but not you.
You can not have more than two LEDs in series if you only have 5V to play with, depending on the colour of the LED the forward voltage drop is between 1.8 and 3V per LED. So to have 5 LEDs with 1.8V drop in series you need 9V for the LEDs and about another two or three for the resistor so that is 12V.

That schematic is weird everything seems to be shorting out.

Is this a Charlieplexed array perhaps?

The idea with my schematic is that each of the LED lines can be powered at any point to have all of the LEDs after that point light up. The transistors at the end ground the individual lines so that only one is lit up at a time.

Running 9v into the micro-controller is clearly a bad idea, so is there another way I can power these lights?

cammie827:
Running 9v into the micro-controller is clearly a bad idea,

Why do you say that? The product page for Uno for instance says:

The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may be unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.

cammie827:
is there another way I can power these lights?

You shouldn't provide power from the Arduino anyway; you can control them from Arduino (eg i/o pins to transistor base) but that's not the same as powering them.

cammie827:
The idea with my schematic is that each of the LED lines can be powered at any point to have all of the LEDs after that point light up. The transistors at the end ground the individual lines so that only one is lit up at a time.

That may be your idea, but you are obviously not understanding the basics of electricity.

You really must hold off on your board design until you have learned how to do it and have it working on a "breadboard". Start with a small array (using a lot of wires) and when you have it figured, then you may be able to design a board.

For LED arrays, you are vastly better off using MAX7219 driver chips. You should get one of the array modules from eBay or DealExtreme to play with first.

Paul__B:
For LED arrays

My wording may have been misleading in my original post, as well as the schematic being drawn in a strange way, but this is not an array of LEDs. I do understand the basics of electricity, but no more than that. The reason I'm drawing the schematic is because I do not currently have access to a breadboard, but I will in a few days. By drawing it out, I was attempting to organize my thoughts so I knew what I had to test out on the breadboard.

That being said, would you mind explaining to me why exactly this won't work? The goal is not to have one LED light, but that one and each one above it.

Also, I read the datasheet for the ATMega328, and it said operating voltage was 1.8 - 5.5, and since 9 is outside of that range, I assumed that it would fry something. I may be misunderstanding though.

Also, I read the datasheet for the ATMega328, and it said operating voltage was 1.8 - 5.5, and since 9 is outside of that range, I assumed that it would fry something. I may be misunderstanding though.

Yep that's the chip itself, but you said in original post that this project is Arduino based. The Arduino regulates the user's preferred voltage down to 5V for the chip.

But I repeat: don't power the leds from the Arduino. Get the power to them direcly from the supply, but switched by the Arduino using one means or other.

By drawing it out, I was attempting to organize my thoughts so I knew what I had to test out on the breadboard.

Yes but the drawing is very wrong.

  1. It does not show where the Arduino connections connect to the transistors and LEDs.
  2. It seems to show all the anodes connected together.
  3. It does not show where these anodes are connected to.
  4. As I said before these anodes need driving at at least 12V because the LEDs are in series.
  5. The LEDs that are not powered will be subject to a reverse voltage which will probably exceed the reverse voltage breakdown on the LEDs. But we need to know what LED you are using (data sheet) to be sure of this.

Okay, now what you're saying makes sense to me, and I think the easiest way to fix this would be to completely rethink the way the LEDs are being lit before going any further. I guess I'll just have to wait until I can get my hands on a breadboard after all. :stuck_out_tongue:

You're going to need the Jumbo Economy Super-duper Breadboard-de-Luxe for all those LEDs.... 8)

I suggest you take my previous advice seriously.

:wink: