Lesson 5 question

For makers who have purchased an Adafruit Starter Pack, get help with the tutorials here!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
billymeter
 
Posts: 4
Joined: Thu Apr 08, 2010 10:17 pm

Lesson 5 question

Post by billymeter »

In lesson 3, I hooked a LED up on a breadboard with a 1000Ω resistor to the positive lead of the LED and the negative lead connected to ground. In lesson 5 though, the pictures of the protoshield show the positive lead of the LED connected to pin 12 and the negative lead connected to ground. Why is this connected differently between the two examples? Thanks!
Last edited by billymeter on Sat Apr 10, 2010 9:37 am, edited 1 time in total.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Lesson 5 question

Post by adafruit_support_bill »

I'm not sure which specific diagrams you are referring to, but in all of them, the LED is in series with the resistor.
It doesn't matter which side of the LED the resistor is on, as long as it is in series to limit the current flowing through the LED.
The LED however, must always be oriented with the negative lead toward ground.

User avatar
billymeter
 
Posts: 4
Joined: Thu Apr 08, 2010 10:17 pm

Re: Lesson 5 question

Post by billymeter »

Forgive me for not being specific enough. I'm talking about this diagram from lesson 3:
Image

And this diagram from lesson 5:
Image

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Lesson 5 question

Post by adafruit_support_bill »

I can see how those pictures might be confusing. But both circuits are functionally equivalent.

In the lesson 3 case, the resistor is between the LED and Pin 13. In lesson 5, it is between the LED and ground.

But in both cases, the LED is oriented with the negative lead (flat side) toward ground, and the resistor is in series to limit the current.

pm6041141
 
Posts: 79
Joined: Thu May 29, 2008 5:26 pm

Re: Lesson 5 question

Post by pm6041141 »

Also, the resistor in the picture is a 1000 ohm, not 100 ohm.

User avatar
billymeter
 
Posts: 4
Joined: Thu Apr 08, 2010 10:17 pm

Re: Lesson 5 question

Post by billymeter »

Thank you both for your replies. I appreciate the correction of the corrected resistance rating on the resistor, I'm still learning the color codes.

I am a complete rookie at electronics. I got the starter kit from adafruit to learn about them. I didn't grasp the concept that when a resistor is in a series circuit, the current is the same between each component.

User avatar
fazjaxton
 
Posts: 59
Joined: Mon Sep 28, 2009 2:18 pm

Re: Lesson 5 question

Post by fazjaxton »

I didn't grasp the concept that when a resistor is in a series circuit, the current is the same between each component.
You are correct. However, it is also true for any number of circuit components in series. The current cannot be greater in one component than in another, because otherwise where would that extra current go? This is known as Kirchhoff's current law.

The diode is a device that can be thought of as having a constant change of voltage regardless of the amount of current that travels through it. It acts like an open (unconnected) circuit when provided with a voltage less than its required voltage, and acts like a short (connected) circuit when provided with more than its required voltage. Your led only takes up about 1.8v of the 5v provided, allowing any amount of current to pass through it. To keep too much current from passing through it and damaging it, the resistor is used to limit current. The current through the resistor is determined by Ohm's Law, voltage (V) = current (I) * resistance (R) or equivalently I = V / R. With no resistor, and no resistance provided by the LED, you can see that the current is theoretically infinite. (I = 5 / 0). The resistor is added to control the amount of current that flows through the path of series components, setting the brightness of the LED and protecting both it and the microprocessor from high currents.

Since, as you say, the current is the same in all components in series, the order of the components does not matter. :)

User avatar
fazjaxton
 
Posts: 59
Joined: Mon Sep 28, 2009 2:18 pm

Re: Lesson 5 question

Post by fazjaxton »

Oops, my mistake. Ohm's law for the resistor should use 3.2 V (instead of 5 V), as 1.8 V are taken by the diode. 3.2 / 0 is still infinite, but you will need to use 3.2 to correctly calculate the current when you add resistance.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Starter Pack”