Searching \ for '[EE]: was PIC: Non linear PWM of LEDs' in subject line. ()
Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=pwm
Search entire site for: 'was PIC: Non linear PWM of LEDs'.

Exact match. Not showing close matches.
'[EE]: was PIC: Non linear PWM of LEDs'
2003\02\11@125248 by

>At 9:35 PM -0600 2/10/03, Josh Koffman wrote:
>>Second part is that the curve I'm looking for is not a straight
>>logarithmic curve. On a graph, it looks more like a stretched out "S".
>>The slope of the curve is more extreme in the center of the graph,
with
{Quote hidden}

I have been watching this thread carefully, perhaps to apply something useful to a PIC controlled light dimmer. I understand
that an exponential curve should appear smoother to the eye. I found the spreadsheet techniques quite enlightening.

This topic has been for DC control, I'm considering how phase
control of a TRIAC for AC control would complicate the issue.

If I want to control a triac for AC light bulb control, wouldn't I then need to devise a lookup table that takes into account the integral of a sine wave, with the end result (hopefully) resembling a Log curve to appear "smooth" to the human eye?

I've been consumed with this for 24 hours now, and I'll readily admit that the math is beyond my education. I have done a few hours of web research and asked a few engineering friends if they can help, too.

My goal at this point is a method for computing a table of values that would describe the delay time after each zero crossing to fire the triac, in hopes that the light output from the bulb would _appear_ to brighten at a steady rate.(Log?) In my case, for 60Hz power.

For those better educated than myself, (that should be all of you) please pardon my poor description of the problem. Given that yesterday,
I couldn't even define "integral of a sine", I'm struggling along the best I can.

Lyle Hazelwood

--
>>
If I want to control a triac for AC light bulb control, wouldn't
I then need to devise a lookup table that takes into account the
integral of a sine wave, with the end result (hopefully)
resembling a Log curve to appear "smooth" to the human eye?
<<

We had been talking about LEDs, not incandescent light bulbs.  Those are a
very differrent problem because the light output of an LED is linear with
current, but that is far from true about an incandescent bulb.  I should
be able to predict the response curve reasonably well from black body
radiation theory and knowing the "color temperature" at an operating
point.  However, it would probably be easier just to measure it.

I think most dimmers simply ignore the problem and advance the firing
angle linearly from the user input.

*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
Check the archives of Circuit Cellar Magazine.  There was an article

John Dammeyer

Wireless CAN with the CANRF module now available.
http://www.autoartisans.com/products
Automation Artisans Inc.
Ph. 1 250 544 4950

> {Original Message removed}

Olin Lathrop wrote:
> We had been talking about LEDs, not incandescent light bulbs.  Those are a
> very differrent problem because the light output of an LED is linear with
> current, but that is far from true about an incandescent bulb.  I should
> be able to predict the response curve reasonably well from black body
> radiation theory and knowing the "color temperature" at an operating
> point.  However, it would probably be easier just to measure it.

This I wasn't exactly clear on until now. Thanks Olin. I guess I can
abandon the S curve stuff I've been thinking about. I suppose that's
what comes when I'm basing much of my research on research I did for
incandescent dimming. I still don't have a method to accomplish the log
dimming of the LEDs yet, but it will come I hope :)

> I think most dimmers simply ignore the problem and advance the firing
> angle linearly from the user input.

I would guess that most home dimmers do this. Theatrical dimmers are a
different story. The curve is deliberately modified in most (half
decent) theatrical dimmers. The idea is to give the user more control
over the light at the top and bottom ends of the curve I believe. This
helps to eliminate the phenomenon where once you get to about 70% of
control value, there doesn't seem to be much percievable change until
100%.

Well, back to trying to understand Scott's latest posting :)

Josh
--
A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete
fools.

--
Josh,

I think you want to take a brief foray into psychophysics.
The function is not an s-curve.  Take a look at Steven's
Power Law.  These links should get you started:

FD99/Contribute/Stevensetal.pdf

nersp.nerdc.ufl.edu/~ufruss/Research%20Design/magnitu
de%20scaling.htm

Best regards,
Michael

--
>    I think most dimmers simply ignore the problem and advance the firing
>    angle linearly from the user input.

Hmm.  So to make a credible "dimming LED", do you really need to match
the eye's response curve to brightness, or do you need to match the
brain's "learned stimulous" for dimming lights, as tought by theatre
dimmers, sunsets, and dying fires?

BillW

--
Josh Koffman wrote:
> This I wasn't exactly clear on until now. Thanks Olin. I guess I can
> abandon the S curve stuff I've been thinking about. I suppose that's
> what comes when I'm basing much of my research on research I did for
> incandescent dimming. I still don't have a method to accomplish the
log
> dimming of the LEDs yet, but it will come I hope :)

Josh, the time you have spent discussing "curve" exceeded the
time you need to make simple experiment.
And you even didn't approach more ambiguous issues: "flashing
with pulsed vs varying current" from the point of eye perception,
etc. I suspect your "S curve" thoughts were in terms of constant
current, not pulsed PWM.

Get cheapest PIC with RS-232. Program it to control LED with
two 8-bit values: one 8-bit for on-time, another 8-bit for off-time;
no interrupts.
PC should load these values over MAX232.
Use VBA in Excel worksheet, don't use worksheet formulae.
Develop simple VBA code to fill two Excel columns (On,Off)
with values according to some curve. (Even Olin succeeded in
doing similar job :-)  - it was a joke :-).
For low brightness vary off-time (200-255) at fixed on-time (1).
For high brightness vary on-time (200-255) at fixed off-time (1).
So you'll get not less then 1/255 precision in all the range.
Develop VBA code to scan these columns and send both
values to PIC.
Experiment with different curves. Add salty jokes and send
the result to the List. :-)
(Kinda "The taste of honey" by Beatles must be named this
post :-)

Best wishes.
Mike.

--
Hello John Dammeyer,

> Check the archives of Circuit Cellar Magazine.  There was an article

Can you please tell me where to find it?

Thanks,

Brusque

--
William Chops Westfield wrote:
>
> >    I think most dimmers simply ignore the problem and advance the firing
> >    angle linearly from the user input.
>
> Hmm.  So to make a credible "dimming LED", do you really need to match
> the eye's response curve to brightness, or do you need to match the
> brain's "learned stimulous" for dimming lights, as tought by theatre
> dimmers, sunsets, and dying fires?

And the shape of the curve changes with ambient light,
in a well lit room you will get a vastly different
"eye/led" dimming curve compared to a darkened home
theater room etc.
-Roman

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
On Wed, 12 Feb 2003 23:04:59 +1100, Roman Black <fastvidEZY.NET.AU> wrote:
> And the shape of the curve changes with ambient light,
> in a well lit room you will get a vastly different
> "eye/led" dimming curve compared to a darkened home
> theater room etc.
-----------------------------------------
I think it would also change with the brightness of the surrounding LEDs -
(contrast sensitivity)?
--
John Snider

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
"c.i.tronicsterra.com.br" <c.i.tronicsTERRA.COM.BR> wrote:
> Hello John Dammeyer,
> > Check the archives of Circuit Cellar Magazine.  There was an article
> > about triac dimming theatre lights that should solve your problems.
>
> Can you please tell me where to find it?

Go to my index at http://www.dtweed.com/circuitcellar/

There's a full database of all articles (including abstracts) that you can

I'm going to add a search feature to the web page Real Soon Now (TM).

-- Dave Tweed

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics
On Tue, 11 Feb 2003, William Chops Westfield wrote:

*>>    I think most dimmers simply ignore the problem and advance the firing
*>>    angle linearly from the user input.
*>
*>Hmm.  So to make a credible "dimming LED", do you really need to match
*>the eye's response curve to brightness, or do you need to match the
*>brain's "learned stimulous" for dimming lights, as tought by theatre
*>dimmers, sunsets, and dying fires?

Dimming lights are engineered to cause a linear darkening sensation.
Sunsets are something between cosine law and exponential, so are natural
lighting events (like someone receding with a candle in the dark). The eye
is perfectly adapted to the environment, the dimmers aren't. If you copy a
natural effect (e.g. inverse square law) you will probably please the eye
of the onlooker.

Peter

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

More... (looser matching)
- Last day of these posts
- In 2003 , 2004 only
- Today
- New search...