Page 1 of 1

[372] Dimmer with 1% resolution

Posted: Saturday 03 January 2015 1:25
by Quindor
The topic title says it all I guess.

I'm building my own LED dimmer using LUA scripts (You can find all the information in this topic: http://www.domoticz.com/forum/viewtopic.php?f=23&t=4723). Currently the best resolution that is available is using a LightwaveRF dimmer which is able to do 3% steps. This translates in 32 values available maximum.

It would be awesome if we could change it to having 1% steps available. Although using the slider interface this would be a bit hard, using scene's it would be very nice!

Re: [372] Dimmer with 1% resolution

Posted: Saturday 03 January 2015 13:32
by Ullie76
+1 for that!

Re: [372] Dimmer with 1% resolution

Posted: Saturday 03 January 2015 13:37
by ThinkPad
Why would you need that? Can you see the difference between 50% brightness and 51% brightness with the naked eye ;) ?
I am not stopping you from asking to implement it, but in a practical way i don't see the benefit of it.

Re: [372] Dimmer with 1% resolution

Posted: Saturday 03 January 2015 17:05
by Quindor
ThinkPad wrote:Why would you need that? Can you see the difference between 50% brightness and 51% brightness with the naked eye ;) ?
I am not stopping you from asking to implement it, but in a practical way i don't see the benefit of it.
My dimmer implementation has 1024 values (0 to 1023), the way light and LED's work is that steps in the lower region are much more visible then steps in the higher region. So going from 10 to 50 is VERY visible, but going from 750 to 800, while rising the same amount of light production, it isn't as visible directly.

Currently if you look at what I get from Domoticz, value 0=0, value 1=33 and value 2=66. That is a huge difference! I would just like some more control over it, with a scale of 100 it would also map nicely to 1=10, 2=20, 3=30, etc.. Having a maximum of 1000 is fine, I never drive my LED strips with max output anyway because the efficiency curve goes down quite a lot above 85% to 90% of max output.

In the future I'm thinking of implementing some sort of Logarithmic scale to even this out a bit and to make the values correspond better to the actual perceived light levels then the PWM level, but that's something for in the future.

Re: [372] Dimmer with 1% resolution

Posted: Sunday 16 August 2015 10:35
by Sattrickske
I have about the same request, but I would rather make the sliders customisable in order to keep everybody happy. Instead of having a fixed range 0-32, I would add 2 extra fields in the Edit section of the switch (when type dimmer is chosen). With these fields you could then set the min-value and the max-value of the slider. When no values are set, you default to 0 and 32.

It's true that for higher values, this setting doesn't make difference on the visual aspect of the lights, but in the low range (<10%) it makes a huge difference.

This would be a nice addition for my project where I use a dimmer to light the individual steps of stairs with RGB strips. During the night I keep my strips at 0.5% when they are turned off, power consumption is extremely low and this adds some extra safety to the stairs.

Re: [372] Dimmer with 1% resolution

Posted: Saturday 22 August 2015 20:01
by dacora
To get something bit more usefull it might be possible to have a 32 entry table and then do a lookup.
As the LED is not linear anyway, you could have a finer resolution in the lower values.
Something like this:

http://electromotiveforces.blogspot.dk/ ... nging.html

Re: [372] Dimmer with 1% resolution

Posted: Saturday 05 September 2015 11:37
by dacora
I've made a logarithmic scaled LUA dimmer script, for anyone that might be interested.
Its hosted here on GitHub

Re: [372] Dimmer with 1% resolution

Posted: Wednesday 05 October 2016 20:37
by madrian
dacora wrote:I've made a logarithmic scaled LUA dimmer script, for anyone that might be interested.
Its hosted here on GitHub
Genius, you get more precise control with dimmer. I just built Quindorians PWM control. He is using svalue*33 formula.

Comparing your logarithmic vs *33 formula:

Code: Select all

1*33 = 33		            8
2*33 = 66		            8
3*33 = 99		            9
4*33 = 132		          16
5*33 = 165	 	          25
6*33 = 198		          36
7*33 = 231		          49
8*33 = 264		          64
9*33 = 297		          81
10*33 = 330		100
11*33 = 363		121
12*33 = 396		144
13*33 = 429		169
14*33 = 462		196
15*33 = 495		225
16*33 = 528		256
17*33 = 561		289
18*33 = 594		324
19*33 = 627		361
20*33 = 660		400
21*33 = 693		441
22*33 = 726		484
23*33 = 759		529
24*33 = 792		576
25*33 = 825		625
26*33 = 858		676
27*33 = 891		729
28*33 = 924		841
29*33 = 957		900
30*33 = 990		961
31*33 = 1023	       1023
BTW: It is now available a dummy dimmer in domoticz with 1% step, and you can use a formula like svalue*10 - but I still prefer the logarithmic method, it allows much finer control.