Sorry if this was addressed elsewhere. I'm new to the Arduino board and forums and I love what it's capable of.
My question is hopefully a simple one. Are there any analog LED driver boards that can give me more analog outputs? I want to individually drive more than the Arduino's analog output capability.
Even something that extends the # of analog outputs would do it. I suppose it doesn't have to be a "LED driver".
Are you looking to drive LEDs ? How many ? In a matrix ?
I think there are some boards out there now for Arduino to drive bunches of LEDs. SeedStudio has one ?
I'm in the midst of designing an Arduino software compatible board targetted to large scale, inexpensive input and output, digital (and high power options) and analog (digital calibrated and diffed a2d in and PWM out).
Intent is to provide theoretically unlimited inputs and outputs and that led me to strongly consider 5940 for its' daisy chain support and LED/controlled current output. Initial application is for a Lithium battery management system that was originally going to use opto-couplers so LED support was nice.
But I ended up rejecting the 5940 for my design primarily for cost reasons. For the $4+ qty 1 price or $2.42 qty 5000 price you could also get 8 or 13 times as many 74AHC595 shift registers (8 bits each) and do the equivalent of the 5940 PWM in software. If you need higher current you can add 3 cent transistors if you have the space.
I think the 5940 has a "dirty secret" which is that you still have to pump the chain every 4096 clock pulses. You don't just set the 12 bit PWM values and let the MCU rest. I feel that if you have to pump the chain anyway, you might as well do PWM in software, and that then gives you more flexibility in PWM methods.
5940 seems just to be a 192 bit shift register and 16 counters, plus constant/modifiable current control. MCU could rest if you used some of those ancient quad 64 bit shift registers to recycle/reprime the PWM regularly. But that requires board space and adds cost.
Anyway, my design is still just a design and not yet a board, but it will have a theoretical (! with slow clock rate?) unlimited length daisy chain of output and input shift registers through which PWM can be done in software. Perhaps some input/output muxing could also provide hardware support.
Maybe I'm overthinking what I need for my project. I don't need a matrix at all. What I'm trying to achieve is the phaser buildup effect on an Enterprise (1701-D). Essentially, the charge builds up from 2 opposite ends and moves (ala Knight rider pulsing) along until they meet at the center. At that point, I'd have a laser triggered.
This is for a model Enterprise BTW.
So why analog? Well I don't just want to have 1 LED "travel" the distance along the strip. As the charge moves to the center, I want the LEDs that have lit along the way to fade out slowly.
It will essentially look like a wave from either end, travelling towards where the 2 paths meet, then end with a firing of a laser.
Now that I've stated the problem, maybe there's an easier solution than to just get more analog LEDs via a driver. Or maybe not...I'm new to this.
Another dirty little secret is the newer TLC5947. It has an internal oscillator so you don't need to worry about the 4096 clock BLANK interval, and it also has 24 channels so you can control exactly 8 RGB LEDs with one chip. It cannot handle higher current like the TLC5940, but it is enough for normal LEDs.
I guess for your application you could either have 12 LEDs on each side and make them meet in the middle, or have 24 LEDs on each side and have opposing pairs connected in series. I don't know how big your model is, seems like a really nice solution would be a PCB milled the internal shape of your phaser window area, and side-looking surface mount LEDs.
Looks like each side has to travel about 12". I was thinking that I could have matching pairs like you mentioned, then would only have to create the effect for one side and mirror it on the other. My original intention was to cast the existing phaser strip in clear resin, then have the LEDs on the inside that illuminate it indirectly so you can't tell it's simply a strip of leds. I want it to be one smooth animation all the way to the front.
Lots of work to cast and then replace the opaque plastic that's there, but worth it I think. I'll check out the chip you mention and see what it offers.
Thanks for everyone's ideas. It's great to be part of this community!
Hello
TLC5940's are indeed nice when you want to play with LEDs, and i enjoy fading 16 LEDs individually with it, but what if i need atmega-like PWM (constant current source) ?
My project needs a LOT of analog outputs, 48 actually. I want to control colors on 16 VGA screens, and it turns out that the hardest part is not syncronization : it's sending 3 analog voltages per screen, varying between 0.3 and 1v.
I'm trying to convert my constant-current sink (TLC) to a constant-current source with a homemade vactrol and a voltage divider, then i plan to LP-filter the signal, and finally buffer it (LM358).
Or, given that each color has its own ground, can i just do as if my screen was a giant LED ?
The TLC 5940 is a constant current sink device : each LED you plug has its own +5 and its ground plugged in the TLC. I was just wondering if I could smooth the signal by putting a low-pass filter between the +5 and the LED, in order to get 16 real analog outputs.
You could use a resistor as a load on the TLC and use that to switch a transistor or a FET and then filter that signal but it's a bit messy.
If you want true analogue outputs from a real D/A converter then you would be better off using an I2C D/A, I have seen ones with four in a package. They even did ones with 6 in a package but I haven't seen them for about 20 years now.
Thanks for the tip. I think I'll go with my homemade-vactrol-to-active-2nd-order-filter solution (that's 48 vactrols & 24 LM358 ;D). I'm not friendly enough with transistors :-[
I am currently (no pun intended) working on trying to convert "current sink PWM" to analog voltage. Your "vactrol-to-active-2nd-order-filter" might be the solution.
If you wouldn't mind sharing the filter design you end up with, I'd appreciate it.
Never heard of a vactrol so just looked it up. It appearers to be a simple opto isolator using just an LDR and a diode. Is that what you mean? If so it's not doing much for you.
Indecently back in 1967 I "invented" the opto isolator (it was my idea and no one had done it at the time) only LEDs hadn't been invented as a commercial product and I used a cadmium sulphide LDR and a flash light bulb in a cardboard tube. It worked as well although it was very none liner.
More of a question. Wouldn't it be that a "vactrol" give you variable resistance as opposed to the change in current you get from an opto isolator? Sort of a poor man's digital pot that can handle higher currents?
Why am I not surprised you had a hand in inventing the opto isolator?
The problem with the LDR is that it's response is very slow. For a low pass filter this is exactly what you want although you have no control over the time constant as you would if you did it "properly". As I said the problem is the none linearity of the system, so yes it would work but it would be a bit like trying to control something with a log pot instead of a liner one.
The thing about when I was young is that you could invent something but not get the information out to tell everybody or in fact anybody. I also independently invented the watch dog timer for microprocessors in 1974 but I didn't call it that and never published the design. That's why I am still an engineer and not rich, still it keeps me occupied.
I'm building my own vactrols. The real ones are too expensive. So i took yellow LDRs and LDRs, made them look in the eyes, scotch-taped this nice pair and voilà , a vactrol was born.
Actually, its pretty linear when you get beyond a certain amount of current. My LDRs have a close-to-linear response from 4.7kOhm to close to 0 Ohms, which is good if I use another 4.7kOhm resistor to build a voltage divider. As the TLC has a grayscale of 4096 levels, I can spend some to get in the linear zone.
I will be happy if my last issue is the non-linearity of my LDRs : that's a problem I can cope with (firmware-based regression). ;D
Sure, I'll release my work (hope it will work : ). You can find some of it in the hardware section, I adapted some code to syncronize a vga screen.