How many LED's can i use on the ATMEG328P-PU

Hi guys

I am a beginner for using the Arduino uno board and I need some help. A lot of my work at home are building models for a hobby. I saw the Arduino on the internet and saw that you can program it to make LEDs flash. I just need to know how many LEDs can I run on the chip also can i program the chip and take it out of the Arduino add it to a PCB. I'm building a model and I need to put some flashing lights on it a lot of lights.
Can you guys help thanks.

rob100:
I am a beginner for using the Arduino uno board and I need some help. A lot of my work at home are building models for a hobby. I saw the Arduino on the internet and saw that you can program it to make LEDs flash. I just need to know how many LEDs can I run on the chip.

The chip has 18 usable outputs.

In reality you're limited to 200mA total output on all pins so you can only run the LEDs at about 10mA each (you need a resistor for every LED).

It's a much better idea is to add an external controler chip like the TLC5940 if you can:

ttp://playground.arduino.cc/learning/TLC5940

rob100:
also can i program the chip and take it out of the Arduino add it to a PCB.

Yes, so long as you add a crystal oscillator for the clock.

Hi thanks for that.

As i am a beginner do you have a pic so i can see how it look like adding the TCL5940 and LED and ATMEGA328P-PU ON A BREAD BOARD. Also what is an crstal oscillator? LOL.

328 and TLC5940 might look like this on a PCB. The silver cans in the middle are crystal oscillators.
This one has RS232 buffer for serial interfacing.

A pre-PCB version might look like this. This has a USB/Serial interface module at the lower left.

Some parts on a solderless breadboard might look like this

CrossRoads:
328 and TLC5940 might look like this on a PCB. The silver cans in the middle are crystal oscillators.

You need one of those and two of the brown lentil shaped things.

The full process is here: http://arduino.cc/en/Main/Standalone

Another option is to go for a digital LED strip, like this or this. Then you only need two signal lines from your controller and you can have as many (addressable) LEDs as you want (so long as you can pump the data down fast enough.) 160 to 320 LEDs are easily obtainable.

If you use chips such as the TPIC6B595 you can drive many LEDs heres a project I have just finished with one 328 and 19 TPICs driving 2668 LEDs Well actually there is another 328 in the remote control .

That collection of digits looks familiar - we discussed it in the past, yes?
Each segment is 4 strings of 5 LEDs in parallel?

Thanks so dose the 328 control the TPIC6B595 chip. So can 1 led flash at 4000 and other at 2000. I need to make a PCB do u have a pic of the two chips. It is for a Star Trek model the lights run a 4000 and the other light run a 2000. I just need about 11 LEDs to work. Do u know how I can make a PCB.

Step by step pls.

The '328 controls the TPIC6B595, which is a shift register.
11 LEDs, you can control that directly from an Uno with no need for a shift register, just 11 current limit resistors.

"Each segment is 4 strings of 5 LEDs in parallel?"

You can read that two ways :slight_smile: its 4 ( strings of 5 LEDs ) in parallel, not 4 ( strings of 5 LEDs in parallel ) :slight_smile:

With red LEDs ( approx 2 Vf ) its handy to have 5 in series so with a 100 ohm resistor it can run off of a psu or a car battery .
With the odd voltage drops across the TPICs and the ribbon cable I use, I have to set the psu to about 13 odd volts to get 20mA through the LEDs, which are rated at 25mA.

Apart from orange LEDs from one particular manufacturer, which were terrible , I have only had about 10 LEDs fail in the last 30,000, so I keep to 20mA.

Guess a picture is still worth that 1000 words 8)

Wait til you see the photo of the robot I am just finishing the remote controller for.

I thought it was the same giant robot that I made ( a CMOS logic ! ) remote for in 2002, but its a new smaller one, with 4 wheels 18.5 meters apart ( 60 feet )

Sorry about all this thanks for your help guys.

That's not a robot, that's a semi truck!

I have only got pictures of it in the factory, which only show a bit at a time, but they are getting it outdoors this weekend, so I should get a decent pic then.