Tag Archives: Charlieplexing

Let’s go Charlieplexing!



Charlieplexing is a technique proposed in early 1995 by Charlie Allen at Maxim Integrated for driving a multiplexed display in which relatively few I/O pins on a microcontroller are used to control an array of LEDs.

According to Wikipedia, the method employs the tri-state logic capabilities of microcontrollers in order to gain efficiency over traditional multiplexing. Indeed, most Makers have likely encountered a project where multiple LEDs are required – with only a few wires.

As Ochâtelain notes in a recent Instructables post, Charlieplexing using an Atmel-based Arduino board may very well fit the bill.

“With only four wires you can drive 12 LEDs with only four resistors as an optional protection and without any ‘intelligent’ component like a 74595 or similar,” ochâtelain explains.

Recommended project components?

  • 4 RGB LEDs (or 12 single color LEDs)
  • Atmel-based Arduino board
  • 4 resistors
  • Breadboard
  • 4 PIN male headers

Ochâtelain kicks off the project by prepping the stripboard.

“We will add a resistor to each strip, so just leave two rows in the beginning of the strips empty – one for the headers, one for the start of the resistor, cut (= isolate) on the third row of holes, the LED will be plugged starting from the forth row,” he writes.

“To simplify the bending, we mark the stripboard distance on every pin all LEDs. This way it is very easy to bend the pin the required strip. Please be aware to keep always the same ‘orientation’ of your LEDs. In this case Pin 3 is always the anode.”

Next, Ochâtelain defines the specific bending pattern and plugs the LEDs into the stripboard.

“Now comes the easy part: Just solder all the LED-PINs, then the 4 resistors (I first used 3k3 throughholes and then 0k5 SMDs) and the 4 header pins,” he adds.

“Keep a sharp eye on any short-circuit on the front and back side of the board.”

Last, Ochâtelain tests the system with a Charlieplexing Arduino sketch. 

Interested in learning more about Charlieplexing with an Arduino? You can check out Ochâtelain’s Instructable page here.

Customizing a Pomodoro timer with the ATtiny85 MCU

Robin Scheibler says he has always been interested in Atmel’s popular ATtiny85 microcontroller. Indeed, Scheibler describes the MCU as “minimalist, yet powerful,” making the silicon a very attractive platform for both gadgets and hacks.

Unsurprisingly, Scheibler is also interested various charlieplexing techniques, or the art of controlling multiple LEDs with as few pins as possible. 

Recently, he decided to combine both interests by building a custom timer for the Pomodoro technique – which aims to increase productivity by splitting time into slices of 25 minutes of work followed by a 5 minutes rest period.

“The technique proposes using a tomato shaped kitchen timer to keep track of time, but I designed and built my own,” he explained in a blog post. 

”The ATtiny85, with its 5 GPIO pins available by default (sacrificing ISP yields an extra pin, but I didn’t want to go down that road), seemed like the perfect candidate.”

Aside from the ATtiny85 MCU (as TIMER1), key specs for Scheibler’s Pomodoro timer include a basic user interface (a single tactile switch), buzzer (driven by TIMER0 in PWM mode at 4 kHz, 50% duty cycle) and power (CR2032 lithium coin cell).

In addition, Scheibler assigned the three remaining GPIO pins to LEDs using charlieplexing – driving 6 LEDs using on three pins. On the software side, Scheibler says the code is completely interrupt driven.

“TIMER1 and its overflow interrupt are used to keep track of time during each state, [while] the tactile switch triggers an interrupt to wake up the AVR, or switch between states,” he added.

“Blue arrows are state switching triggered by a push on the button. Red arrows switching are caused by the timer expiration. The main states are black circles [and] the grey circles the transition states. It was important to add the BACKOFF state to debounce the tactile button because it triggered multiple interrupts.”

Interested in learning more Scheibler’s Atmel-powered Pomodoro timer? You can check out the project’s official page here.

Atmel’s ATmega645P goes tick tock

We recently talked about how there really is nothing like the comforting glow of a Nixie tube. But what if you felt like building something that glowed (not necessarily red) and could be carried around in your pocket?

Well, that is exactly what a Maker named Frank did when he wanted a classy (and rather different) way of telling the time by designing an LED pocket watch around Atmel’s ATmega645P. As you can see in the video below, the watch features 132 LEDs for displaying the time, two buttons to activate and change modes, along with a vibration motor and buzzer.

As the folks at Hack A Day note, Atmel’s picoPower ATmega645P controls the LED pocket watch, which is equipped with enough pins to drive the expansive array of LEDs as well as an internal real time clock. The device – housed behind a laser-cut acrylic face – sits in a 3D printed case and sips power from a rechargeable lithium coin cell battery. The charging circuitry is based on an MCP73831, while a USB connector provides power to the board.

ledwatch1

“One of the bigger challenges of the design is driving the large array of LEDs,” writes Eric Evenchick of Hack A Day. “[So] Frank uses Charlieplexing to group the LEDs and reduce the number of pins required. Another trick he used was offsetting the ISP header pins. This allows for programming the AVR without soldering a connector to the board.”

Additional details, such as schematics, PCB layout, software design and case plans can be found here on Instructables.