In “Driving Bigger Loads (Motors, Lamps, and the Like)”. We learned that each pin on an Arduino should be used for at most 20 milliamps. Checking on the Arduino website for “DC Current per I/O Pin” under “Tech Specs”, we find that for all Arduino boards based on the SAMD21 microcontroller (indicated above by ARM Cortex-M0+) this number is only 7 milliamps! Assuming a worst-case LED voltage of 1.8V, 3.3v – 1.8v leaves 1.5V on the resistor, and solving Ohm’s law for resistance R = V/I = 1.5/0.007 = 220 ohms. This means that you should always use a resistor of at least 220 ohms with an LED, and if your LED is too faint you will need to use a transistor.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *