Go Down

Topic: How many LED's can i use on the ATMEG328P-PU (Read 3859 times) previous topic - next topic

rob100

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.

fungus


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


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.

Advanced Arduino

rob100

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.

CrossRoads

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
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

fungus


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
Advanced Arduino

KirAsh4

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.

John_Smith

#6
May 30, 2013, 03:20 am Last Edit: May 30, 2013, 03:22 am by Boffin1 Reason: 1
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 .

45 years of editing projects with a knife and soldering iron, then I found Arduino !

CrossRoads

That collection of digits looks familiar - we discussed it in the past, yes?
Each segment is 4 strings of 5 LEDs in parallel?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

rob100

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.

CrossRoads

#9
May 30, 2013, 03:50 am Last Edit: May 30, 2013, 04:09 am by CrossRoads Reason: 1
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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

John_Smith

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

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

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.

45 years of editing projects with a knife and soldering iron, then I found Arduino !

CrossRoads

Guess a picture is still worth that 1000 words 8)
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

John_Smith

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 )
45 years of editing projects with a knife and soldering iron, then I found Arduino !

rob100

Sorry about all this thanks for your help guys.

CrossRoads

That's not a robot, that's a semi truck!
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up