arduino control of digital potentiometer
The POT is here.
The lights are REBELS @ 700mA.
THe POT will be run in "non-parasitic" layout.
15
comments
|
Add Comment
|
I see what your underlying intent here is, and while it's a laudable one (the reduction of lots and lots of wiring) I think you need to have firm understanding
of some fundamentals in electronics.
1.) Too much current can and will kill your components.
2.) Too much voltage can and will kill your components.
3.) Resistors are your friends, learn the Ohms law triangle and become fluent
with finding values with it, using an ohm's law calculator (there are tons of apps for this purpose) will help you in this regard.
4.) Learn to use transistors and many of your hurdles will disappear, NPNs are your friends.
Now to answer your question:
Your LED's draw a TON of current, indeed they have to to this to attain the brightness you're probably going for, that's all well and good but know this....
Current = amps which in electronics is usually expressed in milliamps, 1000 miliamps == 1 AMP, for an electronic device not designed to handle that (cough, MOSFET, or heavy duty BJT, etc.. cough) 1 AMP means certain death for an IC.
Those digipots are designed and intended to control the behavior of OTHER ICS, and what that means is... They're designed to modulate a 555's output i.e. By swapping the digipot for 'R2' of a 555's typical setup for frequency generation OR the behavior of some other IC which uses variable resistance to change it's behavior.
OK? That means a digipot is a sensitive and 'fragile' device intended to control the behavior of other sensitive and 'fragile' devices.
You're trying to use a digipot (read it's practical meaning immediately above) to control a HIGH POWERED LED, and what that amounts to is trying to control the braking of a Chevy Suburban SUV by pressing your sneaker-clad foot onto the surface of it's spinning wheels... Very soon, your sneaker will be torn up and not long after that your foot will be injured beyond recovery....
In this analogy the digipot is your sneaker-clad foot...
See what I mean?
To control the LEDs using a 1 wire (which is really an implementation of something called 'I2C' pronouced " I Squared C " ) daisychain of digipots you'd have to wire up an additional component per LED, an NPN transistor aka a BJT type of transistor. MOSFETS would be overkill here, so just stick with an NPN transistor, you'll have to check the current rating of the NPNs you source, since your LEDs pull 700ma, you'll want to find an NPN BJT with at least 1 AMP current capacity from the emitter (negative voltage wire goes in) to the collector (negative voltage wire comes out and it's path through the BJT is altered in a controlled manner based on the stimulation or positive voltage at the 'base' using the digipot as a programmable resistor between +5v or VCC and the 'base' of the NPN BJT)
So you see, what you're trying to do is quite complex, simply as a design goal in and of itself...
You want to use an I2C daisychain of "n amount" of programmable devices to then alter the voltage on the bases of an equal "n amount" of NPN BJTs which will then and only then allow the emitter to collector current flow through their N terminals (Negative Positive Negative i.e. NPN).
So "FOR EACH LED" you will need:
1 Digipot or other i2C programmable IC which can control the base of an NPN BJT
(I bet you could find the appropriate PWM ics if you searched for "I2C compatible PWM ics")
1 NPN BJT transistor.
A few jumpers to hook up all of the short wiring you'll need to configure per LED...
So as you can see, PWM is not inherently hard or limited, it is the very high level of functioning that you want that is elevating the complexity of your project.
It sounds like a fun little excercise to embark upon, and I use the term 'embark' for good reason, this sounds like a 3 week project if taken up as a part-time project.
Good luck, and may the force be with you.
The Arduino itself will do the PWM, yes? (the REBEL light I see don't have built-in PWM.) What is the digital POT for? (That digital pot takes a digital input info to set the POT's output, not the other way around.)
If you're intending to use a POT as a control to set the PWM, then why not just read an analog POT with the Arduino's ADC?
But perhaps I misunderstand where you're going with this...
For LED brightness, PWM itself is preferable to using a POT. I'd say you're trying to achieve a single goal by trying two different solutions at once... (it's possible to mix the two methods, but it'll be no more effective, and more complex to boot.)
Westfw is the Arduino guy here, so I'll let him help you from here on...
"Rebel" LED modules, 12 total, 3.15V @ 700mA = 8.4 Amps = ~25 watts total.
A normal POT wattage rating is 1/4 to 1/2 watt. Only high-current "rheostats" can handle that type of wattage. The digital POT you reference has a very low voltage rating, it can't handle much current. The datasheet doesn't show wattage, but you can infer it by the max voltage (11V) and the minimum step (100K / 256 = ~380 ohms per step.) ... it works out to about 1/3 watt rating.
Hence my comment:
Unless there are some other components used, in the original article...
Like transistors (one or several), together with the POT to control current. But PWM outputs can control transistors just as handily.
And if one POT can be used to control a high-wattage transistor for a string of LED modules, one PWM output can also control the transistor...
But you still can't reliably control a 2+ watt module with a 1/3 watt POT. You'll probably need a couple transistors per LED module. Or a voltage regulator and a transistor, per module.
Here's a nice instructable; it has some "constant current" LED drivers. You'll have to modify them to be variable current (they are controlled by resistor values.)
But if you don't grok the simpler electronic math ( Ohm's Law isn't that complex or bizarre) , then it won't be trivial to redesign the driver.
![]() |















Vancouver Mini Maker Faire 2012
Rebuilding NordicTrack ski machine drive rollers
Looking for New Zealand-based Instructables authors for conference on August 27 in Wellington
Call to makers - Brighton Mini Maker Faire
Milk Crates - not as green as you think
TEDxBaghdad - Iraq - violence, dust storms and open sourced manufacturing
UK Mini Maker Faire - The Derby Silk Mill - New Poster to Share!







