-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add led brightness linearization
- Loading branch information
Showing
2 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Linearization | ||
|
||
## Why do we need an linearization | ||
|
||
EC133 is a PWM chopper. Brightness of leds is somewhat proportional to the logarythm of Voltage. | ||
Without linearization it would be more difficult to obtain desired brightness. | ||
|
||
You can use gnuplot to help yours self with parameters: | ||
|
||
``` | ||
set term x11 enhanced font "terminal-14" | ||
set xrange [0:255] | ||
set yrange [0:255] | ||
range=255 | ||
tau=0.5; | ||
offset=0.05 | ||
f(x) = range*(1-offset)*exp(-(1-(x/range))/(0.3)) + range*offset | ||
plot f(x) with lines | ||
tau=0.1 | ||
f(x) = range*(1-offset)*exp(-(1-(x/range))/tau) + range*offset ; replot | ||
``` |