
9
PICAXE-08 ALARM PROJECT
revolution
© copyright 2002 - AXE102 Alarm Student Project Notes Version 1.1
Revolution Education Ltd. Email: [email protected] Web: www.rev-ed.co.uk
9
Supported by:
0V
pin
330R
L
IGHT
E
MITTING
D
IODE
(LED)
What is an LED?
A Light Emitting Diode (LED) is an electronic component
that gives out light when current passes through it. An
LED is a special type of diode. A diode is a component
that only allows current to flow in one direction. Therefore when
using a diode, it must always be connected the correct way around.
The positive (anode) leg of an LED is longer than the negative
(cathode) leg (shown by the bar on the symbol). The negative leg
also has a flat edge on the plastic casing of the LED.
What are LEDs used for?
LEDs are mainly used as indicator lights. Red and green LEDs are commonly used on
electronic appliances like televisions to show if they are switched on or in 'standby'
mode. LEDs are available in many different colours, including red, yellow, green and
blue. Special 'ultrabright' LEDs are used in safety warning devices such as the 'flashing
lights' used on bicycles. Infra-red LEDs produce infra-red light that cannot be seen by the
human eye but can be used in devices such as video remote-controls.
Using LEDs.
LEDs only require a small amount of current to work,
which makes them much more efficient than bulbs (this
means, for instance, that if powered by batteries the LEDs
will light for a much longer time than a bulb would). If
too much current is passed through an LED it will be
damaged, and so LEDs are normally used together with a
'series' resistor that protects the LED from too much
current.
The value of the resistor required depends on the battery
voltage used. For a 4.5V battery pack a 330R resistor can
be used, and for a 3V battery pack a 120R resistor is
appropriate.
Connecting the LED to a microcontroller.
Because the LED only requires a small amount of current to operate, it can be directly
connected between the microcontroller output pin and 0V (with the series protection
resistor).