The afternoon projects thread

Reminds me of Sandwich, the line-following robot. :mrgreen:

Those look like Robosapien motors. I have about 5 from taking one apart. Very useful. :)
 
Actually, to be honest, that's exactly where I got the idea - but I'll be damned if I can remember where I saw it!

In a book, maybe.
 
Would this happen to be the book?
rbfb_pl.jpg


I have that book. :awesome:
 
A book, from a dictionary (didn't say which one):

"book n. 1. An archaic device used to store and distribute information. Consists of printed pages of words and pictures bound to a central spine, usually with a cover of some sort. May be used informationally, or for entertainment (see novel). In most forms has largely been replaced by the internet. 2. A section of a book, esp. used by older, dumber, authors. see also: novel , magazine , internet "
 
Charlieplexed LEDs
Charlieplexing, thought up in the 90's by a guy named Charlie Allen, is a technique for driving multiplexed displays.
Ideally, driving LEDs with relatively few I/O pins of a Microcontroller.

Charlieplexing scales quite nicely, it really doesn't take many pins to control a large number of LEDs.
However, processing-wise, Charlieplexing really eats up your Duty Cycle.
But if you've got a microcontroller that can take it, you can control a surprising number of LEDs.

A simple formula for figuring out how many LEDs you can drive with a certain number of I/O pins: n^2-n, n being the number of I/O pins to use.
So, for instance, you can use 6 pins to drive up to 30 LEDs, you can drive 90 LEDs with only 10 pins.
Pretty cool ey?

I worked up a real simple setup here, I'm using 3 I/O pins to control 6 LEDs.
I'm using an Atmel AVR ATtiny2313, stupid cheap, really common, and hosts 18 I/O pins.
Theoretically, a tiny2313 like this could drive up to 306 LEDs!
But, I'd doubt it's processor could handle lighting 'em all up at once.
I'll explain why.

You see, with Charlieplexing, you cannot light more than 1 LED at a time.
You light them 1 by 1.
So how do you make it appear as though many are lit?
Simply switching between 'em.
Light one, turn it off, light another, so on.
So long as you're lighting each LED at least ~50 times per second, they should appear to be lit simultaneously.
If an LED is lit less than 50 times per second, they may appear to "flicker". That "50 times per second" isn't really exact, but it forms a good baseline.
The monitor you're reading this on probably refreshes at 60Hz, or 60 times per second. Some of you might be using 75Hz monitors.
If you're on an old CRT, or a very high-end LCD, you may be as high as 120Hz!

In my case, I have no idea how fast I'm updating my LEDs. I could figure it out, but eh, I don't wanna.
It looks good, and that's all I care about right now.
Now, I did this setup because I plan on making a much larger array of 27 LEDs, which will take 6 pins to drive. (I'll make a post about it when I'm done with that)
Think of this as a practice run.
It'll be very easy for me to take the code I wrote for this, and modify it to control all 27 LEDs of my larger array.

If you're lazy and don't care about the technical stuff, just jump down here to see what I've made!

Here's a little video of my 6-LED array in action!
Little video. Itty Bitty.
[popup=http://jesse.builtnoble.com/CHC/6LEDtest.SWF,240,180]Taken with an awful 3MP cellphone camera.[/popup]
(Click it, it'll pop up in a little window)
 
Nice!



Just out of curiosity, what's the difference between Charlieplexing and just standard ol' multiplexing?
 
robm said:
Nice!
Just out of curiosity, what's the difference between Charlieplexing and just standard ol' multiplexing?

More LEDs!

Kinda a pain to explain, so I'll let Wikipedia do it for me:
"In display multiplexing, the data lines of the displays are connected together in parallel to a common bus on the microcontroller. Then, the displays are turned on individually and addresses when they turn on. This allows one to use fewer I/O pins than it would normally take to drive the same number of displays directly."
"When using charlieplexing, n drive pins can drive n digits with n-1 segments. When simplified, it equates to n pins being able to drive n2-n segments or LEDs. Traditional multiplexing takes many more pins to drive the same number of LEDs; 2n pins must be used to drive n2 LEDs (though a 1-of-n decoder chip can be used to reduce the number of microcontroller IO pins to
730ab1361d5b146243d64c91183ca03a.png
."

In short, Multiplexing == 2n Pins for n2 LEDs.
Charlieplexing == n Pins for n2-n LEDs

I've finished my biggar project, 27 Charlieplexed LED display.
I'll post pics in a bit here.
Right now, it's working, I just wanna play with it a bit more!
 
I nearly forgot about this.

Here's the "Complete" version of the project I was talking about on the last page.

It uses 27 Un-Freaking-Believably bright Pink LEDs!
At full power, all of them together were enough to light up my entire room.
Looking at them was far more difficult than staring at any standard light-bulb.
When I finally got them down to a brightness that you could at least look at, it was still difficult for my horrible camera to capture.

Mounted on a fancy round PCB you can get at any radioshack!

I controlled 'em all with an ATTiny2313, cheap, common, etc.
Uses 2 AAA Batteries for power! Or 3? I don't remember, it's not like they'll need changing any time in the next 10 years...

It takes the form of a lovely heart :p
I used a little aluminum ball I had lying around from something or another, cut it in half, BAM, sexy case!

It plays a series of animations.
It can hold many hundreds of frames!
And the frame-rate is adjustable!
For this, I just did a small handful, I think 3 or so, animations, each anywhere from 6 - 12 frames long.

The first, fills the heart from the center.
The second fills it from the bottom.
The third displays "I", *lights up heart outline*, "U".

Done%20%283%29.jpg

Done.jpg

OH GOD IT'S HORRIBLE
DO YOU KNOW WHAT THAT WAS LIKE?! CHARLIEPLEXING MAY BE SEXY BUT GOD Dang IT TOOK ME ALMOST 4 HOURS TO SOLDER THAT A GRAND TOTAL OF 3 TIMES + MULTIPLE REPAIRS.
DEAR GOD IT WAS AWFUL.
Done%20%286%29.jpg

Oh isn't that nice.
Done%20%287%29.jpg

Done%20%288%29.jpg


Just adorable ain't it?

OH! And there are PLENTY of I/O pins left!!
For, ya know, whatever.

While this particular one was given as a gift, I intend to do up a PCB that includes a couple buttons, and get a few made.
As far as I'm concerned, it's a fancy display :p
I really just wanna keep messing with it!
Make a really horrible version of Pong, or Tetris, or something like that.
Or at the very least just make a higher-quality version that isn't so freaking scary when seen from the back.
 
Back
Top