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)

Standing Desk Improvisation Inspiration with Little Perspiration

No Comments

Today at the office, I walked by a coworker’s desk and something was different: She’d put an Ikea table and shelf together and set them on top of her desk. Nutty, at first glance. Purposeful, after 0.25 seconds of thought. Here’s what I saw:

Stand-Up Desk at meltmedia

Stand-Up Desk at meltmedia

Kristian came across this article from Colin Nederkoorn’s Blog with instructions on how to make your regular desk a standing or stand-up desk for only $22 with a couple of items from Ikea! Whatabargain! 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 Workbench LED Upgrade

No Comments

I guess I forgot to post an update to the update of my workbench. Not only did I clean up the gigantic mess that had accumulated on it, I improved the lighting and workspace availability:

Electronic Workbench LED Lighting Upgrade

Electronic Workbench LED Lighting Upgrade

Prior to this upgrade, I had fluorescent lighting under the blue cabinets over the bench. They extended down about 3 to 4 inches and kinda got in the way. I also didn’t think through the placement, so they were back about half-way under the cabinets. This meant they didn’t put light out on the front edge of the tabletop like I would have hoped. Here’s the old lighting:

Old Fluorescent Lighting

Old Fluorescent Lighting

The monitor on the left barely fit behind the light and the light extended down lower than the top of the monitor. Dumb. I might have been drinking bourbon that day. Like, more than a shot or two. No matter. That is history. Today, we have wonderLEDs!

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)

Lipstick Camera Turned Video Microscope

No Comments

Backstory: In a previous life, I was a freefall photographer. I took photos and shot video while skydiving. Before GoPro and others started popping up on the scene, I had devised a little rig for shooting freefall video without the need for the bulky miniDV camera on my helmet. The setup used a “bullet” or “lipstick” camera which provided a video input signal for a miniDV camera (used as a tape deck at this point) located OFF my helmet and in a pouch under my jumpsuit. I don’t remember where I got the camera. They can be found on the InterWebs for $100-ish, maybe less. Anyhoo, if you’ve ever stuck your hand out of the window of a car moving at highway speed, I’m pretty sure you’ll be able to figure out how non-aerodynamic a miniDV camera is. Needless to say, a lipstick camera cuts through the wind WAY easier than a full-on Sony TRV-20 miniDV camera. A lipstick camera also weighs considerably less than a miniDV camera.

Lipstick Camera

Lipstick Camera

OK, now that I’ve barfed out a giant intro paragraph, let’s get to the nutty-tasting inside of this story: I have this lipstick camera sitting around in a box. I know that when I twist the lens away from the sensor, the camera acts more and more like a video microscope. I have many tiny things I’d like to look at with minimal camera shake. 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 Rest of the Props

2 Comments

This is the 3rd in a series of articles about the props I built for my company’s internal marketing launch, which was themed around superheroes. I had to wait to write these three articles because we hadn’t launched yet when I had finished the props. This article focusses on the last partner prop and the simplest of the three, plus the capes, boots, masks and toolbelts used as props near the front doors of our office spaces (making it look like the meltmedia Interactive Superheroes had come in and hung up their stuff on coatracks after a long day of saving organizations from mediocre designs).

Here is one of the coatracks with the Interactive Superhero uniform:

meltmedia Interactive Superhero Uniform on Coatrack

meltmedia Interactive Superhero Uniform on Coatrack

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)

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)

DODOcase “Smart Cover” Magnet Upgrade for iPad 2

No Comments

Let’s start with a quick video of it in action:

This was an easy fix. Go to K & J Magnetics, Inc. and get yourself a thin little neodymium rare earth magnet. By, “thin,” I mean thinner than the cover of your DODOcase. The one I used in this upgrade was salvaged from a little laptop hard drive head servo thingy. 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)

Older Entries