0-10V controlled via I2C - Page 1
Forum section: electronics / beginners

author: permal
author_rank: Regular Contributor
timestamp: July 20, 2018, 09:23:16 pm
content: Hi,My kitchen LED lights are currently drivenby one of these DC Maxi Jolly, (English text starts at page 5). The current controller is in turn controlled via RF signal and very unreliable. To remedy that I want to build a new controller.Output: 0-10V, 35mAInterface: I2C - I'm going to use an ESP32 as the MCU.Powered by a single 12V supply (the AUX power from the Dolly driver)What I need guidance on is with the 0-10V output circuitry:- Would aDAC101C085 (0-5V DAC, I2C)with a single-supply OpAmp (LM2904?) (non-inverting with a gain of 2; negative voltages not needed) attached to the output do the trick?- How do I design the output to deliver, say 100mA to have some margin on the required 35mA?Thanks in advance!

author: frozenfrogz
author_rank: Frequent Contributor
timestamp: July 20, 2018, 11:35:41 pm
content: How about using a DAC likethis oneand an op-amp with x2 gain setting?

author: permal
author_rank: Regular Contributor
timestamp: July 21, 2018, 06:44:48 am
content: Quote from: frozenfrogz on July 20, 2018, 11:35:41 pmYou're suggesting the same kind of setup as I did; so my thinking wasn't all wrong then. The MCP4725 and DAC101C085 seems pretty equal except that the former one is half the price.So what about the sourcing ability of this circuit? For example,LM2904can only source 30mA (Vcc at 15V), how do I increase that to the required >35mA? Are there any Single-supply OpAmps that are capable of sourcing ~100mA or more?

author: HB9EVI
author_rank: Frequent Contributor
timestamp: July 21, 2018, 07:54:20 am
content: Controlling led brightness over the voltage is nonsense; what you need is a voltage controlled current source; so use a fet with a current sense resistor to build a variable current source

author: permal
author_rank: Regular Contributor
timestamp: July 21, 2018, 08:12:30 am
content: Quote from: HB9EVI on July 21, 2018, 07:54:20 amI already have the LED driver (linked above). It uses a0-10V control input signalto determine what current it should drive the LEDs with. I don't see how a variable current source would help in controlling it?

author: tooki
author_rank: Super Contributor
timestamp: July 21, 2018, 09:08:19 am
content: I think they misunderstood, and thought the 0-10V was to drive the LEDs directly. Must not be familiar with the 0-10V control standard.

author: frozenfrogz
author_rank: Frequent Contributor
timestamp: July 21, 2018, 10:01:49 am
content: Quote from: permal on July 21, 2018, 06:44:48 amSorry, my bad. I read your post, then had it sit in my mind for some time and later hit reply without reading the post again :/One other thing that I thought about right now: A lot of the 0-10V signal inputs on dimmer circuits are built as constant current sources, so you can usually just connect a potentiometer and you’re good to go. Maybe try that as you can spare all the expense for a DAC + op-amp (feels like a bit of over-engineering - right?).If it works, you can simply use a digital potentiometer with I2C.Edit: The datasheet (p5 bottom left column) you posted confirms this, you simply need a 100kOhm pot.Hereis a selection of digital pots.

author: Zero999
author_rank: Super Contributor
timestamp: July 21, 2018, 10:05:15 am
content: There's no way you need 35mA for that. The LM358/LM2904 will be fine on its own. If you really want more current, two channels can be connected in parallel, using current sharing resistors.See the application note linked below:https://www.intersil.com/content/dam/Intersil/documents/an11/an1111.pdf

author: permal
author_rank: Regular Contributor
timestamp: July 21, 2018, 12:00:04 pm
content: Quote from: Hero999 on July 21, 2018, 10:05:15 amThe datasheet states "Light regulation 0-100% by means of PUSH function, 1...10V interface (I=0.35mA) or 100 Kohm potentiometer.", that's where I got the number from. Thanks for linking the AN, I learned something new.Quote from: frozenfrogz on July 21, 2018, 10:01:49 amIt does mention 100k pot - but not where to actually connect it, or have I missed it? If you're right it just goes on the input. I suppose I can simply give it a try.This'd be a much simpler solution if it works.

author: Kleinstein
author_rank: Super Contributor
timestamp: July 21, 2018, 01:31:13 pm
content: When using a digital pot, keep in mind the voltage at the pot must be inside the supply of the chip. So it would need a digital pot for at least 10 V - the normal ones are 5.x V max.

author: permal
author_rank: Regular Contributor
timestamp: July 21, 2018, 01:52:24 pm
content: Quote from: Kleinstein on July 21, 2018, 01:31:13 pmYeah, I noticed that when reading a datasheet for one of the available ones.I connected a regular 100k pot, the result wasn't what I expected. Yes, the lights can be dimmed, but it all happens within the lower ~20% of the scale. Why specify 100k when the entire dimming happens within the lower ~20k?

author: Zero999
author_rank: Super Contributor
timestamp: July 23, 2018, 04:39:54 pm
content: Quote from: permal on July 21, 2018, 12:00:04 pmYou got the decimal point wrong. 35mA, is 100 times 0.35mA.

author: HB9EVI
author_rank: Frequent Contributor
timestamp: July 23, 2018, 04:42:40 pm
content: Quote from: permal on July 21, 2018, 01:52:24 pmcould have caught a logarithmic pot perhaps?

author: james_s
author_rank: Super Contributor
timestamp: July 23, 2018, 05:09:53 pm
content: A DAC seems a bit extreme for this application. How about a PWM output from a microcontroller with a RC low pass filter? To get the voltage up to 10V you could either use an op-amp to amplify the resulting DC level, or buffer the PWM signal prior to the low pass filter.