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.
2 Comments:
Two points. First, in your ladder experiments, be aware that there is a .75V drop across every diode, including an LED.
Second, Have you considered pulse width modulation as a method of varying the brightness of the diode? Shorter on, longer off means dimmer to the brain of the viewer. No messing with voltages.
If you read down further, you'd see that there's a conflict with PWM timing if my refresh rate is too fast. Now that I've discovered the delayMilliseconds funtion on Arduino, I may re-think it.
Post a Comment
Links to this post:
Create a Link
<< Home