0-10v dimmer as input

I have a 4 port dimmer https://nl.aliexpress.com/item/33041958658.html

There are 2 lights already connected, the remaining 2 lights are however PWM driven (digital RGBWW ledstring)

How can I read the 0-10v with an Arduino, am guessing that connecting to an ADC pin would be a start, although i need a voltage divider to reduce the signal right ? I will use the input that is manualy given to control the "warm white" setting, colour will be done seperately via a different part of the code.

Hi, Arduino's analog pins can take from 0-5V, so you should use a voltage divider as you said, be sure that the voltage never exceeds 10V, because that will exceeds 5V at the voltage divider also, which could damage the Arduino analog pins. You can find some helpful information here: Voltage Divider Calculator. The output from the voltage divider should be connected to some of the analog pins of the Arduino and using analogRead() you should be able to read the values.

1 Like

You'll need to know whether your Arduino is 5V or 3.3V, as that tells you what your resistor ratio will have to be.

Thx for your reply

Are you saying that its better to estimate 10v to be 12v or so, just to be safe ?

Just to be safe, measure the actual voltage limits and then you will know.

Once you have the A/D working properly you can use the map function to calculate your PWM value. The A/D needs a maximum of 10K as its input impedance, lower is better.

I would call that a maximum impedance of 10k :slight_smile: , lower is better.
Leo..

1 Like

You dont say WHICH Arduino (they aren't all the same).

HOWEVER

the dimmer only supports 256 levels - so you dont need to use the full range of the ADC. I'd suggest a divider ratio of 4:1 - so a 10V input would give 2.5V to the ADC - giving good resolution, but a degree of protection from over-voltage.

Only if measuring signals that change rapidly. For this application I'd suggest a higher input resistance, and perhaps a small capacitor from analog input to ground, to reduce pick-up.

So maybe 100k:33k//0.22uF

The ADC is optimized for analog signals with an output impedance of approximately 10k or less. If such a source is used, the sampling time will be negligible. If a source with higher impedance is used, the sampling time will depend on how long time the source needs to charge the S/H capacitor, with can vary widely. The user is recommended to only use low impedance sources with slowly varying signals, since this minimizes the required charge transfer to the S/H capacitor.
http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7810-Automotive-Microcontrollers-ATmega328P_Datasheet.pdf

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