3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Charlieplexing LEDs- The theory

Step 3Introducing 'complementary drive'

Introducing \
Another name that is more accurate to describe 'charlieplexing' is 'complementary drive'.

In your average microcontroller you can in firmware tell the micro to set an output pin to be either a '0' or a '1', or to present a 0V voltage at the output or a 5V voltage at the output.

The diagram below now shows the sandwiched LED with a reversed partner....or a complement LED, hence complementary drive.

In the first half of the diagram, the micro is outputting 5V to pin A, and 0V to pin B. The current will thus flow from A to B. Because LED2 is oriented backwards to LED1 no current will flow through it and it will not glow. It's what is called reverse biased. We have the equivalent of the situation in the previous page. We can basically ignore LED2. Arrows show the current flow.

An LED is essentially a diode (hence Light Emitting Diode). A diode is a device that allows current to flow in one direction, but not in the other. The schematic of an LED sort of shows this, current will flow in the direction of the arrow......but is blocked the other way.

If we instruct the micro to now output 5V to pin B and 0V on pin A we have the opposite. Now LED1 is reverse biased, LED2 is forward biased and will allow current flow. LED2 will glow and LED1 will be dark.

Now might be a good idea to look at the schematics of the various projects mentioned in the introduction. You should see a whole lot of these complementary pairs in a matrix. Of course in the example below we are driving two LEDs with two microcontroller pins....you could say why bother.

Well the next section is where we get to the guts of charlieplexing and how it makes an efficient use of a microcontrollers output pins.
« Previous Step   View All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
26
Followers
7
Author:rgbphil
update later