Wednesday, April 08, 2009

Arduino -- A New Tack

Well, I'm sticking with the 8x1 matrix for now as most of my effort has been with a failed R/2R ladder attempt. But there's good news!

The Revised Project

My current long-term goal is to create a POV projection device. It will use an array of eight high-intensity LED's mounted to a stepper mechanism to swing it back and forth. In front of the LED sweep will be a curved, plastic Fresnel lens to focus the light to, say, a wall.

The goal is to have the LED's light up in sixteen different intensities.

Why the R/2R Ladder Failed

An R/2R ladder is great when you want to convert 4-bit data (in my case) into evenly spaced voltages between 0v and 5v (in my case). So a value of 7 (binary 0111) should yield exactly half the voltage or 2.5v.

And it does. Very well.

The problem comes in when you discover that LED's (I'm speaking very generally here) only light up at 2 or 2.5v. So the first half of the resistor ladder is useless and it all basically equals zero (off). Leaving only the top 8 values of voltages. (And that's not even good enough, more later.)

So, I'd have to write code that "turns on" the ladder with a 7 and ranges to 15, with 0 as an "off" value. Not very clean or linear.

What Now?

Well, when I was demonstrating the resistor ladder circuit, it looked like it was dimming the LED perfectly. The problem was that my array of 4 DIP switches simulating logic input didn't take the input to ground when they were off. They only supplied 5v when they were on. The Arduino (and, in point of fact, this is the correct way) takes the logical pins to GROUND when they are off. That provided a proper grounding for the legs of the ladder and the net voltage dropped through the floor.

So, I've revised the circuit to contain a diode on each leg to prevent the grounding. The legs are either high or floating ("disconnected").

I'll try to put up a circuit soon, but I've been playing with it off and on 15-30 minutes at a go since the last post and I'm encroaching on resistor values that give me a linear (actually, sort of inverse exponential) progression of voltages from 1.5v to 4.5v.

Sweet!

A Rude LED Awakening

So in doing some research, I discovered that not only is the useful variable brightness range of LEDs only from 2.25v to about 3.75v, but also all the action takes place at the bottom of the scale.

My "sort of inverse exponential" values (i.e. jumping large gaps at the bottom and small ones at the top) are exactly the opposite of what I need.

So now my goal is to create a ladder (with op amp as voltage summer) that ranges from 2.5v to 4.5v with small jumps at the bottom and large jumps at the top.

 

Onward and upward.

Wednesday, March 11, 2009

Arduino -- The Beginning

I think I'll post some stuff about the Arduino projects I'm working on.

First thing, I'm trying to create a shield for an 8x8 monochrome LED matrix with variable brightness on each "pixel" LED. Such an animal might already exist, but I haven't found anyone doing exactly this.

A Start

I've already been playing with an 8x1 matrix and have a 4051 Analog Multiplexer (MUX) working beautifully. If I set the output level using analogOut (PWM), then update all the LED's (by scanning across them quickly) I can fade them up and down. However, if I attempt to directly manipulate the brightness of each LED in rapid succession it fails miserably.

PWM bites me in the butt

The reason for this is the way that the Arduino simulates "analog" voltages. The Arduino only has two choices for output voltage: 5v and Ground (0v). To "output" 2.5v, it pulses 5v to that pin half the time and 0v the other half (like a square wave) as fast as it can to supply and average of 2.5v. This is called Pulse Width Modulation (PWM). This works if the time that the target component has to react is significantly longer than the PWM cycle rate. (So it can react to the "average" voltage.) Since I'm cycling through the LED's as fast as the Arduino can loop, the PWM time isn't significantly faster than the refresh time, so the PWM "voltage" is basically undefined.

SIDE NOTE: the mystery of scanning displays

Most LED displays with a significant number of LEDs are not powered by lighting them up all at once, but rather by lighting each desired LED up in rapid sucession--much the same way that televisions and monitors scan the image down the screen rather than try to light up all the pixels at once. Persistence of vision and slow dimming rate of the pixels/LED's accomplish the rest by fooling your brain into thinking they are all lit up at once. Try video recording your alarm clock with the LED display, when you play it back, it'll flicker. This is why.

Screw PWM: A New Solution

So now my goal is to create an R/2R resistor ladder as a digital-to-analog converter to control voltages that way. (Using several, probably four, digital outs on the Arduino instead of the one PWM out.) I'm using an R/2R ladder because it turns out to be far easier to configure than the DAC chip (DAC08) I was trying to hook up a few nights ago.

Obligatory youtube link

Here's a video someone else made of an 8x8 and Arduino. Notice how may wires he used and that he's not even controlling all the LED's? That's why I'm using the 4015 MUX. I can control eight lights using only three lines (Binary 0-7 = 3 bits = 3 data lines.)

Tuesday, April 22, 2008

Did You Know?

Monday, August 27, 2007

Once Again the Media is Short-Sighted About Technology


How many uses can you think of for a 1 terabyte (1000 GB) CD?

tech.co.uk is reporting about a new technology ("TeraDisc") developed by Memphile (to whom they didn't bother to link). It uses 200 5MBGB layers to store the data.

That's astounding isn't it. Let you mind wander at the possibilites.

Or you can be short-sighted like they were:
It's hard to imagine that a disc format not invented by one of the world's big technology firms could become a future industry standard. But it's perfectly conceivable that these discs might one day be used in libraries to archive digital copies of books and so forth.

Yet another example of short-sighted people claiming technology won't be widely used.

Labels:

Tuesday, August 21, 2007

The Importance of Using Flash in your Photos

Picture With and Without Flash

Labels:

When I was Seven...

I found this video and I still remember every word of the jingle.


Ice Bird, Ice Bird, You're such a nice bird!
Let's make an Ice Bird Treat!
Scrape in the ice, to fill the cup,
Then add the flavor, eat it up!
Yum, yum, yum, yum!
How about another one?
Ice Bird you're a lot of fun!


I was truly laughing out loud! Wow, what a rush.

Labels:

Monday, August 20, 2007

Looking for an old TV Spot

When I was a kid in the 70's, there was what I think was a hippie PSA (or maybe a commercial for something). The lyrics went something like this:
Hear the world's heart beating
Like a big bass drum
Can't you hear the people something
It's true
It's the tapping of a million shoes.

So, hey, take a look around!
You can see it in a different way.
Say, hey, take a look around
You'll have a different point of view...


Any ideas? Leave me a comment...

EDIT: Might even be the intro from a Saturday morning TV show.

Labels: ,

Mr. Wick Plays "Windy"



This is one of my favorite sequences from The Drew Carey Show.

Accororing to Craig Ferguson's IMDb Bio he actually plays the harp. I thought it looked like he was.

Labels: ,

Thursday, August 16, 2007

Oh, How Language Changes

Modern Mechanix blog has a wonderful article from the Nov 1934 Popular Science on Playing with Matches and Lighting Gasoline on Fire.

Embeded in the article is this sidebar:

Popular Science reported a poll (circa 1934, I would assume) whereby they discovered that the word iodine is pronounced "i-o-DEEN", chloride is pronounced "KLOR-id" and oxide is pronounced "OX-id."

Funny how things change.

Labels: ,