<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Getting to Know Arduino : Part 2 : Hello, Again!</title><link>/products/arduino/arduino-tutorials/b/blog/posts/getting-to-know-arduino-part-2-hello-again</link><description>players.brightcove.net/.../index.html Next Guide: Getting to Know Arduino : Part 3 : Taking your Temperature Previous Guide: Getting to Know Arduino : Part 1 : Hello, World! In part 1 of my Getting to Know Arduino , I blogged about flash...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Getting to Know Arduino : Part 2 : Hello, Again!</title><link>https://community.element14.com/products/arduino/arduino-tutorials/b/blog/posts/getting-to-know-arduino-part-2-hello-again</link><pubDate>Sat, 18 Jun 2016 18:33:24 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:4a395400-90f1-43c1-be87-442a1d2a3160</guid><dc:creator>jc2048</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Good blog. Explaining how to connect a circuit is a nice step on from watching an LED on a board blink.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I hope it&amp;#39;s all right if I comment on one or two things you wrote - don&amp;#39;t think of it as criticism, think of it as me adding to and refining what you&amp;#39;ve done:-&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;quot;typically a 1Kohm resistor will do&amp;quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The photograph has a 220 ohm resistor.&lt;/p&gt;&lt;p&gt;Doesn&amp;#39;t really matter. Either would do, they just result in different currents, but it might be a bit confusing for a beginner who isn&amp;#39;t very sure about reading resistor colour codes. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;quot;...the forward current (or just current) in mA (milliamperes)...&amp;quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;If using Ohm&amp;#39;s Law, calculate with the current in amps, not milliamps. So if you want 10mA, use 0.01A in the equation.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;For example, if the forward voltage of your LED were 2V, then for 10mA the resistor would be&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;R = V / I&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;R = (5V - 2V) / 0.01 = 300 ohms.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The voltage in the equation is 3V, and not 2V, because it&amp;#39;s the voltage across the resistor we are interested in, not the voltage across the LED (and the voltage across the resistor is what&amp;#39;s left after the LED has had 2V from the 5V that&amp;#39;s on offer).&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;quot;It has been known that cheap LEDs you can acquire have been manufactured incorrectly and that the casing on the LED has been rotated. So sometimes it is a lucky dip as to whether or not it will turn into a FED depending on the build quality.&amp;quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;That&amp;#39;s a bit unfair to the manufacturers. There never was a correct way. In the early days you used to see both; it&amp;#39;s just that, later on, manufacturers started choosing the one that got a lead in the market and it&amp;#39;s ended up with mostly one orientation with just an odd few the other way.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;If you have the resistor in place, it&amp;#39;s unlikely you&amp;#39;ll damage the LED by putting it in the wrong way round. If the LED has an anti-static protection diode, the resistor will limit the current enough not to blow it up [don't run it for too long like that, though], and if there isn&amp;#39;t a protection diode, the LED will normally survive a reverse voltage of 5V [datasheets often used to give 5V as the minimum absolute max reverse breakdown voltage, but in practice it would be higher than that because they give themselves a safe margin]. Just remember not to connect it without the resistor.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;quot;... and the source voltage (you can find out from the specifications on the Arduino, but I can easily tell you it is 5volts)...&amp;quot; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Look up the Atmel datasheet for the ATMega328 and refer to the graph on page 356 (Figure 30-71). There you&amp;#39;ll see that with a supply voltage of 5V, the output pin will sit down to 4.45V if you sink 20mA from it (at 25C).&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=17411&amp;AppID=148&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>