Hiya-
O.K. I printed out onload's last post and have been reviewing it for a little while.
I think that I have a couple more questions, if you don't
mind. It will change the selection of the PIC that I
suggest.
I am thinking that your phrase:
"(The 0-10V supply is set at 10V for this pot-twiddling).
-That is, this pot twiddling ensures that at maximum input volts (10V) the current through the LEDs is not above the rated level for the LEDs."
I would interpret as:
"the INPUTS to the three channels to each of the op amps
is set to 10Volts, and the current verified to not exceed
the maximum input current to the LEDs".
In other words, in normal operation, there are 3 analog
inputs from the "outside world" (or other parts of the
product), that have a certain transfer function where a
set of input voltages would correspond to a "color" and
an "brightness" of the displays".
Can we characterize the number of different levels of
brightness and color during normal operation?
As mentioned in earlier posts, the "off" state of the
LEDs will not be a problem. Indeed, we can guarantee
an off condition with a PWM driven circuit. Just don't
supply any current to the NPN transistors, and they
stay in cutoff, hense no current through LEDs at all.
Conversely, in the "full on", or maximum brightness of
the LEDs, one would typically find that it is some duty
cycle/period of drive that would, in general, allow the
LEDs to be ON and draw rated current without adjusting
any pots at all. In other words, after design, there
would be no need to adjust pots at all. Typically, with
this large a number of LEDs, they would tend to "average
out" themselves. Even if they don't the current design
will not really allow for individual adjustment of
single LEDs.
That being said here are some caveats that I hope that
you will take to heart and at least think about.
1. I would "drag out the soldering iron" at this point.
We have chatted quite a bit with all this talk and I think
that further talk will not really add much to the
information base.
a. If you have a square wave function generator with a
variable output duty cycle around the company, or have a
friend who has one, or one you could borrow from a local
school. Hook the output of that in series with a
resistor to the base of one of the NPN transistors and a
stick of LEDs (any color) with a series resistor to limit
the current in the collector circuit of the NPN to the
design spec of the LEDs. Vary the frequency and period
of the output of the function generator and watch the
effects. If you feel that you can pick a frequency and
brightness suitable for your needs then you have some
very valuable data for your reference.
b. If you don't have a square wave function generator
then you can check the internet for a 555 or 556 circuit
(check some of the ham radio pages) for a small circuit
in the "audio frequency" range that will replace the
function generator. You are building a "poor man's"
square wave geneator. You can get a rough idea of the
frequency of interest by hooking up an earphone to the
output of this circuit and listen to the tone. I would
strive for a frequency of about 1KHz. That will get
you in the ball park. Continue with (a) above. If you
have an oscilloscope, then you, of course, don't need
the earphone setup.
2. Find an "output transfer curve" or sets of data for your
brightness levels in normal operation. This will give you
a rough idea on the various levels you will need to shoot
for in the final digital design, either the 555, TL494,
PIC, ATMEL, or whatever design. This again, is very
valueable data.
3. Deduce, by whatever means necessary (photo exposure
meter), reference to exisiting documentation, eyeball
guess, the voltage levels for the "input transfer curve".
In other words, during normal operation, what voltage
level curves do you need for each of the 3 "channels" of
operation.
4. Take the "input transfer curve" and "output transfer
curve" and formulate a "transfer curve" by whatever means
necessary.
5. NOW we are ready to start looking at alteratives. For
the purposes of this reply, I will limit my response to the
PIC alternative. Now, I do not work for Microchip or any
of it's affiliates, nor do my thoughts represent anything
other than my own opinions. If you decide to go down this
path, please be prepared for quite a learning curve if you
have not done computer programming. That being said:
a. I would start off with the Microchip Debug Express 2
development programmer/debugger. Part Number: DV164121.
This comes with a little programmer and an evaluation board.
Please note that the processor on the demo board is NOT
the final chip. It is overkill (most likely) for your
needs, but it provides a good starting point for the
final design. You can go cheaper, but the learning curve
will be starting at an earlier point with less "knowns" in
the mix.
b. Go through the lesson plans for this product. There
are a number of "canned" programs that guides one through
the process of embedded computer design with this package.
c. This will give you the "toolchain" to develop your
product.
d. Build your program up in steps. I would first, after
the lesson plans, do an "output transfer program" that would
cycle through the desired range of brightness for the
display.
e. Evaluate your input requirements. For example, if the
input range of analog signals can be broken down into
"chunks" or ranges, then you might have some alternatives.
I would (your mileage may vary) go with a 16F648A chip
and use the voltage comparator as a poor man's a/d
converter. Another candidate might be the 16F506 with an
8 bit a/d converter and 3 input channels. If you need
more than 8 bits (256 levels of brightness) then you can
go with a 10 bit a/d. A simple voltage divider on each
of the 3 input signal lines to divide the input voltage
down from 10V max to Vdd (possibly 5V, a very typical
supply voltage for digital circuitry) to convert the input
signal to a digital value.
d. Build yourself a program to take the input signals and
output them to a display device representing a digital
output condition. This could be to sample one input
channel, and output clock and data to a pair of digital
outputs. Don't laugh, I just got through with this
exercise myself this week. I'm working with a new PIC
chip for me (10F22X), and I output the value of the a/d
out and look at the value from the digital a/d. I clock
out the data and put the clock on a seperate output. I
trigger on the clock being asserted and read the values
off on the scope. This is all part of the "learning curve"
of learning a new chip. Some of the other variables that
you will have to determine is how often you really need
to sample the inputs. Here again, you don't need to
sample all that often (relatively speaking). You can
most likely sample each channel at 20Hz, leaving the input
sample rate at about 60Hz. I don't think that the
customer would notice (or might notice, but would not
object) to a change in brightness/color at a faster rate.
There is no reason that it couldn't be faster, but why
waste resources and it might make the programming of the
chip harder. Here's just an experienced guess on my part.
e. Add additional functionality as required. You mentioned
fans in the product. Here too, the PIC can control the
output of the fans based upon some sort of temperature
transducer input. I would suggest that you get the above
steps working first, then you can add that sort of
functionality.
Whew! Quite a response to your post here. THIS IS QUITE
A PARADIGM SHIFT in the design process. HOWEVER, it might
prove to be quite useful to both you in your career and to
the company that you work for. By shifting into embedded
processor control, you (both you and the company) have
greatly increased your design options, both now and in the
future. With this toolchain under control, you can apply
completely new design processes to your engineering efforts.
Applications of this can be applied to not only the
product itself, but in the manufacturing of products.
For my own example, bearing in mind that I have my
toolchain pretty much in order already. I am working on
a design that requires the monitoring of an Li-ion battery.
I have to use the SMALLEST possible package and only have
to worry about one input and one output. We will have
prototypes shortly after Christmas. These prototypes will
not have the small package (SOT-23s), but will be using
8 pin dips "dead bugged" onto the board. When the SOT-23
chips come in, we'll be ready to run. In production,
the circuit will be less than one dollar each. The PIC in
question is a new one for me, so I had to go through the
drill from "hello world" (blink an led) on up. The code
is written in C. The pickit 2 debug express was bought
to take care of a programming problem with my existing
development hardware (drat it!).
I was made aware of this "fast track" project on Dec. 4th.
Hope this helps.
Cheers,
Rich S.