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.

Creating a charlieplexed LED grid to run on ATTiny85

Creating a charlieplexed LED grid to run on ATTiny85
This instructable was inspired by my first AVR microcontroller project that I've been working on for some time now. I wanted to start learning more about the AVR microcontroller and see how much I could do with the minimum amount of hardware... no extra chips, simple components, etc... just my AVR and my code so I could experiment with a simple set of hardware.

I decided to start with one of the smallest AVRs available, the ATTiny85 with only 8 pins. With only 5 output pins available to me (using 6 would make me lose other chip functionality), I decided to experiment with Charlieplexing. Charlieplexing allows you to control many LEDs with very few output pins, by wiring up an LED in both directions to every possible pair-combination of the pins. In my case, 5 pins would allow control of up to 20 LEDs (5 x (5-1)). This would only require the ATTiny, LEDs, 5 resistors, and a power source.

More info on Charlieplexing:  http://en.wikipedia.org/wiki/Charlieplexing
 
Remove these adsRemove these ads by Signing Up
 

Step 1Planning out the wiring

Planning out the wiring
Conceptually, it's not too difficult to understand how to wire up charlieplexing from some of the simpler diagrams available online (see diagram below courtesy of Wikipedia). However, I wanted to arrange 20 LEDs in a tight grid, and managing all the different connections & polarities seemed like it would get complicated as I scaled up from the 2 or 3 pin examples. Most importantly, to avoid mistakes when assembling, I wanted all my LEDs to be aligned the same direction on the board.

In the next step you'll see how the wiring works out for a larger grid of LEDs.
« Previous StepDownload PDFView All StepsNext Step »
8 comments
Nov 23, 2011. 11:43 AMtaller321led says:
HI Please what resistors are necesary for this desing? We simple red leds, 1,6v
Thanks
Jul 27, 2011. 1:12 PMdevilmaycry says:
do the resistors go in beteen the leds??? :( :(
Jul 27, 2011. 1:03 PMdevilmaycry says:
in the very first picture there are only 5 resistors and in the charlieplexed diargram there are 6 Im a bit confused with that .
Jul 27, 2011. 12:52 PMdevilmaycry says:
Hi Im currently doing GCSE ELECTRONICS KS4(year10).I really l really love your project and want to make a same on for my GCSE.if u could please tell me what type of microcontroller and the chip will i need to do it.MANY THANKS
Apr 29, 2011. 11:12 PMTieDyedPie says:
That's fantastic. You've simplified the wiring, and the implementation in general, nicely.

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!
6
Followers
3
Author:b2ben(Ben)