Looking for a digital potentiometer for 0-10V LED dimming digital knob

I need help with finding a digital potentiometer (digipot) with seemingly difficult requirements. A lot written for completion's sake, but TLDR is first two sections "what I need" and "questions"

What I need
Variable resistance from ~5kΩ to ~50kΩ on 0.2mA up to 10V, controlled by Arduino R4 Wifi 5V, with hundreds of steps to be visually unnoticeable.

As a digipot: 50kΩ, 256+ steps (1024 would be nice), VCC 5v digital operating voltage, but with V+ 10V (0.2mA) analog through the wiper resistors. That V+ (10V) larger than VCC (5V) seems to be hard to find. Essentially I want DS3502 but 50kΩ 256+ steps not 10kΩ 128 steps.

Questions
Is there a digipot that meets my specifications? How do I find it? Is there a consensus preferred site (or sites) for finding or buying electronic components?

Or do I have to use my ugly fallback of four or five DS3502 in series?


You can probably skip reading all the rest, it's included for completeness but it's a lot.




Personal Background
Software engineer. This is my first arduino project. I don't know electronics very well.

Project Background
I'm replacing a 0-10V LED dimmer knob with an arduino. This knob is just a variable resistor.

Prototype dimming works with the DS3502, except 10kΩ is too small of a range.

0-10V LED Dimming Driver's (Controller's?) (measured) specifications: The driver sends 0.2mA under whatever voltage is necessary up to ~10V. Note between ~2V and ~3.5V it may be on with low light or off entirely, depending on path.

Resistance Voltage Current Light
~10kΩ ~2V 0.2mA
turns off
~17kΩ ~3.5V 0.2mA turns on
~55kΩ ~10.2V ~0.1mA max brightness

Difficulties
The DS3502 has a seemingly necessary and rare feature: the wiper resistor's max voltage, max VH VW VL, are relative to V+ (up to 17V) (V+ is VH by default) not VCC. This allows my 5V arduino R4 WIFI to control the wiper with VCC 5V (and I2C), while the RH and RW-RL variable resistance has 10V (0.2mA) running through it from the dimmer driver. The only problem is DS3502 is 10kΩ not 50kΩ (and only 128 steps).

I looked at a couple dozen others, but other digital potentiometers specify max VH VW VL relative to VCC, so 10V > 5V would violate the maximum voltage.

Possible Solutions

  1. Find a digipot with VCC 5V, V+ ~10V, 50kΩ, 256+ wiper positions
  • Problem: I don't know how to find this, analog.com's digipot table has voltages but they're for VCC/VDD. I don't know how to search for V+ existence let alone >10V. I also don't know if analog.com is the best site for finding (or buying) parts like this.
  1. Use multiple DS3502 in series
  • Problem: a bit pricey to buy 3-4 more
  • Problem: only 2 address bits, so 40kΩ max unless I want to mess with creating a 2nd I2C (through analog ports?), might just live with curtailing the range a bit. This works, but is very ugly.
  • Positive: 128*4 gives plenty of steps...
  1. Something else entirely? Am I missing something obvious?

Questions Expanded and Reiterated
Is there anything obvious I'm missing? Maybe I'm misunderstanding the maximum voltage rules for other digipots? Maybe there's some non-digipot solution?

Is there a digipot that meets my specifications? How do I find it? Is there a consensus preferred site (or sites) for finding or buying electronic components?

Or do I have to use my ugly fallback of four or five DS3502 in series?

AD5280? 10-15V supply, 50K, 256 steps, I2C.

1 Like

Do you have a link to the dimmer specs?

A lot of these 0-10V dimmers can use 10V PWM which is pretty easy to generate with a simple transistor circuit, especially if the 10V is supplied by the dimmer (which is is if you only need a pot).

Here's a circuit you can try:
PWM Driver

Almost any NPN transistor will work with this low-voltage, low-current, circuit. The Arduino, this circuit, and the dimmer should all share a common ground.

2 Likes

My understanding is that VDD sets the maximum (see page 5 of 28). But VDD comes from my arduino I2C as 5V, and then VA at 10V would exceed VDD's 5V and be above the "absolute maximum rating" because VA/VB are defined relative to VDD. If the arduino could supply 10.3+V then it would be fine but it cannot.

Perhaps I could wire it so that the LED's DIM+ supplies both the I2C voltage and VA (while the arduino does SCA, SDA, and GND?), but that seems weird and wrong to me, especially because DIM+ is a constant 0.2mA current with a variable voltage, and it seems like I2C would want a constant voltage.

PWM should be possible according to user manual.

Sadly I don't have specs at all, just my personal multimeter testing, the amazon product page ECCFUTL 300W Dimmable Outdoor LED Flood Light, and a small user manual that I don't think is available online. I'll type the only relevant blurb:

From User Manual

  1. This product has dimming and non-dimming function, which differs in installation ways.
  2. 3 dimming functions are available in this shoebox light:
    (1). Constant current can be achieved by 0-10VDC dimming.
    (2). PWM signal dimming.
    (3). Variation of resistance unit dimming(Please choose the appropriate dimming way according to your needs. You can also choose not to use this function).
  3. Choose the wire connection ways, dimming ways and installation ways according to your needs and the led fixture purchased

It also has a "wiring diagram" that tells me purple is DIM+ and pink is DIM- (and power wire colors too, though that's a different cable entirely).

They do share a common ground in the sense that both arduino and LED fixture plug into the same surge protector (with modules using arduino grnd pins), which I believe should be good enough. Although I do plug it in via USB to my laptop for serial access sometimes, that might be a problem.

I'll have to do reading on PWM and NPN, but it certainly seems more promising than several DS3502 in series.

Vlogic is 5V. Vdd, which sets the upper limit of the wiper output, can go up to 15V.

1 Like

Don't over-complicate things with digital pots.
It seems the light uses a DIM system the same as common Meanwell LED drivers.
Use the circuit from post#3, but ignore the ground symbol.
The transistor is connected to the two wires of DIM+ and DIM- (polarity matters).

For enhanced safety, when used outdoors, you can use an opto coupler instead.
Connect the opto transistor the same as the transistor in post#3.
Drive the opto LED with a 470 ohm CL resistor.

I think the R4 has 12-bit analogWrite...
Leo..

1 Like

I have a couple new questions due to new behavior, but first...

Thank you van_der_decken. You found exactly what I asked for, and with this correction I can now see multiple options. Not many, but still a few, and if I'm feeling excessive there's even one with 1024 steps (AD5293, though it's SPI). Thank you for your help.

As for what I'll ultimately go with, I'm going to be spending some days researching as I hadn't considered PWM and other things in this thread.

Concerning New Behavior
The light has started doing concerning things at lower dimmer voltages. It's not a constant flickering so much as inconsistent brightness flashes, think flashes of lightning in a thunderstorm (inconsistent timing and brightness) rather than the consistent even flickering of a fluorescent bulb.

Descibed via descending voltage:

Voltage Resistance Description
3.39V 16.2kΩ new minimum to turn on
~3.2V ~15.4kΩ old minimum to turn on
2.72V 13.0kΩ bright flashes begin once every 5+ seconds
2.68V 12.8kΩ bright flashes every few seconds
2.60V 12.5kΩ flashes several times a second, some at full brightness
Note 2.6V 12.5kΩ is current minimum, I could change things to check lower but I doubt there's value in that.

New Questions
Is this a bad light? A dimmer breaking down? Do I need to return or RMA? Would PWM fix or otherwise avoid this problem? Am I asking too much to want low level dimming like this? Do I just need to avoid the low range entirely?

What is the output impedance of your voltage source.
Leo..

I'm not entirely sure I understand the question, but wikipedia says resistance at half the open circuit voltage, so 25.1kΩ?

Voltage Resistance Description
~0V ~0Ω short with a wire between DIM+ and DIM-
0.204V ~1kΩ sanity checking
5.36V 25.1kΩ 2*10kΩ resistors + DS3502 at 94 (DIM+ to RH, RW-RL to 10kΩ to 10kΩ to DIM-)
10.73V ∞ Ω open circuit

I also have this old testing table:

Voltage Resistance
2.04V 9.92kΩ
4.12V 20.0kΩ
6.17V 30.0kΩ
8.09V 39.9kΩ
9.24V 49.9kΩ

An ideal voltage source (0-10volt) has zero ohms impedance over it's whole range.
Just wondering if the flickering/flashes are related to the digital pot resistance values.
PWM is (almost) zero ohms and infinite (no resistance variation), like a switch.
Maybe you should try a capacitor across the DIM pins, and see if that kills the flickering.

Still waiting for the results of that much more simple PWM test.
Leo..

1 Like

It's concerning behavior because it's new and getting worse.

Hardware came in. I went with PC817 optocoupler. Results are... mixed.

Problem 1: at default 490hz, get very visible flickering (except at full off and full on). If I go to 1khz then I can no longer visibly see flickering (though I worry it's still there...).

Problem 2: The higher the PWM frequency the lower the brightness at a given duty cycle.

PC817 PWM Testing With Dimmer: Set Up
I don't know how to draw circuit diagrams. Can reference this post, except arduino r4 pin d3, 470ohm, and probably not a meanwell dimmer. Or in words: pin d3 to 470ohm to anode (1), arduino GND to cathode (2) , DIM+ to collector (4), DIM- to emitter (3).

// Very quick PWM test code
// pwm.h can be used with arduino R4, makes frequency changes easier
// though arbitrary values are approximated, not precise.
#include "pwm.h"
#define SEND_PIN 3
PwmOut pwm(SEND_PIN);

void setup() {
  Serial.begin(115200);
  while (!Serial) { delay(1); }

  Serial.println("Serial initialized");

  //period 1000us = 1000hz; pulse 0 us = 0%
  // ~490hz, confirmed visible flickering, brightness: 50% 790lux, 0% 2000lux
  // pwm.begin(2041,0.0);
  // ~1khz no *visible* flickering  50%  too dim to measure, 30% to get 790lux
  pwm.begin(1000,0.0);
  // ~2khz state dependency for 50%, full off->50% off, full on ->50% very dim
  // pwm.begin(500,0.0);
  // ~20khz 50% is always off regardless of path
  // pwm.begin(50,0.0);
  // note: "lux" measured by phone camera app from consistent position
  // not accurate, but should be good enough for relative measurements.
}

void loop() {
  Serial.println("Set pwm to 100%");
  pwm.pulse_perc(100.0);
  delay(5000);
  
  Serial.println("Set pwm to 50%");
  pwm.pulse_perc(50.0);
  delay(5000);
  
  Serial.println("Set pwm to 0%");
  pwm.pulse_perc(0.0);
  delay(5000);
  
  Serial.println("Set pwm to 50%");
  pwm.pulse_perc(50.0);
  delay(5000);
}

Questions
Why does higher frequency result in less brightness at the same duty cycle? I don't think that's how PWM should work.

Why is there visible flickering at 490hz? That should be beyond visible range.

Two major concerns (1) 1khz might still result in headaches and (2) worried the dimmer is broken when combined with the weird and worsening lightning flashes when using resistive dimming. Only about ~18 days left for return if it is indeed a bad dimmer.

Have you already tested the light with a variable voltage from a lab supply.
I suppose you can also use various AA batteries for that.
The light should be stable with a fixed voltage with low impedance.

490Hz PWM should not visible flicker, unless you look at moving objects (waving hand, running water etc.) The opto and/or light might not like (can't handle) higher PWM frequencies.
Leo..

1 Like

I think this project is pretty much done. PWM with PC817 works well enough.

I lost the very low end of the dimming as the PWM signal cuts off well above 1% of max, whereas resistive cuts off around (or below) 1% of max. This is apparently not unusual (e.g., looking at example Sosen led driver specs).

I could switch back to a digipot now that I know options exist and regain that low end, but I've decided against it. I've had multiple sources note that the 0-1V part of the 0-10V dimming is hard on the system in some unspecified way, and it's recommended to primarily use 0-10V as 1-10V. On top of that I had the weird and worsening brightness lightning flashing with low end DS3502 dimming and another digipot might reopen that problem. In addition, I had a realization that another project could solve this issue (and more). Ultimately, I've decided to just stick with the current PWM solution.

I'm going to start that new project to cover the very dim use case and more, but I think any details and questions should go in a separate thread; even if the new project is also about lighting and dimming, it's a fundamentally different hardware situation.

I don't have a lab supply, and have no idea how to do the battery thing. I'm going to avoid the issue by sticking with PWM.

I was unclear but your comment helped clarify an important distinction for me, so: thank you. This isn't full on and full off flickering, no stroboscopic effect here. This is flickering between two distinct brightness settings. I think it's some kind of aliasing. I tested 500hz and 250hz, and visually it looks like brightness difference increased but the ~10 times a second flickering remained constant.

I later realized that I could probably record a video and count frames to confirm. I could even get an idea of sampling rate and do some math to figure out what the correct minimum PWM frequency is to avoid the effect. But I had chosen 1khz for various reasons, and now I've been headache free for days so my concern has reduced. Also this Sosen SS-22PA driver specifies 1khz min. I am guessing that kind of spec is common and that my LED fixture has a similar minimum.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.