Saturday 31 October 2009

Running Small Motors with PIC Microcontrollers (Kindle Edition)


Author: Sandhu, H
ISBN: 0071633510
ISBN 13: 9780071633512
Published by: MCGRAW-HILL
Date Published: Sep 2009
User level: Intermediate/Advance
Pages: 334
RRP: £19.99




Product Information

This is the only comprehensive guide to using PIC microcontrollers to drive small motors. This easy-to-follow tutorial explores the techniques - both in hardware and software - that you need to understand in order to run small motors with PIC microcontrollers. All material is covered in a non-mathematical way so anyone interested in computer control of motors can do so even with a minimal technical background. "Running Small Motors with PIC Microcontrollers" contains more than 2,000 lines of PicBasicPro code and dozens of circuit diagrams with the focus on controlling motors. Hands-on tutorials, program listings, and resources are included.

Part I: Microcontrollers Chapter 1. Introduction to microEngineering Labs' LAB-X1 Experimental Board Chapter 2. Getting Started Chapter 3. Understanding the Microchip Technology PIC 16F877A: Features of the MCU Chapter 4. The Software, Compilers, and Editors Chapter 5. Controlling the Output and Reading the Input Chapter 6. Timers and Counters Chapter 7. Clocks and Memory: Sockets U3, U4, U5, U6, U7 and U8 Chapter 8. Serial Communications: Sockets U9 and U10 Chapter 9. Using Liquid Crystal Displays: An Information Resource Part II: Running the Motors Chapter 10. The PIC 18F4331 Microcontroller: A Minimal Introduction Chapter 11. Running Motors: A Preliminary Discussion Chapter 12. Motor Amplifiers Chapter 13. Running Hobby R/C Servo Motors Chapter 14. Running Small DC Motors with Permanent Magnet Fields Chapter 15. Running DC Motors with Attached Incremental Encoders Chapter 16. Running Bipolar Stepper Motors Chapter 17. Running Small AC Motors: Using Solenoids and Relays Chapter 18. Debugging and Troubleshooting Chapter 19. Conclusion Part III: Appendixes Appendix A. Setting Up Compiler for One Keystroke Operation Appendix B. Abbreviations Used in the Book and in the Data Sheets Appendix C. The Book Support Web Site Appendix D. Sources of Materials Appendix E. Motor Control Language: Some Minimal Ideas, Guidance, and Notes Index

by Harprit Singh Sandhu (Author)

Friday 30 October 2009

Peripheral Interface Controller

PIC is a family of Harvard architecture microcontrollers made by Microchip Technology, derived from the PIC1640[1] originally developed by General Instrument's Microelectronics Division. The name PIC initially referred to "Peripheral Interface Controller".

PICs are popular with both industrial developers and hobbyists alike due to their low cost, wide availability, large user base, extensive collection of application notes, availability of low cost or free development tools, and serial programming (and re-programming with flash memory) capability.

Microchip announced on February 2008 the shipment of its six billionth PIC processor.

Contents

Core architecture

The PIC architecture is distinctively minimalist. It is characterized by the following features:

  • Separate code and data spaces (Harvard architecture)
  • A small number of fixed length instructions
  • Most instructions are single cycle execution (4 clock cycles), with single delay cycles upon branches and skips
  • A single accumulator (W), the use of which (as source operand) is implied (i.e. is not encoded in the opcode)
  • All RAM locations function as registers as both source and/or destination of math and other functions.[2]
  • A hardware stack for storing return addresses
  • A fairly small amount of addressable data space (typically 256 bytes), extended through banking
  • Data space mapped CPU, port, and peripheral registers
  • The program counter is also mapped into the data space and writable (this is used to implement indirect jumps).

Unlike most other CPUs, there is no distinction between memory space and register space because the RAM serves the job of both memory and registers, and the RAM is usually just referred to as the register file or simply as the registers.

Data space (RAM)

PICs have a set of registers that function as general purpose RAM. Special purpose control registers for on-chip hardware resources are also mapped into the data space. The addressability of memory varies depending on device series, and all PIC devices have some banking mechanism to extend the addressing to additional memory. Later series of devices feature move instructions which can cover the whole addressable space, independent of the selected bank. In earlier devices (i.e., the baseline and mid-range cores), any register move had to be achieved via the accumulator.

To implement indirect addressing, a "file select register" (FSR) and "indirect register" (INDF) are used: A register number is written to the FSR, after which reads from or writes to INDF will actually be to or from the register pointed to by FSR. Later devices extended this concept with post- and pre- increment/decrement for greater efficiency in accessing sequentially stored data. This also allows FSR to be treated almost like a stack pointer.

External data memory is not directly addressable except in some high pin count PIC18 devices.

Code space

All PICs feature Harvard architecture, so the code space and the data space are separate. PIC code space is generally implemented as EPROM, ROM, or flash ROM.

In general, external code memory is not directly addressable due to the lack of an external memory interface. The exceptions are PIC17 and select high pin count PIC18 devices.[5]

Word size

The word size of PICs can be a source of confusion. All PICs handle (and address) data in 8-bit chunks, so they should be called 8-bit microcontrollers. However, the unit of addressability of the code space is not generally the same as the data space. For example, PICs in the baseline and mid-range families have program memory addressable in the same wordsize as the instruction width, ie. 12 or 14 bits respectively. In contrast, in the PIC18 series, the program memory is addressed in 8-bit increments (bytes), which differs from the instruction width of 16 bits.

In order to be clear, the program memory capacity is usually stated in number of (single word) instructions, rather than in bytes.

Stacks

PICs have a hardware call stack, which is used to save return addresses. The hardware stack is not software accessible on earlier devices, but this changed with the 18 series devices.

Hardware support for a general purpose parameter stack was lacking in early series, but this greatly improved in the 18 series, making the 18 series architecture more friendly to high level language compilers.

Instruction set

A PIC's instructions vary from about 35 instructions for the low-end PICs to over 80 instructions for the high-end PICs. The instruction set includes instructions to perform a variety of operations on registers directly, the accumulator and a literal constant or the accumulator and a register, as well as for conditional execution, and program branching.

Some operations, such as bit setting and testing, can be performed on any numbered register, but bi-operand arithmetic operations always involve W; writing the result back to either W or the other operand register. To load a constant, it is necessary to load it into W before it can be moved into another register. On the older cores, all register moves needed to pass through W, but this changed on the "high end" cores.

PIC cores have skip instructions which are used for conditional execution and branching. The skip instructions are: 'skip if bit set', and, 'skip if bit not set'. Because cores before PIC18 had only unconditional branch instructions, conditional jumps are implemented by a conditional skip (with the opposite condition) followed by an unconditional branch. Skips are also of utility for conditional execution of any immediate single following instruction.

The PIC architecture has no (or very meager) hardware support for automatically saving processor state when servicing interrupts. The 18 series improved this situation by implementing shadow registers which save several important registers during an interrupt.

In general, PIC instructions fall into 5 classes:

  1. Operation on W with 8-bit immediate ("literal") operand. E.g. movlw (move literal to W), andlw (AND literal with W). One instruction peculiar to the PIC is retlw, load immediate into W and return, which is used with computed branches to produce lookup tables.
  2. Operation with W and indexed register. The result can be written to either the W register (e.g. addwf reg,w). or the selected register (e.g. addwf reg,f).
  3. Bit operations. These take a register number and a bit number, and perform one of 4 actions: set or clear a bit, and test and skip on set/clear. The latter are used to perform conditional branches. The usual ALU status flags are available in a numbered register so operations such as "branch on carry clear" are possible.
  4. Control transfers. Other than the skip instructions previously mentioned, there are only two: goto and call.
  5. A few miscellaneous zero-operand instructions, such as return from subroutine, and sleep to enter low-power mode.

Performance

Many of these architectural decisions are directed at the maximization of top-end speed, or more precisely of speed-to-cost ratio. The PIC architecture was among the first scalar CPU designs, and is still among the simplest and cheapest. The Harvard architecture—in which instructions and data come from conveniently separate sources—simplifies timing and microcircuit design greatly, and this pays benefits in areas like clock speed, price, and power consumption.

The PIC is particularly suited to implementation of fast lookup tables in the program space. Such lookups are O(1) and can complete via a single instruction taking two instruction cycles. Basically any function can be modelled in this way. Such optimization is facilitated by the relatively large program space of the PIC (e.g. 4096 x 14-bit words on the 16F690) and by the design of the instruction set, which allows for embedded constants.

The simplicity of the PIC, and its scalar nature, also serve to greatly simplify the construction of real-time code. It is typically possible to multiply the line count of a PIC assembler listing by the instruction cycle time to determine execution time. (This is true because skip-based instructions take 2 cycles whether the skip occurs or doesn't.) On other CPUs (even the Atmel, with its MUL instruction), such quick methods are just not possible. In low-level development, precise timing is often critical to the success of the application, and the real-time features of the PIC can save crucial engineering time.

A similarly useful and unique property of PICs is that their interrupt latency is constant (it's also low: 3 instruction cycles). The delay is constant even though instructions can take one or two instruction cycles: a dead cycle is optionally inserted into the interrupt response sequence to make this true. External interrupts have to be synchronized with the four clock instruction cycle, otherwise there can be a one instruction cycle jitter. Internal interrupts are already synchronized.

The constant interrupt latency allows PICs to achieve interrupt driven low jitter timing sequences. An example of this is a video sync pulse generator. Other microcontrollers can do this in some cases, but it's awkward. The non-interrupt code has to anticipate the interrupt and enter into a sleep state before it arrives. On PICs, there is no need for this.

The three-cycle latency is increased in practice because the PIC does not store its registers when entering the interrupt routine. Typically, 4 instructions are needed to store the W-register, the status register and switch to a specific bank before starting the actual interrupt processing.

Limitations

The PIC architectures have several limitations:

  • Only a single accumulator
  • A small instruction set
  • Operations and registers are not orthogonal; some instructions can address RAM and/or immediate constants, while others can only use the accumulator
  • Memory must be directly referenced in arithmetic and logic operations, although indirect addressing is available via 2 additional registers
  • Register-bank switching is required to access the entire RAM of many devices, making position-independent code complex and inefficient

The following limitations have been addressed in the PIC18, but still apply to earlier cores:

  • Conditional skip instructions are used instead of conditional jump instructions used by most other architectures
  • Indexed addressing mode is very rudimentary
  • Stack:
    • The hardware call stack is so small that program structure must often be flattened
    • The hardware call stack is not addressable, so pre-emptive task switching cannot be implemented
    • Software-implemented stacks are not efficient, so it is difficult to generate reentrant code and support local variables
  • Program memory is not directly addressable, and thus space-inefficient and/or time-consuming to access. (This is true of most Harvard architecture microcontrollers.)

With paged program memory, there are two page sizes to worry about: one for CALL and GOTO and another for computed GOTO (typically used for table lookups). For example, on PIC16, CALL and GOTO have 11 bits of addressing, so the page size is 2KB. For computed GOTOs, where you add to PCL, the page size is 256 bytes. In both cases, the upper address bits are provided by the PCLATH register. This register must be changed every time control transfers between pages. PCLATH must also be preserved by any interrupt handler.[6]

Compiler development

These properties have made it difficult to develop compilers that target PIC microcontrollers. While several commercial compilers are available, in 2008, Microchip finally released their C compilers, C18, and C30 for their line of 18f 24f and 30/33f processors. By contrast, Atmel's AVR microcontrollers—which are competitive with PIC in terms of hardware capabilities and price, but feature a RISC instruction set—have long been supported by the GNU C Compiler.

Also, because of these properties, PIC assembly language code can be difficult to comprehend. Judicious use of simple macros can make PIC assembly language much more palatable, but at the cost of a reduction in performance. For example, the original Parallax PIC assembler ("SPASM") has macros which hide W and make the PIC look like a two-address machine. It has macro instructions like "mov b,a" (move the data from address a to address b) and "add b,a" (add data from address a to data in address b). It also hides the skip instructions by providing three operand branch macro instructions such as "cjne a,b,dest" (compare a with b and jump to dest if they are not equal).

Family Core Architectural Differences

Baseline Core Devices

These devices feature a 12-bit wide code memory, a 32-byte register file, and a tiny two level deep call stack. They are represented by the PIC10 series, as well as by some PIC12 and PIC16 devices. Baseline devices are available in 6-pin to 40-pin packages.

Generally the first 7 to 9 bytes of the register file are special-purpose registers, and the remaining bytes are general purpose RAM. If banked RAM is implemented, the bank number is selected by the high 3 bits of the FSR. This affects register numbers 16–31; registers 0–15 are global and not affected by the bank select bits.

The ROM address space is 512 words (12 bits each), which may be extended to 2048 words by banking. CALL and GOTO instructions specify the low 9 bits of the new code location; additional high-order bits are taken from the staus register. Note that a CALL instruction only includes 8 bits of address, and may only specify addresses in the first half of each 512-word page.

The instruction set is as follows. Register numbers are referred to as "f", while constants are referred to as "k". Bit numbers (0–7) are selected by "b". The "d" bit selects the destination: 0 indicates W, while 1 indicates that the result is written back to source register f.

12-bit PIC instruction set
Opcode (binary) Mnemonic Description
0000 0000 0000 NOP No operation
0000 0000 0010 OPTION Load OPTION register with contents of W
0000 0000 0011 SLEEP Go into standby mode
0000 0000 0100 CLRWDT Reset watchdog timer
0000 0000 01ff TRIS f Move W to port control register (f=1..3)

0000 001 fffff MOVWF f Move W to f
0000 010 xxxxx CLRW Clear W to 0 (a.k.a CLR x,W)
0000 011 fffff CLRF f Clear f to 0 (a.k.a. CLR f,F)
0000 10d fffff SUBWF f,d Subtract W from f (d = f − W)
0000 11d fffff DECF f,d Decrement f (d = f − 1)
0001 00d fffff IORWF f,d Inclusive OR W with F (d = f OR W)
0001 01d fffff ANDWF f,d AND W with F (d = f AND W)
0001 10d fffff XORWF f,d Exclusive OR W with F (d = f XOR W)
0001 11d fffff ADDWF f,d Add W with F (d = f + W)
0010 00d fffff MOVF f,d Move F (d = f)
0010 01d fffff COMF f,d Complement f (d = NOT f)
0010 10d fffff INCF f,d Increment f (d = f + 1)
0010 11d fffff DECFSZ f,d Decrement f (d = f − 1) and skip if zero
0011 00d fffff RRF f,d Rotate right F (rotate right through carry)
0011 01d fffff RLF f,d Rotate left F (rotate left through carry)
0011 10d fffff SWAPF f,d Swap 4-bit halves of f (d = f<<4>>4)
0011 11d fffff INCFSZ f,d Increment f (d = f + 1) and skip if zero

0100 bbb fffff BCF f,b Bit clear f (Clear bit b of f)
0101 bbb fffff BSF f,b Bit set f (Set bit b of f)
0110 bbb fffff BTFSC f,b Bit test f, skip if clear (Test bit b of f)
0111 bbb fffff BTFSS f,b Bit test f, skip if set (Test bit b of f)

1000 kkkkkkkk RETLW k Set W to k and return
1001 kkkkkkkk CALL k Save return address, load PC with k
101 kkkkkkkkk GOTO k Jump to address k (9 bits!)
1100 kkkkkkkk MOVLW k Move literal to W (W = k)
1101 kkkkkkkk IORLW k Inclusive or literal with W (W = k OR W)
1110 kkkkkkkk ANDLW k AND literal with W (W = k AND W)
1111 kkkkkkkk XORLW k Exclusive or literal with W (W = k XOR W)

Mid-Range Core Devices

These devices feature a 14-bit wide code memory, and an improved 8 level deep call stack. The instruction set differs very little from the baseline devices, but the increased opcode width allows 128 registers and 2048 words of code to be directly addressed. The mid-range core is available in the majority of devices labeled PIC12 and PIC16.

The first 32 bytes of the register space are allocated to special-purpose registers; the remaining 96 bytes are used for general-purpose RAM. If banked RAM is used, the high 16 registers (0x70–0x7F) are global, as are a few of the most important special-purpose registers, including the STATUS register which holds the RAM bank select bits. (The other global registers are FSR and INDF, the low 8 bits of the program counter PCL, the PC high preload register PCLATH, and the master interrupt control register INTCON.)

The PCLATH register supplies high-order instruction address bits when the 8 bits supplied by a write to the PCL register, or the 11 bits supplied by a GOTO or CALL instruction, is not sufficient to address the available ROM space.

14-bit PIC instruction set
Opcode (binary) Mnemonic Description
00 0000 0000 0000 NOP No operation
00 0000 0000 1000 RETURN Return from subroutine, W unchanged
00 0000 0000 1001 RETFIE Return from interrupt
00 0000 0110 0010 OPTION Write W to OPTION register
00 0000 0110 0011 SLEEP Go into standby mode
00 0000 0110 0100 CLRWDT Reset watchdog timer
00 0000 0110 01ff TRIS f Write W to tristate register f

00 0000 1 fffffff MOVWF f Move W to f
00 0001 0 xxxxxxx CLRW Clear W to 0 (W = 0)
00 0001 1 fffffff CLRF f Clear f to 0 (f = 0)
00 0010 d fffffff SUBWF f,d Subtract W from f (d = f − W)
00 0011 d fffffff DECF f,d Decrement f (d = f − 1)
00 0100 d fffffff IORWF f,d Inclusive OR W with F (d = f OR W)
00 0101 d fffffff ANDWF f,d AND W with F (d = f AND W)
00 0110 d fffffff XORWF f,d Exclusive OR W with F (d = f XOR W)
00 0111 d fffffff ADDWF f,d Add W with F (d = f + W)
00 1000 d fffffff MOVF f,d Move F (d = f)
00 1001 d fffffff COMF f,d Complement f (d = NOT f)
00 1010 d fffffff INCF f,d Increment f (d = f + 1)
00 1011 d fffffff DECFSZ f,d Decrement f (d = f − 1) and skip if zero
00 1100 d fffffff RRF f,d Rotate right F (rotate right through carry)
00 1101 d fffffff RLF f,d Rotate left F (rotate left through carry)
00 1110 d fffffff SWAPF f,d Swap 4-bit halves of f (d = f<<4>>4)
00 1111 d fffffff INCFSZ f,d Increment f (d = f + 1) and skip if zero

01 00 bbb fffffff BCF f,b Bit clear f (Clear bit b of f)
01 01 bbb fffffff BSF f,b Bit set f (Set bit b of f)
01 10 bbb fffffff BTFSC f,b Bit test f, skip if clear (Test bit b of f)
01 11 bbb fffffff BTFSS f,b Bit test f, skip if set (Test bit b of f)

10 0 kkkkkkkkkkk CALL k Save return address, load PC with k
10 1 kkkkkkkkkkk GOTO k Jump to address k (11 bits)

11 00xx kkkkkkkk MOVLW k Move literal to W (W = k)
11 01xx kkkkkkkk RETLW k Set W to k and return
11 1000 kkkkkkkk IORLW k Inclusive or literal with W (W = k OR W)
11 1001 kkkkkkkk ANDLW k AND literal with W (W = k AND W)
11 1010 kkkkkkkk XORLW k Exclusive or literal with W (W = k XOR W)
11 110x kkkkkkkk SUBLW k Subtract W from literal (W = k − W)
11 111x kkkkkkkk ADDLW k Add literal to W (W = k + W)

PIC17 High End Core Devices

The 17 series never became popular and has been superseded by the PIC18 architecture. It is not recommended for new designs, and availability may be limited.

Improvements over earlier cores are 16-bit wide opcodes (allowing many new instructions), and a 16 level deep call stack. PIC17 devices were produced in packages from 40 to 68 pins.

The 17 series introduced a number of important new features:

  • a memory mapped accumulator
  • read access to code memory (table reads)
  • direct register to register moves (prior cores needed to move registers through the accumulator)
  • an external program memory interface to expand the code space
  • an 8bit x 8bit hardware multiplier
  • a second indirect register pair
  • auto-increment/decrement addressing controlled by control bits in a status register (ALUSTA)

[edit] PIC18 High End Core Devices

Microchip introduced the PIC18 architecture in 2002. [3] Unlike the 17 series, it has proven to be very popular, with a large number of device variants presently in manufacture. In contrast to earlier devices, which were more often than not programmed in assembly, C has become the predominant development language[4].

The 18 series inherits most of the features and instructions of the 17 series, while adding a number of important new features:

  • much deeper call stack (31 levels deep)
  • the call stack may be read and written
  • conditional branch instructions
  • indexed addressing mode (PLUSW)
  • extending the FSR registers to 12 bits, allowing them to linearly address the entire data address space
  • the addition of another FSR register (bringing the number up to 3)

The auto increment/decrement feature was improved by removing the control bits and adding four new indirect registers per FSR. Depending on which indirect file register is being accessed it is possible to postdecrement, postincrement, or preincrement FSR; or form the effective address by adding W to FSR.

In more advanced PIC18 devices, an "extended mode" is available which makes the addressing even more favorable to compiled code:

  • a new offset addressing mode; some addresses which were relative to the access bank are now interpreted relative to the FSR2 register
  • the addition of several new instructions, notable for manipulating the FSR registers.

These changes were primarily aimed at improving the efficiency of a data stack implementation. If FSR2 is used either as the stack pointer or frame pointer, stack items may be easily indexed—allowing more efficient re-entrant code. Microchip C18 chooses to use FSR2 as a frame pointer.

PIC24 and dsPIC 16-bit Microcontrollers

In 2001, Microchip introduced the dsPIC series of chips[7], which entered mass production in late 2004. They are Microchip's first inherently 16-bit microcontrollers. PIC24 devices are designed as general purpose microcontrollers. dsPIC devices include digital signal processing capabilities in addition.

Architecturally, although they share the PIC moniker, they are very different from the 8-bit PICs. The most notable differences are[8]

  • they feature a set of 16 working registers
  • they fully support a stack in RAM, and do not have a hardware stack
  • bank switching is not required to access RAM or special function registers
  • data stored in program memory can be accessed directly using a feature called Program Space Visibility
  • interrupt sources may be assigned to distinct handlers using an interrupt vector table

Some features are:

dsPICs can be programmed in C using a variant of gcc.

[edit] PIC32 32-bit Microcontrollers

In November 2007 Microchip introduced the new PIC32MX family of 32-bit microcontrollers. The initial device line-up is based on the industry standard MIPS32 M4K Core[5]. The device can be programmed using the Microchip MPLAB C Compiler for PIC32 MCUs, a variant of the GCC compiler. The first 18 models currently in production (PIC32MX3xx and PIC32MX4xx) are pin to pin compatible and share the same peripherals set with the PIC24FxxGA0xx family of (16-bit) devices allowing the use of common libraries, software and hardware tools.

The PIC32 architecture brings a number of new features to Microchip portfolio, including:

  • The highest execution speed 80 MIPS (90+ Dhrystone MIPS @80MHz)
  • The largest FLASH memory: 512kbyte
  • One instruction per clock cycle execution
  • The first cached processor
  • Allows execution from RAM
  • Full Speed Host/Dual Role and OTG USB capabilities
  • Full JTAG and 2 wire programming and debugging
  • Real-time trace

[edit] Device Variants and Hardware Features

PIC devices generally feature:

  • Sleep mode (power savings).
  • Watchdog timer.
  • Various crystal or RC oscillator configurations, or an external clock.

Variants

Within a series, there are still many device variants depending on what hardware resources the chip features.

Trends

The first generation of PICs with EPROM storage are almost completely replaced by chips with Flash memory. Likewise, the original 12-bit instruction set of the PIC1650 and its direct descendants has been superseded by 14-bit and 16-bit instruction sets. Microchip still sells OTP (one-time-programmable) and windowed (UV-erasable) versions of some of its EPROM based PICs for legacy support or volume orders. It should be noted that the Microchip website lists PICs that are not electrically erasable as OTP despite the fact that UV erasable windowed versions of these chips can be ordered.

[edit] History

The original PIC was built to be used with General Instruments' new 16-bit CPU, the CP1600. While generally a good CPU, the CP1600 had poor I/O performance, and the 8-bit PIC was developed in 1975 to improve performance of the overall system by offloading I/O tasks from the CPU. The PIC used simple microcode stored in ROM to perform its tasks, and although the term wasn't used at the time, it shares some common features with RISC designs.

In 1985 General Instruments spun off their microelectronics division, and the new ownership canceled almost everything — which by this time was mostly out-of-date. The PIC, however, was upgraded with internal EPROM to produce a programmable channel controller, and today a huge variety of PICs are available with various on-board peripherals (serial communication modules, UARTs, motor control kernels, etc.) and program memory from 256 words to 64k words and more (a "word" is one assembly language instruction, varying from 12, 14 or 16 bits depending on the specific PIC micro family).

PIC and PICmicro are registered trademarks of Microchip Technology. It is generally thought that PIC stands for Peripheral Interface Controller, although General Instruments' original acronym for the initial PIC1640 and PIC1650 devices was "Programmable Interface Controller".[2] The acronym was quickly replaced with "Programmable Intelligent Computer".[3]

Various older (EPROM) PIC microcontrollers

The Microchip 16C84 (PIC16x84), introduced in 1993[6] was the first[citation needed] CPU with on-chip EEPROM memory. This electrically-erasable memory made it cost less than CPUs that required a quartz "erase window" for erasing EPROM.

Development Tools

Commercially Supported

Microchip provides a freeware IDE package called MPLAB, which includes an assembler, linker, software simulator, and debugger. They also sell C compilers for the PIC18 and dsPIC which integrate cleanly with MPLAB. Free student versions of the C compilers are also available with all features. But for the free versions, optimizations will be disabled after 60 days.[9]

Several third parties make C,[10] BASIC[11] and Pascal[12] language compilers for PICs, many of which integrate to MPLAB and/or feature their own IDE.

A blockset[13] for Matlab/Simulink allow one to generate C and binary files from a simulink model. Most common peripherals have their blocksets and you do not need to write the configuration code.

Open Source

The following development tools are available for the PIC family under the GPL or other free software or open sources licenses.

FreeRTOS is a mini real time kernel ported to PIC18, PIC24, dsPIC and PIC32 architectures.

GPUTILS is a set of PIC utilities comprising an assembler, a disassembler, a linker and an object file viewer.

GPSIM is an Open Source simulator for the PIC microcontrollers featuring hardware modules that simulate specific devices that might be connected to them, like LCDs.

SDCC is a C compiler supporting 8-bit PIC micro controllers (PIC16, PIC18). Currently, throughout the SDCC website, the words, "Work is in progress", are frequently used to describe the status of SDCC's support for PICs.

File:Flowcode.png
KTechlab, a OpenSource microcontroller IDE written in c++ and qt. Ktechlab supports the programming of microcontrollers using C, Assembly, Microbe (a BASIC-like language) and using flowcode a graphical programming language similar to Flowcode

Ktechlab is a free IDE for programming PIC Microcontroller. It allows one to write the program in C, Assembly, Microbe (a BASIC-like language) and using FlowChart Method.

PiKdev [7] runs on Linux and is a simple graphic IDE for the development of PIC-based applications. It currently supports assembly language. Non Open Source C language (Currently free 1/22/07) is also supported for PIC 18 devices. PiKdev is developed in C++ under Linux and is based on the KDE environment.

Piklab is a forked version of PiKdev and is managed as SourceForge Project. Piklab adds to Pikdev by providing support for programmers and debuggers. Currently, Piklab supports the JDM, PIC Elmer, K8048, HOODMICRO, ICD1, ICD2, PICkit1, PICKkit2, and PicStart+ as programming devices and has debugging support for ICD2 in addition to using the simulator, GPSim.[14]

JAL [8] stands for Just Another Language. It is a Pascal-like language that is easily mastered. The compiler supports a few Microchip (16c84, 16f84, 12c508, 12c509, 16F877) and SX microcontrollers. The resulting assembly language can then be viewed, modified and further processed as if you were programming directly in assembler.

PMP (Pic Micro Pascal) is a free Pascal language compiler and IDE. It is intended to work with Microchip MPLAB that it uses device definition files, assembler and linker. It supports PIC10 to PIC18 devices.

The GNU Compiler Collection and the GNU Binutils have been ported to the PIC24, dsPIC30F and dsPIC33F in the form of Microchip's MPLAB C30 compiler and MPLAB ASM30 Assembler.

MIOS is a real-time operating system written in PIC assembly, optimized for MIDI processing and other musical control applications. There is a C wrapper for higher level development. Currently it runs on the MIDIbox Hardware Platform.

FlashForth [9] is a native Forth operating system for the PIC18F and the dsPIC30F series. It makes the PIC a standalone computer with an interpreter, compiler, assembler and multitasker.

Great Cow Basic (GCBasic) [10] The syntax of Great Cow BASIC is based on that of QBASIC/FreeBASIC. The assembly code produced by Great Cow BASIC can be assembled and run on almost all 10, 12, 16 and 18 series PIC chips.

Device Programmers

A development board for low pin-count MCU, from Microchip

Devices called "programmers" are traditionally used to get program code into the target PIC. Most PICs that Microchip currently sell feature ICSP (In Circuit Serial Programming) and/or LVP (Low Voltage Programming) capabilities, allowing the PIC to be programmed while it is sitting in the target circuit. ICSP programming is performed using two pins, clock and data, while a high voltage (12V) is present on the Vpp/MCLR pin. Low voltage programming dispenses with the high voltage, but reserves exclusive use of an I/O pin and can therefore be disabled to recover the pin for other uses (once disabled it can only be re-enabled using high voltage programming).

There are many programmers for PIC microcontrollers, ranging from the extremely simple designs which rely on ICSP to allow direct download of code from a host computer, to intelligent programmers that can verify the device at several supply voltages. Many of these complex programmers use a pre-programmed PIC themselves to send the programming commands to the PIC that is to be programmed. The intelligent type of programmer is needed to program earlier PIC models (mostly EPROM type) which do not support in-circuit programming.

Many of the higher end flash based PICs can also self-program (write to their own program memory). Demo boards are available with a small bootloader factory programmed that can be used to load user programs over an interface such as RS-232 or USB, thus obviating the need for a programmer device. Alternatively there is bootloader firmware available that the user can load onto the PIC using ICSP. The advantages of a bootloader over ICSP is the far superior programming speeds, immediate program execution following programming, and the ability to both debug and program using the same cable.

Microchip Programmers

Microchip PICSTART Plus programmer

There are many programmers/debuggers available directly from Microchip.

Current Microchip Programmers (as of 3/2009)[15]

  • PICStart Plus (RS232 serial interface) : intelligent.
  • PRO MATE II (RS232 serial interface) : intelligent.
  • MPLAB PM3 (RS232 serial and USB interface)
  • MPLAB ICD2 (RS232 serial and USB 1.0 interface) : ICSP programming only
  • MPLAB REAL ICE (USB 2.0 interface) : ICSP programming only
  • PICKit 2 (USB interface)
  • PICKit 3 (USB interface)
  • ICD 3 (USB interface)

Legacy Microchip Programmers

Third-Party Programmers

There are programmers available from other sources, ranging from plans to build your own, to self-assembly kits and fully tested ready-to-go units. Some are simple designs which require a PC to do the low-level programming signalling (these typically connect to the serial or parallel port and consist of a few simple components), while others have the programming logic built into them (these typically use a serial or USB connection, are usually faster, and are often built using PICs themselves for control). For a directory of PIC related tools and websites, see PIC microcontroller at the Open Directory Project. These are some common programmer types:

  • Simple serial port ICSP programmers
    • These generally rely on driving the PIC's Vss line negative to get the necessary voltage differences from programming. Hence they are compact and cheap but great care is needed if using them for in circuit programming.
  • Simple parallel port ICSP programmers
    • Simple to understand but often have much higher part counts and generally require external power supplies.
  • Intelligent programmers (some use USB port)
    • Generally faster and more reliable (especially on laptops which tend to have idiosyncrasies in the way they implement their ports) but far more complex to build (in particular they tend to use a PIC in the programmer which must itself be programmed somehow).

Here are some programmers available:

Usbpicprog
  • usbpicprog, an open source USB PIC programmer usbpicprog
  • Open Programmer, another open source USB programmer for PICmicro and I2C EEPROM, using HID class OpenProgrammer
  • home-made ICSP JDM Pic
  • DIY PIC and EEPROM programmer with ICSP support. PCB files, photos and detailed information are also provided.
  • PIC PRESTO that supports ICSP, ISP, JTAG, I2C, SPI, Microwire interfaces, works on USB and complies with programming specifications
  • home-made ICSP with external powersupply based on JDM: BobProg (Romanian)

The major problem of home-made or very simple programmers is that these programmers do not comply with programming specifications and this can cause premature loss of data in the flash or EEPROM[citation needed].

Debugging

Software Emulation

MPLAB (which is a free download) includes a software emulator for PICs. However, software emulation of a microcontroller will always suffer from limited simulation of the device's interactions with its target circuit.

Proteus VSM is a commercial software product developed by Labcenter Electronics which allows simulation of many PICmicro devices along with a wide array of peripheral devices. This method can help bridge the gap between the limited peripheral support offered by the MPLAB simulator and traditional in-circuit debugging/emulating. The product interfaces directly with MPLAB to offer a schematic display of signals and peripheral devices.

KTechLab is a free and open source circuit simulator for KDE which features simulating some types of PIC microcontrollers besides many other analog and digital parts.

Piklab is a free and open source IDE for developing PIC software on KDE. Piklab is able to simulate and debug PIC software using another free and open source tool called gpsim as a backend.

In-Circuit Debugging

Later model PICs feature an ICD (in-circuit debugging) interface, built into the CPU core. ICD debuggers (MPLAB ICD2 and other third party) can communicate with this interface using three lines. This cheap and simple debugging system comes at a price however, namely limited breakpoint count (1 on older pics 3 on newer PICs), loss of some IO (with the exception of some surface mount 44-pin PICs which have dedicated lines for debugging) and loss of some features of the chip. For small PICs, where the loss of IO caused by this method would be unacceptable, special headers are made which are fitted with PICs that have extra pins specifically for debugging.

In-Circuit Emulators

Microchip offers three full in circuit emulators: the MPLAB ICE2000 (parallel interface, a USB converter is available); the newer MPLAB ICE4000 (USB 2.0 connection); and most recently, the REAL ICE. All of these ICE tools can be used with the MPLAB IDE for full source-level debugging of code running on the target.

The ICE2000 requires emulator modules, and the test hardware must provide a socket which can take either an emulator module, or a production device.

The REAL ICE connects directly to production devices which support in-circuit emulation through the PGC/PGD programming interface, or through a high speed connection which uses two more pins. According to Microchip, it supports "most" flash-based PIC, PIC24, and dsPIC processors.[16]

The ICE4000 is no longer directly advertised on Microchip's website, and the purchasing page states that it is not recommended for new designs.

PIC clones

  • Ubicom (formerly Scenix) produces the SX range of chips. These are baseline core PIC clones that run much faster than the original. As of November 2005 Parallax is the exclusive supplier of the SX.
  • OpenCores has a PIC16F84 core written in Verilog.
  • Holtek HT48FXX Flash I/O type series
  • ANGSTREM produces 8-bit 4 MIPS (at 8MHz) microcontroller An15E03 (КР1878ВЕ1 in Russian) which is pin-compatible with PIC16F84

[edit] PICKit 2 Open-source structure and clones

PICKit 2 has been an interesting PIC programmer from Microchip. It can program all PICs and debug most of the PICs (as of May-2009, only PIC32 as a family are not support for MPLAB debugging.). Ever since its first releases, all software source code (firmware, PC application) and hardware schematic are open to the public. This makes the end user easy to modify the programmer for non-windows operating system, such as: Linux, Mac os, etc. In the mean time, it also creates lots of DIY interest and Clones. This open-source structure bring in many features to the PICKit 2 community, features like, Programmer-to-Go, UART tool, Logic tool, etc. are contributed by many PICKit 2 users. In the mean time, fans even added new features to the PICKit 2 design, to name a few, max. 4M byte Programmer-to-go capability, USB buck/boost circuits, RJ12 type connectors, etc.

8/16/32-bit PIC microcontroller product families

These links take you to product selection matrices at the manufacturer's site.

8-bit Microcontrollers

16-bit Microcontrollers

32-bit Microcontrollers

16-bit Digital Signal Controllers

The F in a name generally indicates the PICmicro uses flash memory and can be erased electronically. A C generally means it can only be erased by exposing the die to ultraviolet light (which is only possible if a windowed package style is used). An exception to this rule is the PIC16C84 which uses EEPROM and is therefore electrically erasable.

The PIC's "code protection" features are not at all perfect; To some extent, the weaknesses repeat themselves across the entire line of devices. But it should also be acknowledged that Microchip has pushed out targeted revisions to the code protection system as hacks have become widely known. Flylogic Engineering has documented some of this ongoing back-and-forth on their website.

Light-emitting diode

From Wikipedia, the free encyclopedia


Light-emitting diode
RBG-LED.jpg
Red, green and blue LEDs of the 5mm type
Type Passive, optoelectronic
Working principle Electroluminescence
Invented Nick Holonyak Jr. (1962)
Electronic symbol
LED symbol.svg
Pin configuration Anode and Cathode

A light-emitting diode (LED) (pronounced /ˌɛl.iːˈdiː/[1], or just /lɛd/), is an electronic light source. Luminescence from an electrically stimulated crystal had been observed as early as 1907. The LED was introduced as a practical electronic component in 1962.

All early devices emitted low-intensity red light, but modern LEDs are available across the visible, ultraviolet and infra red wavelengths, with very high brightness.

LEDs are based on the semiconductor diode. When the diode is forward biased (switched on), electrons are able to recombine with holes and energy is released in the form of light. This effect is called electroluminescence and the color of the light is determined by the energy gap of the semiconductor. The LED is usually small in area (less than 1 mm2) with integrated optical components to shape its radiation pattern and assist in reflection.[2]

LEDs present many advantages over traditional light sources including lower energy consumption, longer lifetime, improved robustness, smaller size and faster switching. However, they are relatively expensive and require more precise current and heat management than traditional light sources.

Applications of LEDs are diverse. They are used as low-energy indicators but also for replacements for traditional light sources in general lighting, automotive lighting and traffic signals. The compact size of LEDs has allowed new text and video displays and sensors to be developed, while their high switching rates are useful in communications technology.

Contents

[edit] History

Discoveries and early devices

Green electroluminescence from a point contact on a crystal of SiC recreates H. J. Round's original experiment from 1907.

Electroluminescence was discovered in 1907 by the British experimenter H. J. Round of Marconi Labs, using a crystal of silicon carbide and a cat's-whisker detector.[3][4] Russian Oleg Vladimirovich Losev independently reported on the creation of a LED in 1927.[5][6] His research was distributed in Russian, German and British scientific journals, but no practical use was made of the discovery for several decades.[7] Rubin Braunstein of the Radio Corporation of America reported on infrared emission from gallium arsenide (GaAs) and other semiconductor alloys in 1955.[8] Braunstein observed infrared emission generated by simple diode structures using gallium antimonide (GaSb), GaAs, indium phosphide (InP), and silicon-germanium (SiGe) alloys at room temperature and at 77 kelvin.

In 1961, experimenters Robert Biard and Gary Pittman working at Texas Instruments,[9] found that GaAs emitted infrared radiation when electric current was applied and received the patent for the infrared LED.

The first practical visible-spectrum (red) LED was developed in 1962 by Nick Holonyak Jr., while working at General Electric Company.[10] Holonyak is seen as the "father of the light-emitting diode".[11] M. George Craford[12], a former graduate student of Holonyak, invented the first yellow LED and improved the brightness of red and red-orange LEDs by a factor of ten in 1972.[13] In 1976, T.P. Pearsall created the first high-brightness, high efficiency LEDs for optical fiber telecommunications by inventing new semiconductor materials specifically adapted to optical fiber transmission wavelengths.[14]

Up to 1968 visible and infrared LEDs were extremely costly, on the order of US $200 per unit, and so had little practical application.[15] The Monsanto Company was the first organization to mass-produce visible LEDs, using gallium arsenide phosphide in 1968 to produce red LEDs suitable for indicators.[15] Hewlett Packard (HP) introduced LEDs in 1968, initially using GaAsP supplied by Monsanto. The technology proved to have major applications for alphanumeric displays and was integrated into HP's early handheld calculators.

Practical use

Red, yellow and green (unlit) LEDs used in a traffic signal.

The first commercial LEDs were commonly used as replacements for incandescent indicators, and in seven-segment displays,[16] first in expensive equipment such as laboratory and electronics test equipment, then later in such appliances as TVs, radios, telephones, calculators, and even watches (see list of signal applications). These red LEDs were bright enough only for use as indicators, as the light output was not enough to illuminate an area. Later, other colors became widely available and also appeared in appliances and equipment. As the LED materials technology became more advanced, the light output was increased, while maintaining the efficiency and the reliability to an acceptable level. The invention and development of the high power white light LED led to use for illumination[17][18] (see list of illumination applications). Most LEDs were made in the very common 5 mm T1¾ and 3 mm T1 packages, but with increasing power output, it has become increasingly necessary to shed excess heat in order to maintain reliability[19], so more complex packages have been adapted for efficient heat dissipation. Packages for state-of-the-art high power LEDs bear little resemblance to early LEDs.

[edit] Continuing development

Illustration of Haitz's Law. Light output per LED as a function of production year, note the logarithmic scale on the vertical axis.

The first high-brightness blue LED was demonstrated by Shuji Nakamura of Nichia Corporation and was based on InGaN borrowing on critical developments in GaN nucleation on sapphire substrates and the demonstration of p-type doping of GaN which were developed by Isamu Akasaki and H. Amano in Nagoya. In 1995, Alberto Barbieri at the Cardiff University Laboratory (GB) investigated the efficiency and reliability of high-brightness LEDs and demonstrated a very impressive result by using a transparent contact made of indium tin oxide (ITO) on (AlGaInP/GaAs) LED. The existence of blue LEDs and high efficiency LEDs quickly led to the development of the first white LED, which employed a Y3Al5O12:Ce, or "YAG", phosphor coating to mix yellow (down-converted) light with blue to produce light that appears white. Nakamura was awarded the 2006 Millennium Technology Prize for his invention.[20]

The development of LED technology has caused their efficiency and light output to increase exponentially, with a doubling occurring about every 36 months since the 1960s, in a way similar to Moore's law. The advances are generally attributed to the parallel development of other semiconductor technologies and advances in optics and material science. This trend is normally called Haitz's Law after Dr. Roland Haitz. [21]

In February 2008, Bilkent university in Turkey reported 300 lumens of visible light per watt luminous efficacy (not per electrical watt) and warm light by using nanocrystals [22].

In January 2009, researchers from Cambridge University reported a process for growing gallium nitride (GaN) LEDs on silicon. Production costs could be reduced by 90% using six-inch silicon wafers instead of two-inch sapphire wafers. The team was led by Colin Humphreys.[23]

Technology

Parts of an LED
The inner workings of an LED
I-V diagram for a diode an LED will begin to emit light when the on-voltage is exceeded. Typical on voltages are 2-3 Volt

Physics

Like a normal diode, the LED consists of a chip of semiconducting material impregnated, or doped, with impurities to create a p-n junction. As in other diodes, current flows easily from the p-side, or anode, to the n-side, or cathode, but not in the reverse direction. Charge-carriers—electrons and holes—flow into the junction from electrodes with different voltages. When an electron meets a hole, it falls into a lower energy level, and releases energy in the form of a photon.

The wavelength of the light emitted, and therefore its color, depends on the band gap energy of the materials forming the p-n junction. In silicon or germanium diodes, the electrons and holes recombine by a non-radiative transition which produces no optical emission, because these are indirect band gap materials. The materials used for the LED have a direct band gap with energies corresponding to near-infrared, visible or near-ultraviolet light.

LED development began with infrared and red devices made with gallium arsenide. Advances in materials science have made possible the production of devices with ever-shorter wavelengths, producing light in a variety of colors.

LEDs are usually built on an n-type substrate, with an electrode attached to the p-type layer deposited on its surface. P-type substrates, while less common, occur as well. Many commercial LEDs, especially GaN/InGaN, also use sapphire substrate.

Most materials used for LED production have very high refractive indices. This means that much light will be reflected back in to the material at the material/air surface interface. Therefore Light extraction in LEDs is an important aspect of LED production, subject to much research and development.

Efficiency and operational parameters

Typical indicator LEDs are designed to operate with no more than 30–60 milliwatts [mW] of electrical power. Around 1999, Philips Lumileds introduced power LEDs capable of continuous use at one watt [W]. These LEDs used much larger semiconductor die sizes to handle the large power inputs. Also, the semiconductor dies were mounted onto metal slugs to allow for heat removal from the LED die.

One of the key advantages of LED-based lighting is its high efficiency, as measured by its light output per unit power input. White LEDs quickly matched and overtook the efficiency of standard incandescent lighting systems. In 2002, Lumileds made five-watt LEDs available with a luminous efficacy of 18–22 lumens per watt [lm/W]. For comparison, a conventional 60–100 W incandescent lightbulb produces around 15 lm/W, and standard fluorescent lights produce up to 100 lm/W. A recurring problem is that efficiency will fall dramatically for increased current. This effect is known as droop and effectively limits the light output of a given LED, increasing heating more than light output for increased current.

In September 2003, a new type of blue LED was demonstrated by the company Cree, Inc. to provide 24 mW at 20 milliamperes [mA]. This produced a commercially packaged white light giving 65 lm/W at 20 mA, becoming the brightest white LED commercially available at the time, and more than four times as efficient as standard incandescents. In 2006 they demonstrated a prototype with a record white LED luminous efficacy of 131 lm/W at 20 mA. Also, Seoul Semiconductor has plans for 135 lm/W by 2007 and 145 lm/W by 2008, which would be approaching an order of magnitude improvement over standard incandescents and better even than standard fluorescents.[24] Nichia Corporation has developed a white LED with luminous efficiency of 150 lm/W at a forward current of 20 mA.[25]

It should be noted that high-power (≥ 1 W) LEDs are necessary for practical general lighting applications. Typical operating currents for these devices begin at 350 mA. The highest efficiency high-power white LED is claimed.[26] by Philips Lumileds Lighting Co. with a luminous efficacy of 115 lm/W (350 mA)

Note that these efficiencies are for the LED chip only, held at low temperature in a lab. In a lighting application, operating at higher temperature and with drive circuit losses, efficiencies are much lower. United States Department of Energy (DOE) testing of commercial LED lamps designed to replace incandescent or CFL lamps showed that average efficacy was still about 31 lm/W in 2008 (tested performance ranged from 4 lm/W to 62 lm/W)[27].

Cree issued a press release on November 19, 2008 about a laboratory prototype LED achieving 161 lumens/watt at room temperature. The total output was 173 lumens, and the correlated color temperature was reported to be 4689 K.[28][unreliable source?]

[edit] Lifetime and failure

Solid state devices such as LEDs are subject to very limited wear and tear if operated at low currents and at low temperatures. Many of the LEDs produced in the 1970s and 1980s are still in service today. Typical lifetimes quoted are 25,000 to 100,000 hours but heat and current settings can extend or shorten this time significantly. [29]

The most common symptom of LED (and diode laser) failure is the gradual lowering of light output and loss of efficiency. Sudden failures, although rare, can occur as well. Early red LEDs were notable for their short lifetime. With the development of high power LEDs the devices are subjected to higher junction temperatures and higher current densities than traditional devices. This causes stress on the material and may cause early light output degradation. To quantitatively classify lifetime in a standardized manner it has been suggested to use the terms L75 and L50 which is the time it will take a given LED to reach 75% and 50% light output respectively.[30] L50 is equivalent to the half-life of the LED.

Colors and materials

Conventional LEDs are made from a variety of inorganic semiconductor materials, the following table shows the available colors with wavelength range, voltage drop and material:


Color Wavelength (nm) Voltage (V) Semiconductor Material

Infrared λ > 760 ΔV <> Gallium arsenide (GaAs)
Aluminium gallium arsenide (AlGaAs)

Red 610 < λ <> 1.63 < ΔV <> Aluminium gallium arsenide (AlGaAs)
Gallium arsenide phosphide (GaAsP)
Aluminium gallium indium phosphide (AlGaInP)
Gallium(III) phosphide (GaP)

Orange 590 < λ <> 2.03 < ΔV <> Gallium arsenide phosphide (GaAsP)
Aluminium gallium indium phosphide (AlGaInP)
Gallium(III) phosphide (GaP)

Yellow 570 < λ <> 2.10 < ΔV <> Gallium arsenide phosphide (GaAsP)
Aluminium gallium indium phosphide (AlGaInP)
Gallium(III) phosphide (GaP)

Green 500 < λ <> 1.9[31] < ΔV <> Indium gallium nitride (InGaN) / Gallium(III) nitride (GaN)
Gallium(III) phosphide (GaP)
Aluminium gallium indium phosphide (AlGaInP)
Aluminium gallium phosphide (AlGaP)

Blue 450 < λ <> 2.48 < ΔV <> Zinc selenide (ZnSe)
Indium gallium nitride (InGaN)
Silicon carbide (SiC) as substrate
Silicon (Si) as substrate — (under development)

Violet 400 < λ <> 2.76 < ΔV <> Indium gallium nitride (InGaN)

Purple multiple types 2.48 < ΔV <> Dual blue/red LEDs,
blue with red phosphor,
or white with purple plastic

Ultraviolet λ <> 3.1 < ΔV <> diamond (235 nm)[32]
Boron nitride (215 nm)[33][34]
Aluminium nitride (AlN) (210 nm)[35]
Aluminium gallium nitride (AlGaN)
Aluminium gallium indium nitride (AlGaInN) — (down to 210 nm)[36]

White Broad spectrum ΔV = 3.5 Blue/UV diode with yellow phosphor

Ultraviolet and blue LEDs

Blue LEDs.

Blue LEDs are based on the wide band gap semiconductors GaN (gallium nitride) and InGaN (indium gallium nitride). They can be added to existing red and green LEDs to produce the impression of white light, though white LEDs today rarely use this principle.

The first blue LEDs were made in 1971 by Jacques Pankove (inventor of the gallium nitride LED) at RCA Laboratories.[37] These devices had too little light output to be of much practical use. However, early blue LEDs found use in some low-light applications, such as the high-beam indicators for cars[38]. In the late 1980s, key breakthroughs in GaN epitaxial growth and p-type doping[39] ushered in the modern era of GaN-based optoelectronic devices. Building upon this foundation, in 1993 high brightness blue LEDs were demonstrated.[40]

By the late 1990s, blue LEDs had become widely available. They have an active region consisting of one or more InGaN quantum wells sandwiched between thicker layers of GaN, called cladding layers. By varying the relative InN-GaN fraction in the InGaN quantum wells, the light emission can be varied from violet to amber. AlGaN aluminium gallium nitride of varying AlN fraction can be used to manufacture the cladding and quantum well layers for ultraviolet LEDs, but these devices have not yet reached the level of efficiency and technological maturity of the InGaN-GaN blue/green devices. If the active quantum well layers are GaN, as opposed to alloyed InGaN or AlGaN, the device will emit near-ultraviolet light with wavelengths around 350–370 nm. Green LEDs manufactured from the InGaN-GaN system are far more efficient and brighter than green LEDs produced with non-nitride material systems.

With nitrides containing aluminium, most often AlGaN and AlGaInN, even shorter wavelengths are achievable. Ultraviolet LEDs in a range of wavelengths are becoming available on the market. Near-UV emitters at wavelengths around 375–395 nm are already cheap and often encountered, for example, as black light lamp replacements for inspection of anti-counterfeiting UV watermarks in some documents and paper currencies. Shorter wavelength diodes, while substantially more expensive, are commercially available for wavelengths down to 247 nm.[41] As the photosensitivity of microorganisms approximately matches the absorption spectrum of DNA, with a peak at about 260 nm, UV LEDs emitting at 250–270 nm are to be expected in prospective disinfection and sterilization devices. Recent research has shown that commercially available UVA LEDs (365 nm) are already effective disinfection and sterilization devices.[42]

Deep-UV wavelengths were obtained in laboratories using aluminium nitride (210 nm),[35] Boron nitride (215 nm)[33][34] and diamond (235 nm)[32].

[edit] White light

There are two primary ways of producing high intensity white-light using LEDs. One is to use individual LEDs that emit three primary colors[43] – red, green, and blue, and then mix all the colors to produce white light. The other is to use a phosphor material to convert monochromatic light from a blue or UV LED to broad-spectrum white light, much in the same way a fluorescent light bulb works.

Due to metamerism, it is possible to have quite different spectra which appear white.

RGB systems

Combined spectral curves for blue, yellow-green, and high brightness red solid-state semiconductor LEDs. FWHM spectral bandwidth is approximately 24–27 nm for all three colors.

White light can be produced by mixing differently colored light, the most common method is to use red, green and blue (RGB). Hence the method is called multi-colored white LEDs (sometimes referred to as RGB LEDs). Because its mechanism is involved with sophisticated electro-optical design to control the blending and diffusion of different colors, this approach has rarely been used to mass produce white LEDs in the industry. Nevertheless this method is particularly interesting to many researchers and scientists because of the flexibility of mixing different colors.[44] In principle, this mechanism also has higher quantum efficiency in producing white light.

There are several types of multi-colored white LEDs: di-, tri-, and tetrachromatic white LEDs. Several key factors that play among these different approaches include color stability, color rendering capability, and luminous efficacy. Often higher efficiency will mean lower color rendering, presenting a trade off between the luminous efficiency and color rendering. For example, the dichromatic white LEDs have the best luminous efficacy(120 lm/W), but the lowest color rendering capability. Conversely, although tetrachromatic white LEDs have excellent color rendering capability, they often have poor luminous efficiency. Trichromatic white LEDs are in between, having both good luminous efficacy(>70 lm/W) and fair color rendering capability.

What multi-color LEDs offer is not merely another solution of producing white light, but is a whole new technique of producing light of different colors. In principle, most perceivable colors can be produced by mixing different amounts of three primary colors, and this makes it possible to produce precise dynamic color control as well. As more effort is devoted to investigating this technique, multi-color LEDs should have profound influence on the fundamental method which we use to produce and control light color. However, before this type of LED can truly play a role on the market, several technical problems need to be solved. These certainly include that this type of LED's emission power decays exponentially with increasing temperature,[45] resulting in a substantial change in color stability. Such problem is not acceptable for industrial usage. Therefore, many new package designs aiming to solve this problem have been proposed, and their results are being reproduced by researchers and scientists.

Phosphor based LEDs

Spectrum of a “white” LED clearly showing blue light which is directly emitted by the GaN-based LED (peak at about 465 nm) and the more broadband Stokes-shifted light emitted by the Ce3+:YAG phosphor which emits at roughly 500–700 nm.

This method involves coating an LED of one color (mostly blue LED made of InGaN) with phosphor of different colors to produce white light, the resultant LEDs are called phosphor based white LEDs. A fraction of the blue light undergoes the Stokes shift being transformed from shorter wavelengths to longer. Depending on the color of the original LED, phosphors of different colors can be employed. If several phosphor layers of distinct colors are applied, the emitted spectrum is broadened, effectively increasing the color rendering index (CRI) value of a given LED.

Phosphor based LEDs have a lower efficiency than normal LEDs due to the heat loss from the Stokes shift and also other phosphor-related degradation issues. However, the phosphor method is still the most popular technique for manufacturing high intensity white LEDs. The design and production of a light source or light fixture using a monochrome emitter with phosphor conversion is simpler and cheaper than a complex RGB system, and the majority of high intensity white LEDs presently on the market are manufactured using phosphor light conversion.

The greatest barrier to high efficiency is the seemingly unavoidable Stokes energy loss. However, much effort is being spent on optimizing these devices to higher light output and higher operation temperatures. For instance, the efficiency can be increased by adapting better package design or by using a more suitable type of phosphor. Philips Lumileds' patented conformal coating process addresses the issue of varying phosphor thickness, giving the white LEDs a more homogeneous white light. With development ongoing, the efficiency of phosphor based LEDs is generally increased with every new product announcement.

Technically the phosphor based white LEDs encapsulate InGaN blue LEDs inside of a phosphor coated epoxy. A common yellow phosphor material is cerium-doped yttrium aluminium garnet (Ce3+:YAG).

White LEDs can also be made by coating near ultraviolet (NUV) emitting LEDs with a mixture of high efficiency europium-based red and blue emitting phosphors plus green emitting copper and aluminium doped zinc sulfide (ZnS:Cu, Al). This is a method analogous to the way fluorescent lamps work. This method is less efficient than the blue LED with YAG:Ce phosphor, as the Stokes shift is larger and more energy is therefore converted to heat, but yields light with better spectral characteristics, which render color better. Due to the higher radiative output of the ultraviolet LEDs than of the blue ones, both approaches offer comparable brightness. Another concern is that UV light may leak from a malfunctioning light source and cause harm to human eyes or skin.

[edit] Other white LEDs

Another method used to produce experimental white light LEDs used no phosphors at all and was based on homoepitaxially grown zinc selenide (ZnSe) on a ZnSe substrate which simultaneously emitted blue light from its active region and yellow light from the substrate.[46]

Organic light-emitting diodes (OLEDs)

If the emitting layer material of the LED is an organic compound, it is known as an Organic Light Emitting Diode (OLED). To function as a semiconductor, the organic emitting material must have conjugated pi bonds. [47] The emitting material can be a small organic molecule in a crystalline phase, or a polymer. Polymer materials can be flexible; such LEDs are known as PLEDs or FLEDs.

Compared with regular LEDs, OLEDs are lighter, and polymer LEDs can have the added benefit of being flexible. Some possible future applications of OLEDs could be:

  • Inexpensive, flexible displays
  • Light sources
  • Wall decorations
  • Luminous cloth

OLEDs have been used to produce visual displays for portable electronic devices such as cellphones, digital cameras, and MP3 players. Larger displays have been demonstrated,[48] but their life expectancy is still far too short (<1,000 class="noprint Template-Fact" title="This claim needs references to reliable sources from January 2008" style="white-space: nowrap;">[citation needed].

Today, OLEDs operate at substantially lower efficiency than inorganic (crystalline) LEDs.[49]

Quantum dot LEDs (experimental)

A new technique developed by Michael Bowers, a graduate student at Vanderbilt University in Nashville, involves coating a blue LED with quantum dots that glow white in response to the blue light from the LED. This technique produces a warm, yellowish-white light similar to that produced by incandescent bulbs.[50]

Quantum dots are semiconductor nanocrystals that possess unique optical properties.[51] Their emission color can be tuned from the visible throughout the infrared spectrum. This allows quantum dot LEDs to create almost any color on the CIE diagram. This provides more color options and better color rendering white LEDs. Quantum dot LEDs are available in the same package types as traditional phosphor based LEDs.

In September 2009 Nanoco Group announced that it has signed a joint development agreement with a major Japanese electronics company under which it will design and develop quantum dots for use in light emitting diodes (LEDs) in liquid crystal display (LCD) televisions.[52]

Types

LEDs are produced in a variety of shapes and sizes. The 5 mm cylindrical package (red, fifth from the left) is the most common, estimated at 80% of world production.[citation needed] The color of the plastic lens is often the same as the actual color of light emitted, but not always. For instance, purple plastic is often used for infrared LEDs, and most blue devices have clear housings. There are also LEDs in SMT packages, such as those found on blinkies and on cell phone keypads (not shown).

The main types of LEDs are miniature, high power devices and custom designs such as alphanumeric or multi-color.

[edit] Miniature LEDs

Different sized LEDs. 8 mm, 5 mm and 3 mm, with a wooden match-stick for scale.

These are mostly single-die LEDs used as indicators, and they come in various-sizes from 2 mm to 8 mm, through-hole and surface mount packages. They are usually simple in design, not requiring any separate cooling body.[53] Typical current ratings ranges from around 1 mA to above 20 mA. The small scale sets a natural upper boundary on power consumption due to heat caused by the high current density and need for heat sinking.

High power LEDs

High power LEDs from Philips Lumileds Lighting Company mounted on a 21 mm star shaped base metal core PCB

High power LEDs (HPLED) can be driven at currents from hundreds of mA to more than an ampere, compared with the tens of mA for other LEDs. They produce up to over a thousand [54][55] lumens. Since overheating is destructive, the HPLEDs must be mounted on a heat sink to allow for heat dissipation. If the heat from a HPLED is not removed, the device will burn out in seconds. A single HPLED can often replace an incandescent bulb in a flashlight, or be set in an array to form a powerful LED lamp.

Some well-known HPLEDs in this category are the Lumileds Rebel Led, Osram Opto Semiconductors Golden Dragon and Cree X-lamp. As of September 2009 some HPLEDs manufactured by Cree Inc. now exceed 105 lm/W [56] (e.g. the XLamp XP-G LED chip emitting Cool White light) and are being sold in lamps intended to replace incandescent, halogen, and even fluorescent style lights as LEDs become more cost competitive.

LEDs have been developed by Seoul Semiconductor that can operate on AC power without the need for a DC converter. For each half cycle part of the LED emits light and part is dark, and this is reversed during the next half cycle. The efficacy of this type of HPLED is typically 40 lm/W.[57] A large number of LED elements in series may be able to operate directly from line voltage.

SuperFlux LEDs

These wide angle LEDs provide large areas of light and a wide viewing angle in a small compact diode. They consist of a square diode, with four leads (two positive, two negative). The most common use for these LEDs are light panels and emergency LED lighting.

[edit] Application-specific variations

  • Flashing LEDs are used as attention seeking indicators without requiring external electronics. Flashing LEDs resemble standard LEDs but they contain an integrated multivibrator circuit inside which causes the LED to flash with a typical period of one second. In diffused lens LEDs this is visible as a small black dot. Most flashing LEDs emit light of a single color, but more sophisticated devices can flash between multiple colors and even fade through a color sequence using RGB color mixing.
Calculator LED display, 1970s.
  • Bi-color LEDs are actually two different LEDs in one case. It consists of two dies connected to the same two leads but in opposite directions. Current flow in one direction produces one color, and current in the opposite direction produces the other color. Alternating the two colors with sufficient frequency causes the appearance of a blended third color. For example, a red/green LED operated in this fashion will color blend to produce a yellow appearance.
  • Tri-color LEDs are two LEDs in one case, but the two LEDs are connected to separate leads so that the two LEDs can be controlled independently and lit simultaneously. A three-lead arrangement is typical with one common lead (anode or cathode).
  • RGB LEDs contain red, green and blue emitters, generally using a four-wire connection with one common lead (anode or cathode). These LEDs can have either common positive or common negative leads. Others however, have only two leads (positive and negative) and have a build in tiny electronic control unit.
  • Alphanumeric LED displays are available in seven-segment and starburst format. Seven-segment displays handle all numbers and a limited set of letters. Starburst displays can display all letters. Seven-segment LED displays were in widespread use in the 1970s and 1980s, but increasing use of liquid crystal displays, with their lower power consumption and greater display flexibility, has reduced the popularity of numeric and alphanumeric LED displays.

Considerations for use

Power sources

The current/voltage characteristics of an LED is similar to other diodes, in that the current is dependent exponentially on the voltage (see Shockley diode equation). This means that a small change in voltage can lead to a large change in current. If the maximum voltage rating is exceeded by a small amount the current rating may be exceeded by a large amount, potentially damaging or destroying the LED. The typical solution is therefore to use constant current power supplies, or driving the LED at a voltage much below the maximum rating. Since most household power sources (batteries, mains) are not constant current sources, most LED fixtures must include a power converter. However, the I/V curve of nitride-based LEDs is quite steep above the knee and gives an If of a few mA at a Vf of 3V, making it possible to power a nitride-based LED from a 3V battery such as a coin cell without the need for a current limiting resistor.

Electrical polarity

As with all diodes, current flows easily from p-type to n-type material.[58] However, no current flows and no light is produced if a small voltage is applied in the reverse direction. If the reverse voltage becomes large enough to exceed the breakdown voltage, a large current flows and the LED may be damaged. If the reverse current is sufficiently limited to avoid damage, the reverse-conducting LED is a useful noise diode.

Advantages

  • Efficiency: LEDs produce more light per watt than incandescent bulbs.[59]
  • Color: LEDs can emit light of an intended color without the use of color filters that traditional lighting methods require. This is more efficient and can lower initial costs.
  • Size: LEDs can be very small (smaller than 2 mm2[60]) and are easily populated onto printed circuit boards.
  • On/Off time: LEDs light up very quickly. A typical red indicator LED will achieve full brightness in microseconds.[61] LEDs used in communications devices can have even faster response times.
  • Cycling: LEDs are ideal for use in applications that are subject to frequent on-off cycling, unlike fluorescent lamps that burn out more quickly when cycled frequently, or HID lamps that require a long time before restarting.
  • Dimming: LEDs can very easily be dimmed either by Pulse-width modulation or lowering the forward current.
  • Cool light: In contrast to most light sources, LEDs radiate very little heat in the form of IR that can cause damage to sensitive objects or fabrics. Wasted energy is dispersed as heat through the base of the LED.
  • Slow failure: LEDs mostly fail by dimming over time, rather than the abrupt burn-out of incandescent bulbs.[62]
  • Lifetime: LEDs can have a relatively long useful life. One report estimates 35,000 to 50,000 hours of useful life, though time to complete failure may be longer.[63] Fluorescent tubes typically are rated at about 10,000 to 15,000 hours, depending partly on the conditions of use, and incandescent light bulbs at 1,000–2,000 hours.
  • Shock resistance: LEDs, being solid state components, are difficult to damage with external shock, unlike fluorescent and incandescent bulbs which are fragile.
  • Focus: The solid package of the LED can be designed to focus its light. Incandescent and fluorescent sources often require an external reflector to collect light and direct it in a usable manner.
  • Toxicity: LEDs do not contain mercury, unlike fluorescent lamps.

Disadvantages

  • High initial price: LEDs are currently more expensive, price per lumen, on an initial capital cost basis, than most conventional lighting technologies. The additional expense partially stems from the relatively low lumen output and the drive circuitry and power supplies needed. However, when considering the total cost of ownership (including energy and maintenance costs), LEDs far surpass incandescent or halogen sources and begin to threaten compact fluorescent lamps[citation needed].
  • Temperature dependence: LED performance largely depends on the ambient temperature of the operating environment. Over-driving the LED in high ambient temperatures may result in overheating of the LED package, eventually leading to device failure. Adequate heat-sinking is required to maintain long life. This is especially important when considering automotive, medical, and military applications where the device must operate over a large range of temperatures, and is required to have a low failure rate.
  • Voltage sensitivity: LEDs must be supplied with the voltage above the threshold and a current below the rating. This can involve series resistors or current-regulated power supplies.[64]
  • Light quality: Most cool-white LEDs have spectra that differ significantly from a black body radiator like the sun or an incandescent light. The spike at 460 nm and dip at 500 nm can cause the color of objects to be perceived differently under cool-white LED illumination than sunlight or incandescent sources, due to metamerism,[65] red surfaces being rendered particularly badly by typical phosphor based cool-white LEDs. However, the color rendering properties of common fluorescent lamps are often inferior to what is now available in state-of-art white LEDs.
  • Area light source: LEDs do not approximate a “point source” of light, but rather a lambertian distribution. So LEDs are difficult to use in applications requiring a spherical light field. LEDs are not capable of providing divergence below a few degrees. This is contrasted with lasers, which can produce beams with divergences of 0.2 degrees or less.[66]
  • Blue Hazard: There is increasing concern that blue LEDs and cool-white LEDs are now capable of exceeding safe limits of the so-called blue-light hazard as defined in eye safety specifications such as ANSI/IESNA RP-27.1-05: Recommended Practice for Photobiological Safety for Lamp and Lamp Systems.[67][68]
  • Blue pollution: Because cool-white LEDs (i.e., LEDs with high color temperature) emit much more blue light than conventional outdoor light sources such as high-pressure sodium lamps, the strong wavelength dependence of Rayleigh scattering means that cool-white LEDs can cause more light pollution than other light sources. It is therefore very important that cool-white LEDs are fully shielded when used outdoors. Compared to low-pressure sodium lamps, which emit at 589.3 nm, the 450 nm emission spike of cool-white and blue LEDs is scattered almost 3 times more by the Earth's atmosphere. Cool-white LEDs should not be used for outdoor lighting near astronomical observatories. The International Dark-Sky Association discourages the use of white light sources with Correlated Color Temperature above 3,000 K.

Applications

A large LED display behind a disc jockey.
LED destination displays on buses, one with a colored route number.
LED digital display that can display 4 digits along with points.
Traffic light using LED
Dropped ceiling with LED lamps
LED daytime running lights of Audi A4
Illustration of the cost of using a single Incandescent, CFL, LED (at current market price) and an LED (at estimated price within a couple years) each year over the span of a decade.
LED panel light source used in an experiment on plant growth. The findings of such experiments may be used to grow food in space on long duration missions.

The many application of LEDs are very diverse but fall into three major categories: Visual signal application where the light goes more or less directly from the LED to the human eye, to convey a message or meaning. Illumination where LED light is reflected from object to give visual response of these objects. Finally LEDs are also used to generate light for measuring and interacting with processes that do not involve the human visual system.[69]

Indicators and signs

The low energy consumption, low maintenance and small size of modern LEDs has led to applications as status indicators and displays on a variety of equipment and installations. Large area LED displays are used as stadium displays and as dynamic decorative displays. Thin, lightweight message displays are used at airports and railway stations, and as destination displays for trains, buses, trams, and ferries.

The single color light is well suited for traffic lights and signals, exit signs, emergency vehicle lighting, ships' lanterns and LED-based Christmas lights. Red or yellow LEDs are used in indicator and alphanumeric displays in environments where night vision must be retained: aircraft cockpits, submarine and ship bridges, astronomy observatories, and in the field, e.g. night time animal watching and military field use.

Because of their long life and fast switching times, LEDs have been used for automotive high-mounted brake lights and truck and bus brake lights and turn signals for some time, but many vehicles now use LEDs for their rear light clusters. The use of LEDs also has styling advantages because LEDs are capable of forming much thinner lights than incandescent lamps with parabolic reflectors. The significant improvement in the time taken to light up (perhaps 0.5s faster than an incandescent bulb) improves safety by giving drivers more time to react. It has been reported that at normal highway speeds this equals one car length increased reaction time for the car behind. White LED headlamps are beginning to make an appearance.

Due to the relative cheapness of low output LEDs, they are also used in many temporary applications such as glowsticks, throwies, and the photonic textile Lumalive. Artists have also used LEDs for LED art.

Weather/all-hazards radio receivers with Specific Area Message Encoding (SAME) have three LEDs: red for warnings, orange for watches, and yellow for advisories & statements whenever issued.

Lighting

With the development of high efficiency and high power LEDs it has become possible to incorporate LEDs in lighting and illumination. Replacement light bulbs have been made as well as dedicated fixtures and LED lamps. LEDs are used as street lights and in other architectural lighting where color changing is used. The mechanical robustness and long lifetime is used in automotive lighting on cars, motorcycles and on bicycle lights.

LEDs have been used for lighting of streets and of parking garages. In 2007, the Italian village Torraca was the first place to convert its entire illumination system to LEDs.[70]

LEDs are also suitable for backlighting for LCD televisions and lightweight laptop displays and light source for DLP projectors (See LED TV). RGB LEDs increase the color gamut by as much as 45%. Screens for TV and computer displays can be made increasingly thin using LEDs for backlighting.[71]

The lack of IR/heat radiation makes LEDs ideal for stage lights using banks of RGB LEDs that can easily change color and decrease heating from traditional stage lighting, as well as medical lighting where IR-radiation can be harmful.

Since LEDs are small, durable and require little power they are used in hand held devices such as flashlights. LED strobe lights or camera flashes operate at a safe, low voltage, as opposed to the 250+ volts commonly found in xenon flashlamp-based lighting. This is particularly applicable to cameras on mobile phones, where space is at a premium and bulky voltage-increasing circuitry is undesirable. LEDs are used for infrared illumination in night vision applications including security cameras. A ring of LEDs around a video camera, aimed forward into a retroreflective background, allows chroma keying in video productions.

LEDs are used for decorative lighting as well. Uses include but are not limited to indoor/outdoor decor, limousines, cargo trailers, conversion vans, cruise ships, RVs, boats, automobiles, and utility trucks. Decorative LED lighting can also come in the form of lighted company signage and step and aisle lighting in theaters and auditoriums.

Smart lighting

Light can be used to transmit broadband data, which is already implemented in IrDA standards using infrared LEDs. Because LEDs can cycle on and off millions of times per second, they can, in effect, become wireless routers for data transport.[72] Lasers can also be modulated in this manner.

[edit] Sustainable lighting

Efficient lighting is needed for sustainable architecture. A 13 watt LED lamp produces 450 to 650 lumens [73]. which is equivalent to a standard 40 watt incandescent bulb [74]. A standard 40 W incandescent bulb has an expected lifespan of 1,000 hours while an LED can continue to operate with reduced efficiency for more than 50,000 hours, 50 times longer than the incandescent bulb.

Environmentally friendly options

A single kilowatt-hour of electricity will generate 1.34 pounds (610 g) of CO2 emissions.[75] Assuming the average light bulb is on for 10 hours a day, a single 40-watt incandescent bulb will generate 196 pounds (89 kg) of CO2 every year. The 13-watt LED equivalent will only be responsible for 63 pounds (29 kg) of CO2 over the same time span. A building’s carbon footprint from lighting can be reduced by 68% by exchanging all incandescent bulbs for new LEDs.

LEDs are also non-toxic unlike the more popular energy efficient bulb option: the compact florescent a.k.a. CFL which contains traces of harmful mercury. While the amount of mercury in a CFL is small, introducing less into the environment is preferable.

Economically sustainable

LED light bulbs could be a cost effective option for lighting a home or office space because of their very long lifetimes, even though they have a much higher purchase price. The high initial cost of the commercial LED bulb is due to the expensive sapphire substrate which is key to the production process. The sapphire apparatus must be coupled with a mirror-like collector to reflect light that would otherwise be wasted.

During this transition period, it is a challenge to ensure that this technology is used where it is most appropriate and effective, and to avoid poor-quality products damaging the reputation. 2009 DOE testing results showed an average efficacy of 35 lm/W, below that of typical CFLs, and as low as 9 lm/W, worse than standard incandescents.[73] It is a challenge to get buyers and users to be conscious of and make decisions based on life-cycle costs instead of the more obvious initial purchase price, and to avoid having low-efficiency products ride on the coattails of hype generated by lab test results.

In 2008, a materials science research team at Purdue University succeeded in producing LED bulbs with a substitute for the sapphire components.[76]. The team used metal-coated silicon wafers with a built-in reflective layer of zirconium nitride to lessen the overall production cost of the LED. They predict that within a few years, LEDs produced with their revolutionary, new technique will be competitively priced with CFLs. The less expensive LED would not only be the best energy saver, but also a very economical bulb.

Non-visual applications

Light has many other uses besides for seeing. LEDs are used for some of these applications. The uses fall in three groups: Communication, sensors and light matter interaction.

The light from LEDs can be modulated very fast so they are extensively used in optical fiber and Free Space Optics communications. This include remote controls, such as for TVs and VCRs, where infrared LEDs are often used. Opto-isolators use an LED combined with a photodiode or phototransistor to provide a signal path with electrical isolation between two circuits. This is especially useful in medical equipment where the signals from a low voltage sensor circuit (usually battery powered) in contact with a living organism must be electrically isolated from any possible electrical failure in a recording or monitoring device operating at potentially dangerous voltages. An optoisolator also allows information to be transferred between circuits not sharing a common ground potential.

Many sensor systems rely on light as the main medium. LEDs are often ideal as a light source due to the requirements of the sensors. LEDs are used as movement sensors, for example in optical computer mice. The Nintendo Wii's sensor bar uses infrared LEDs. In pulse oximeters for measuring oxygen saturation. Some flatbed scanners use arrays of RGB LEDs rather than the typical cold-cathode fluorescent lamp as the light source. Having independent control of three illuminated colors allows the scanner to calibrate itself for more accurate color balance, and there is no need for warm-up. Furthermore, its sensors only need be monochromatic, since at any one point in time the page being scanned is only lit by a single color of light. Touch sensing: Since LEDs can also be used as photodiodes, they can be used for both photo emission and detection. This could be used in for example a touch-sensing screen that register reflected light from a finger or stylus.[77]

Many materials and biological systems are sensitive to, or dependent on light. Grow lights use LEDs to increase photosynthesis in plants[78] and bacteria and vira can be removed from water and other substances using UV LEDs for sterilization[42]. Other uses are as UV curing devices for some ink and coating applications as well as LED printers.

The use of LEDs is particularly interesting to plant cultivators, mainly because it is more energy efficient, less heat is produced (can damage plants close to hot lamps) and can provide the optimum light frequency for plant growth and bloom periods compared to currently used grow lights: HPS (High Pressure Sodium), MH (Metal Halide) or CFL/Low-energy. It has however not replaced these grow lights due to it having a higher retail price, as mass production and LED kits develop the product will become cheaper.

LEDs have also been used as a medium quality voltage reference in electronic circuits. The forward voltage drop (e.g., about 1.7 V for a normal red LED) can be used instead of a Zener diode in low-voltage regulators. Red LEDs have the flattest I/V curve above the knee; nitride-based LEDs have a fairly steep I/V curve and are not useful in this application. Although LED forward voltage is much more current-dependent than a good Zener, Zener diodes are not widely available below voltages of about 3 V.

Light sources for machine vision systems

Machine vision systems often require bright and homogeneous illumination, so features of interest are easier to process. LEDs are often used to this purpose, and this field of application is likely to remain one of the major application areas until price drops low enough to make signaling and illumination applications more widespread. Barcode scanners are the most common example of machine vision, and many inexpensive ones used red LEDs instead of lasers. LEDs constitute a nearly ideal light source for machine vision systems for several reasons:

The size of the illuminated field is usually comparatively small and machine vision systems are often quite expensive, so the cost of the light source is usually a minor concern. However, it might not be easy to replace a broken light source placed within complex machinery, and here the long service life of LEDs is a benefit.

LED elements tend to be small and can be placed with high density over flat or even shaped substrates (PCBs etc) so that bright and homogeneous sources can be designed which direct light from tightly controlled directions on inspected parts. This can often be obtained with small, inexpensive lenses and diffusers, helping to achieve high light densities with control over lighting levels and homogeneity. LED sources can be shaped in several configurations (spot lights for reflective illumination; ring lights for coaxial illumination; back lights for contour illumination; linear assemblies; flat, large format panels; dome sources for diffused, omnidirectional illumination).

LEDs can be easily strobed (in the microsecond range and below) and synchronized with imaging. High power LEDs are available allowing well lit images even with very short light pulses. This is often used in order to obtain crisp and sharp “still” images of quickly-moving parts.

LEDs come in several different colors and wavelengths, easily allowing to use the best color for each application, where different color may provide better visibility of features of interest. Having a precisely known spectrum allows tightly matched filters to be used to separate informative bandwidth or to reduce disturbing effect of ambient light. LEDs usually operate at comparatively low working temperatures, simplifying heat management and dissipation, therefore allowing plastic lenses, filters and diffusers to be used. Waterproof units can also easily be designed, allowing for use in harsh or wet environments (food, beverage, oil industries).