arduino control of digital potentiometer

Is it possible to use my new Ardy board to control a 1-wire potentiometer that will, in turn, control the pwm output for a high-power LED?
The POT is here.
The lights are REBELS @ 700mA.
THe POT will be run in "non-parasitic" layout.

sort by: active | newest | oldest
1-10 of 15Next »
westfw8 years ago
The arduino should be able to talk to the one-wire interface and set the digital pots with no problems (I think there is even a one-wire library that already exists.) But I'm not clear how you plan to have the digital pots control the PWM'ed LEDs...
Tweac-it (author)  westfw8 years ago
Since I am new to all this, please excuse my ignorance. Can a POT itself control the brightness by controlling the wiper? Can LEDS only be dimmed via PWM?
node-0 Tweac-it5 years ago
Hi Tweac-it,

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.
This is three years old ! I don't think the author of the original question has been back since
Obviously this page will come up upon searches for 'digipot' and other related terms. In that case the reply is quite helpful to anonymous readers, and the points raised in the reply are solid ones at that.

Tweac-it (author) 8 years ago
OK...here is a ad-hoc drawing. Finally started to play with EAGLE...LOL R1 to R12 are resistors R13 to R24 are the digi pots (I forgot to include the communications lead for the 1-wire controller) I am not sure what else I missed...but it is just a beginners scheme :) Any suggestions?
scheme1.jpg
gmoon8 years ago
I'm a little fuzzy on your goals...

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...
Tweac-it (author)  gmoon8 years ago
I guess I may have been too vague in describing my needs/plans :) The idea of using a digi POT to control the PWM for an LED was from an article that I had read (can't remember which site). But maybe I am looking at all this wrong. ( I am new to the electronics hobby...this is my first project) So here is a better description of what I am trying to do: 1) Have a series of high power REBELS. (maybe 2 series) 2) Each individual LED fully controllable/fully independent 3) Hot-swappable (Is that possible?) 4) Expandable (add extra LEDs when needed. Is it possible? Or am I out to lunch?!
gmoon Tweac-it8 years ago
By it's nature, PWM control doesn't alter voltage--pulse width modulation works by varying the width of a pulse, rather than changing it's voltage--which a POT (as a voltage divider) would do...

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...
Tweac-it (author)  gmoon8 years ago
Thanks for the info gmoon. Are you saying that using the digi pot would be able to control the brightness of an LED?
1-10 of 15Next »