Charlieplexing
From Wikipedia, the free encyclopedia
This article may not meet the general notability guideline or one of the following specific guidelines for inclusion on Wikipedia: Biographies, Books, Companies, Fiction, Music, Neologisms, Numbers, Web content, or several proposals for new guidelines. If you are familiar with the subject matter, please expand or rewrite the article to establish its notability. The best way to address this concern is to reference published, third-party sources about the subject. If notability cannot be established, the article is more likely to be considered for redirection, merge or ultimately deletion, per Wikipedia:Guide to deletion. This article has been tagged since December 2007. |
Charlieplexing is an electronics technique developed by Charlie Allen (hence the name) at Maxim in which relatively few I/O pins on a microcontroller are used to drive a large number of LEDs.
With Charlieplexing, n drive pins can be used to drive n digits with n-1 segments each; in other words, n drive pins can be used to control n^2-n LEDs. Traditional multiplexed display technique would take 2n drive pins to control n^2 LEDs.
Charlieplexing works by having the I/O pins alternate between driving digits and driving segments.
For example, Charlieplexing can drive a seven-segment display (actually 8 segments when you include the decimal point) of up to 9 digits with 9 I/O pins. Standard multiplexed display techniques would require 17 I/O pins to drive the same display.
Much like standard multiplexed displays, all the cathodes of any particular digit are connected together to a single I/O pin which remains low. Much like standard multiplexed displays, each anode of each LED of a particular digit is tied to the current-limiting resistor of a different I/O pin.
During operation, only one of the I/O pins is pulled low at any one time, pulling the cathodes of one particular digit low, acting like the digit-select line of standard multiplexed displays. All the other I/O pins connected to the display act as the "segment select" "anode pins" of a standard multiplexed display. All those pins are either "enabled" (pulled high through the current-limiting resistor) or "disabled" (aka "left disconnected" or "high Z" or "direction=input").
Any LEDs that has both its cathode (digit) selected and its anode (segment) selected turns on and glows. The other LEDs stay dark at that time.
Some Charlieplexing displays light up all the appropriate segments in a particular digit at the same time, scanning through the digits much like standard multiplexed displays. (They use an internal current source or an external resistor-diode on each I/O pin to keep the LED intensities matched). The "resistor-only" Charlieplexing displays only light up one LED at a time, scanning through each segment of each digit.
Since some of the LEDs will be driven with a reverse-bias voltage when they are not lit, the developer must make sure that the LEDs can withstand the reverse-bias without leaking. Typical red LEDs are rated at only 3V or 5V reverse bias, so try to choose 5V reverse-rated diodes and to run the LED driver at less than 5V. Leaking diodes will show up as ghosting (faint light) in other LEDs, as the leaking diode(s) allow small unwanted currents to flow.
[edit] Resources
- Maxim's article on the technique provides a good conceptual overview.
- This Instructables article shows how to implement Charlieplexing in hardware (and links to the article above).
- Another Instructable article with some basic theory.
- A detailed explanation How to Control Many Leds Using the multiplexing and Charlieplexing.
- Don Lancaster's Tech Musings #152 56 LEDs from one 8-bit port
- Microchip's app note Complementary LED Drive with a PIC
- Charlieplexed Displays using AVR