Pages: [1]   Go Down
Author Topic: Beginner question about the Arduino  (Read 1141 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 107
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just bought my first Arduino which is an UNO and I haven't done anything with it other than open it up and take pictures of it for other people.

I remember reading on the old forum that you had to use a resistor when blinking an LED or else you might burn out your Arduino.
Does it still hold true for the UNO?

Quote
Arduino UNO Tutorial 1 - Flashing LED

The Arduino UNO already has an led and resistor connected to output pin 13, so we will use that. No other components are required.
http://www.hobbytronics.co.uk/arduino-tutorial1-flash-led

Is it just pin number 13 or are there more pins that don't need a resistor?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 524
Posts: 26438
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, current limit resistor needed between ANY pin and an off-board LED. Examples here.

« Last Edit: March 07, 2011, 11:27:25 pm by CrossRoads » Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

0
Offline Offline
Full Member
***
Karma: 0
Posts: 107
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you for that picture.  Some day I'll know what to do with it.
Logged

USA
Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You don't have to have a resistor on pin13, but the rest you do.  Pin 13 has an led on the board, but you can add one too without a resistor.
Logged

Plano, TX
Offline Offline
Full Member
***
Karma: 0
Posts: 101
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
You don't have to have a resistor on pin13, but the rest you do.  Pin 13 has an led on the board, but you can add one too without a resistor.
That isn't true (anymore) - an external LED would still need a current limiting resistor.  The onboard resistor only applies to the onboard LED (in parallel with pin 13).  I understand that early Arduinos had the onboard resistor in series with pin 13 but that hasn't been the case since at least the Diecimila.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 107
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You don't have to have a resistor on pin13, but the rest you do.  Pin 13 has an led on the board, but you can add one too without a resistor.

If I power the Arduino with 5 volts through the USB or if I power it with a 9 volt battery, will the value (resistance) of the resistor have to change because the voltage changed?  And which side do I put the resistor on the LED again?  And if I ran the Arduino at different speeds, will it consume different power loads that I will have to use different resistors?  What value resistor do I use?
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 107
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
You don't have to have a resistor on pin13, but the rest you do.  Pin 13 has an led on the board, but you can add one too without a resistor.
That isn't true (anymore) - an external LED would still need a current limiting resistor.  The onboard resistor only applies to the onboard LED (in parallel with pin 13).  I understand that early Arduinos had the onboard resistor in series with pin 13 but that hasn't been the case since at least the Diecimila.

The beginner tutorials talk about using the led on the Arduino board but I haven't seen any tutorials that talk about adding your own LEDs which is what I want to do.
Logged

USA
Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

220 ohm to 1k or more is a pretty good value for running one LED.  The board has a 5 volt regulator and will keep it there so you don't have to change the value of the resistor if you hook it up to a nine volt battery.  Check out the learning link on this site.  It shows how to hook up leds and other things.  I'm a beginner myself.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 107
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Russ, Thank you very much!!
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 524
Posts: 26438
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

To calculate the resistor value, use Ohms law.
(Vsource -Vforward)/current desired = Resistance
Vsource is 5V if you are powering from the 5V pin.
Vforward is the forward voltage drop of the LED, this varies by color; from 1.7 up to 3.5V .  Read your spec.
Current desired is generally ~20mA, again read your spec. Do not exceed 40mA or you wil damage the Arduino output pin. 20-30mA is safe.  Many modern LEDs are really, really bright with that much current. I have some 10,000mcd white LEDs that I only run at 2mA because they were too bright.
So, for 5V, Vforward of 2.1V (random example), 20mA of current: (5-2.1)/0.02 = 145 ohm.  Go with a higher standard value of 150 ohm.

With this particular LED example, you could put 2 in series. Resistor:  (5-2.1-2.1)/.02 = 40 ohm, use a standard 39 or 50 ohm resistor.

If the LEDs have a range of voltage (ex 2.1 to 2.5V), use the lower voltage for calculations.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Grand Blanc, MI, USA
Online Online
Faraday Member
**
Karma: 92
Posts: 3964
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I just bought my first Arduino which is an UNO and I haven't done anything with it other than...

If you didn't already have the Arduino, I'd say have a look at one of the kits below.  They give you a bit of an introduction to electronics and programming, and step you through a variety of beginning projects.  Even so, go to the links below and check out the manuals that come with the kits.  Go through the setup part then try the first project for starters, which is just blinking an LED, but to get there you will learn the basics you need for other projects.  OTOH, you could go for a kit anyway.  Having two Arduinos is not a bad deal, these things are sort of like potato chips.

Have fun, good luck, let us know when you have that LED blinking!

http://www.adafruit.com/index.php?main_page=product_info&cPath=17&products_id=170
http://www.sparkfun.com/products/10173
« Last Edit: March 09, 2011, 07:15:16 am by J Christensen » Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Pages: [1]   Go Up
Jump to: