Twelve lights on one coin cell: design notes for a badge that lasts months
A blinking badge is a small lesson in power. Four pins drive twelve LEDs, the controller sleeps almost all the time, and a 220 mAh cell lasts three months. The film shows the board; the notes show the arithmetic.
A badge with a ring of lights is one of the friendliest boards to design. It is round, it has a dozen parts, and it teaches the one thing every battery gadget has to get right: where the power goes.
Twelve LEDs, four pins
A small, cheap controller has few pins to spare. A trick called charlieplexing lets four pins drive twelve LEDs. Each LED sits between a different pair of pins. To light one, the controller drives one pin high and one low and lets the other two float.
- Pins needed for n LEDs: with 4 pins you get 4 × 3 = 12.
- Only one LED is on at any instant. Step through them a few hundred times a second and the eye sees them all lit.
- One resistor per pin, four in all, sets the current.

Pick the LED colour with the battery in mind. Red, amber and yellow-green LEDs need about 2 V and run happily from a 3 V cell. Blue and white need close to 3 V and fade as soon as the cell starts to sag.
The coin cell
A CR2032 holds about 220 mAh at 3 V. It is a patient battery, not a strong one: ask it for more than a few milliamps and its voltage dips. Two habits keep it comfortable.
- Keep each LED to a milliamp or two. Modern LEDs are bright enough.
- Put a capacitor across the cell. It supplies the short pulses, and the cell refills it slowly.

Sleep is the feature
The lights do not empty the battery. Being awake does. A small controller that is running draws from a fraction of a milliamp to a few milliamps, even with every LED off. Asleep, with only a wake-up pin watching the button, it draws under a microamp.
So the firmware does very little, very quickly: wake, flash, sleep.
The arithmetic
Suppose a lit LED takes 2 mA, and the pattern has a light on 5 percent of the time.
| Mode | Average current | Life on 220 mAh | |---|---|---| | One LED always on | 2 mA | about 110 hours, under 5 days | | Flashing, lit 5% of the time | 0.1 mA | about 2,200 hours, 3 months | | Asleep, waiting for the button | under 0.001 mA | years; the cell ages first |
The same battery lasts five days or three months. The only difference is firmware.
The board
- Shape. A round board cannot be V-scored. It is held in its panel by small tabs instead. Our [panelization story](#/story/panelization-small-boards) shows how they work.
- Finish. Gold on a dark solder mask is the classic badge look. Lettering can be silkscreen, or bare gold with the mask opened over copper.
- The cell holder is the tallest and heaviest part. Most badges put it on the back. In the film it sits on the front so you can see it.
- The edge. Keep the LEDs a little back from the outline so the router does not clip a pad.
Thinking of making a batch for an event? Put the board on EIN: the DFM check reads the files before you order, and makers quote within minutes.
The badge in this film was drawn for the article. It is a design sketch, not a product.