Project 1: Light: New Components Introduced in This Project
Project 1: Light: New Components Introduced in This Project
• LEDs
• Resistors
• Potentiometers
• Photoresistors
• Polarity
• Ohm's Law
• Digital Output
• Analog vs. Digital
• Analog Input
• Analog to Digital Conversion
• Voltage Divider
• Pulse-width Modulation
• Functions
Parts Needed
Grab the following quantities of each part listed to build this circuit:
New Components
LED (Light Emitting Diode)
Light-Emitting Diodes (LEDs) are small lights made from a silicon diode. They come in different
colors, brightnesses and sizes. LEDs have a positive (+) leg and a negative (-) leg, and they will only
let electricity flow through them in one direction. LEDs can also burn out if too much electricity flows Page | 2
through them, so you should always use a resistor to limit the current when you wire an LED into a
circuit.
Resistors
Resistors resist the flow of electricity. You can use them to protect sensitive components like LEDs.
The strength of a resistor (measured in ohms) is marked on the body of the resistor using small
colored bands. Each color stands for a number, which you can look up using a resistor chart.
New Concepts
Polarity
Many electronics components have polarity, meaning electricity can only flow through them in one
direction. Components like resistors do not have polarity; electricity can flow through them in either
direction. However, components like an LED that do have polarity only work when electricity flows
through them in one direction.
Ohm's Law
Ohm's law describes the relationship between the three fundamental elements
of electricity: voltage, resistance and current. This relationship can be represented by the following
equation:
Where
• V = Voltage in volts
• I = Current in amps
• R = Resistance in ohms (Ω)
This equation is used to calculate what resistor values are suitable to sufficiently limit the current
flowing to the LED so that it does not get too hot and burn out.
Page | 3
Digital Output
When working with microcontrollers such as the Arduino Uno. there are a variety of pins to which
you can connect electronic components. Knowing which pins perform which functions is important
when building your circuit. In this circuit, we will be using what is known as a digital output. There
are 14 of these pins found on the RedBoard and Arduino Uno. A digital output only has two
states: ON or OFF. These two states can also be thought of as HIGH or LOW or TRUE or FALSE.
When an LED is connected to one of these pins, the pin can only perform two jobs: turning the LED
on and turning the LED off. We'll explore the other pins and their functions in later circuits.
Hardware Hookup
We recommend familiarizing yourself with each of the components used in each circuit first.
Pay close attention to the LED. It is polarized. The negative side of the LED is the short leg, marked
with a flat edge.
Page | 4
Components like resistors need to have their legs bent into 90° angles in order to correctly fit the
breadboard sockets.
Ready to start hooking everything up? Check out the circuit diagram and hookup table below, to see
how everything is connected.
Circuit Diagram
Page | 5
Page | 6
void setup() {
void loop() {