A Lot of Blinking LEDs

An Arduino Uno can light up about 20 LEDs individually. In the absence of a driver circuit, as many LEDs as you want can be driven directly by the Arduino's I/O pins, as long as the total power drawn remains less than 200mA. This can be guaranteed by limiting the current to each LED to 10mA or less, or by limiting the duty cycle of the LEDs in software so that no more than 200mA is drawn at any given time.

A Direct-Drive Example

Here is a simple circuit that connects 20 LEDs in the form of a bar graph, implemented as an Arduino shield. See Figure 8-10 for the schematic and Figure 8-11 for an example PCB layout.

images

Figure ...

Get Arduino Internals now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.