Charlieplexing LEDs with an AVR ATmega328

3 Comments

This is the first in a two-part series. This first article made me realize there’s a lot of ground to cover and we’re already in the tl;dr territory.

How many times has this happened to you? You have a little LED project with an AVR ATmega328 microcontroller (or Arduino) at its core and you need to light up a boatload…. A dingyload of LEDs. Maybe it doesn’t happen a lot to you. It’s happened on three recent projects for me. My latest two LED projects are a timekeeping piece that illuminates 21 characters from behind and a simple LED chaser thing.

As usual I wanted to keep the component count down on these projects. I also tend to prefer not to use a ton of ICs with busses between them and whatnot, if I can help it. So much darn soldering and stuff. Meh. Luckily, back in 1995, so the Wikipedia story goes, a super-smart dood named Charlie Allen at Maxim Integrated devised a super-ingenius way to control a large number of LEDs using a not-so-large number of microcontroller pins. The method is called, “Charlieplexing” and it seems a but daunting, at first, but it’s not that bad once you figger it out.

The core of this concept is based on the fact that diodes only allow current to flow in one direction. The “D” in “LED” stands for “diode.” Ergo, LEDs are diodes. LEDs only light up when connected a particular direction. Put two diodes in parallel BUT in the opposite-facing direction and you can turn on one or the other simply by switching the polarity of the ends of the circuit. Fun! Diagram:

Two LEDs in Parallel

Two LEDs in Parallel

Let’s assume I have a 3V little coin cell running this thing and limiting resistors and CCRs are not our thing, today. Why not? Anyhoo… Looking at the diagram, you see I’m using GPIO pins from an Atmel ATmega168 AVR microcontroller (it was readily available in the library in Fritzing, the program I used to throw together the drawring diagram schematic thing above). If I configger A0 and A1 as outputs and then set A1 HIGH and A0 LOW, I can turn on LED1. If I flip the states of the two pins and make A1 LOW and A0 HIGH, LED2 will light. Here’s a animated GIF of how it works with direct connections from the LEDs to 3V lithium coin cell on a breadboard:

Parallel opposite polarity LEDs flipping state

Parallel opposite polarity LEDs flipping state

Watch carefully and you’ll see that I switched the positive and negative to make one or the other LED light. Easy as pie. Imagine each wire from the battery is a GPIO pin from a microctonroller. All I’m doing up there is making one HIGH and one LOW and then flipping them back and forth.

More

VN:R_U [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:R_U [1.9.22_1171]
Rating: 0 (from 0 votes)

Making Mad Props for meltmedia’s Interactive Superhero Marketing Launch: The HAT

No Comments

This is the second in a series of three posts that talk about the props I built for my company’s internal marketing plan launch for the employees (see previous post for back story). This particular post is about the HAT (Helmet for Accentuating Telepathy) and is our managing partner Justin’s Interactive Superhero tool of choice. It allows his Techno Telepathy to reach farther than it would otherwise with the flick of a switch. The blinking LED on the end of the highly tuned antenna tells him his Techno Telepathy is sensing with ludicrous sensitivity. Er, something along those lines.

The HAT started life as a simple chrome (plastic that looked like chrome) skateboarding helmet, which means you, too can build a HAT for accentuating your telepathy (if you imagine REALLY hard):

HAT Brand New in Box

HAT Brand New in Box

The main purpose of the HAT is to make Justin, one of meltmedia’s partners, look like a dingbat (the plunger helps a little, as well):

HAT on Justin

HAT on Justin

More

VN:R_U [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:R_U [1.9.22_1171]
Rating: 0 (from 0 votes)

Making Mad Props for meltmedia’s Interactive Superhero Marketing Launch: Techno HAMMER

1 Comment

I believe I’ve mentioned it before: I work at an amazing web and software development shop called, “meltmedia.” We have a gaggle of highly talented software engineers, web developers and designers. Sometime back in 2011, meltmedia was in search of  a new tag line to kick off a for-real live marketing campaign. Marketing was something melt hadn’t worried about before then.

While in San Francisco at the 2011 Apple World Wide Developer Conference, in a bourbon-fueled barrage of submissions to the company’s on-line suggestion box for new company tag lines, I came up with, “We are Interactive Superheroes.” It stuck and I won a $90 bottle of bourbon. Woohoo! To be clear, I am fueled by many things: Caffeine, sugar, soda, etc., not just bourbon. I like chocolate milk. I happen to be a major bourbon geek and had been sampling fine bourbons at a speakeasy in San Francisco called, “Bourbon & Branch” before I went back to the hotel and started submitting dozens of mostly silly ideas for meltmedia’s new tag line.

For the short attention span version of this, here is a photo of the three partners of meltmedia in their full costumes with their props:

meltmedia Partners in Full Costume and Props

meltmedia Partners in Full Costume and Props

More

VN:R_U [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:R_U [1.9.22_1171]
Rating: 0 (from 0 votes)

Electronics and Hack Workbench

No Comments

I’ve had a number of requests from readers to see my workbench in its entirety, as most photos of it are just backgrounds to projects. So, I thought I’d post some photos and explanations in an article. Maybe someone will get some helpful hints or perhaps someone will lend me some helpful advice.

First off, here are some wide shots of the mess:

Wide shot of Andy's Electronics Workbench

Wide shot of Andy's Electronics Workbench

I made the table. The top is made out of three 10″-ish wide pine boards glued together side to side using biscuits. I had a custom piece of 3/16″ glass to fit the top. Half of the top of the table is covered with conductive foam to keep static at bay. I ordered a couple big pieces of that from somewhere on-line, can’t remember where. It’s super convenient for stabbing parts into to hold them neatly. It’s also great for discharging static. The legs I’ve had a while. They were part of a giant desk I built years ago. I got them on-line many moons ago. They have bases that are screwed to the bottom of the tabletop. They then screw into the bases. They’re made of steel or aluminum or something strong like that. Under the tabletop, I put a big “X” of 3″ wide interlocked pine planks for rigidity. I can stand right on the center of that table and it barely flexes. More

VN:R_U [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)
VN:R_U [1.9.22_1171]
Rating: +1 (from 1 vote)

RoboStocking – AVR, Servo, Motor, IR Sensor, and BOOM!!! Merry Christmas!

No Comments

At the office, we decided we were going to have a stocking decorating contest for Christmas. The rules were pretty lax, so I immediately thought of interactivity and electronics and blinky lights and whatnot. Well, that, and there was no way in you-know-what that I was going to hot glue glitter and spongy letters to a stocking with electricity being involved.

Here is a video of the final product to pique your interest:

How did I do it? Easy. Some AVR programming (through my usual Arduino hackery) and some simple electronics and BOOYAH! Motion activated stocking with a Santa sign and some jingle bells.

More

VN:R_U [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:R_U [1.9.22_1171]
Rating: 0 (from 0 votes)

AVR Serial Communications Using XBee RF Modules

No Comments

I was contacted by Element 14 (Newark.com) recently about doing some product test drives using some of the products from their line card. I took two to three seconds to think about it. I know, tough one…

XBee S2 ZigBee RF modules by Digi International

XBee S2 ZigBee RF modules by Digi International

I have been chomping at the bit to use ZigBee wireless technology in a project. Digi International makes some REALLY cool and easy-to-use ZigBee RF modules that bring ZigBee technology down to a level that even I can implement without more than a few terse passes at a wireless book and a couple of datasheets. So, the first piece of loot I requested from Element14 was an XBee S2 module. I would love to link you to this module at Newark.com, but it appears to be gone. That is sad. BAck to our story… There was a spending limit on my test-drive loot. I ordered one XBee S2 module on my tab. The other XBee module was sent to me courtesy of Element14.com.

The ultimate project is based on a need at our house: We hang out on the back patio quite a lot and when we invite guests over, even after we ask them to just come on in, they ring the doorbell and we can’t hear it out on the back patio. The leave disappointed that we would not be home when we said we would be. I’m kidding. Usually they do walk right in.

More

VN:R_U [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:R_U [1.9.22_1171]
Rating: 0 (from 0 votes)

Desktop Warp Core – The SMD LED Strip Years

No Comments

I threw together a video of the warp core’s control circuit and eight stupidly bright white SMD LED strips for the rings. The original rings were going to be through-hole bright LEDs, but I realized how much soldering and drilling would be required for that. That is dumb and painful. So, factory-built strips of LEDs, complete with self-adhesive backing, resistors, and snap-on wire ends ready for 12-volt DC power it is!

Here it is in action:

There will be more to come as we start to construct the body of the warp core.

VN:R_U [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:R_U [1.9.22_1171]
Rating: 0 (from 0 votes)

Domo Wobbly Balancing Robot Thing

2 Comments

Completed Domo Wobbly Bot and Remote

Completed Domo Wobbly Bot and Remote

The Short Attention Span version: I ripped apart a cheap remote controlled car and repurposed most of the parts into a self-balancing robot based on the Domo character because I thought one of the partners of the company I work for would enjoy it, as he seems to enjoy Domo stuff. I got the idea from a coworker who suggested I build this for the Domo partner.

The idea is not original to me. I was sent a link to Instructables.com that showed one in action. I didn’t follow the directions, so the engineering is my own brew. But, I will say, that’s an ingenius way to make an upright, two-wheeled roboto-doo-dad.

More

VN:R_U [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)
VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)

iPotti™ Released!

20 Comments

iPotti™ 1.2 bathroom status device

iPotti™ 1.2 bathroom status device

So, we have this issue at the office with our single-person bathrooms. We have one “m” bathroom and one “w” bathroom. We have 40+ people in the office. Many people who sit out-of-sight from the bathrooms often walk all the way across our office only to find out that someone else has beaten them to the potti.

To solve this problem, I took a Make Controller from MakingThings.com, wired a couple of Vishay TEMT6000 ambient light sensors (photo transistors) to it, then wrote a Mac desktop app to sit in the status bar to show everyone the status of the pottis. I call it, “iPotti™” and it works awesome!

More

VN:R_U [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)
VN:F [1.9.22_1171]
Rating: +20 (from 20 votes)

Hack the SparkFun Big Red Dome Button!

2 Comments

Needs more shine! The light bulb inside is medium OK in its ability to attract insects and people with ADD, but I wanted a little better (not too much, though). I also wanted signage. This is a super-simple project that anyone with even questionable soldering skills can pull off. Plus, there is enough room behind the red part of the button to put most any LED you like.

Finished Dome Button Upgrade: Lower power, better

Finished Dome Button Upgrade: Lower power, better

More

VN:R_U [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)
VN:F [1.9.22_1171]
Rating: +6 (from 6 votes)

Older Entries