[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]
Re: Controlling Holiday Lights
On Thu, 2 Nov 2006 11:47:45 -0700, sylvan butler
<ZsdbUse1+noZs_0611@xxxxxxxxxxxxxxxxxxxxx> wrote in message
<slrnekkfah.8g4.ZsdbUse1+noZs_0611@xxxxxxxxxxxxxxx>:
>On 2 Nov 2006 03:43:55 GMT, Dan Lanciani <ddl@danlan.*com> wrote:
>> the specific triac trigger waveform you use for 50% power. Could you
>> describe it in terms of frequency and duty cycle or such?
>
>It isn't a simple wave. :)
>
>I have not measured or attempted to calculate 50% power out of the
>triac. I don't have the scope out right now, so I just played a bit
>with software...
>
>Full speed alternating on/off (a 1:1 duty cycle, which produces a fairly
>nice square wave on the gate) has no obvious effect on intensity. A
>full speed 1:4 (on:off) duty cycle noticably dims the light, maybe a 10%
>power reduction. At full speed with a simple wave (e.g. all on then all
>off for regular periods) I cannot get down to a 50% power output without
>flicker -- the off times are too long.
>
>(This system was a C633 the last time I had the scope on the output, and
>at that time full speed 1:1 produced a square wave of about 150khz,
>IIRC. Now it is PIII 750, but I expect that bus waits will keep the
>output about the same since a k6-2/400 was also about the same.)
>
>Crude rate limiting to approximately two samples per tick (reprogrammed
>the timer to 1000 ticks per second) I can get lower power but I start
>getting flicker somewhere around the 1:4 on:off ratio. I expect
>interrupt overhead is becoming significant and my delay loop between my
>two samples per tick is very crude.
>
>So now I go to a sample table where I can generate more complex waves...
>
>Full speed using a 200 sample table I get an estimated 50% power (light
>very orange, but still bright enough to fill the globe) when I do a
>pattern with a duty cycle of about 1:2 (on:off) somewhat randomly
>distributed within the table (it was actually 64 on, 136 off). Using
>the same table at 2 samples per tick (default frequency 18.x/sec)
>results in very dim light, sometimes a bit of flicker.
>
>Using a PIC it might be easier to sync with the zero-crossing and get
>some determinism. I've googled a bit, and syncing a PIC seems pretty
>simple. But I don't want to input that back to my PC parallel port.
>Plus the real-time 120x/second is a bother. I maybe should have saved
>that data table... :( Just keyed it all in directly to memory with
>debug.)
>
>sdb
sylvan,
Thank you for taking the time to work through this on the bench. Usenet
participants and other readers will be well served by your recognition that
synchronization to the AC waveform is needed to usefully dim TRIACs.
You really shouldn't have more of a problem safely bringing the zero crossing
to the PC through a printer port input than safely controlling the TRIACS
through an output. You can use a low-voltage ( eg 120VAC:6VAC) transformer for
isolation and one of the many schematics available on the web to get a snappy
TTL signal. The isolation transformer would make the zero crossing signal even
safer than the outputs to the TRIACS especially if you aren't already using
(you should ;-) opto-isolators on the printer port outputs. As you know, the
printer port has inputs as well as outputs, so adding zero-crossing would be
very little work.
You can then use the table at
http://www.econtrol.org/dimmers/TRIACDimmerCalcs_MFHult.pdf to calculate the
needed deterministic delays. You may find that it helps to avoid/eliminate
disable disk accesses. With DOS systems this is simple enough to do by booting
from a floppy and making sure the transient part of the OS stays in memory so
that disk reads are not needed. Use RAM-disk for large tables/data if needed.
I've lost track of what tricks are now available to get hardware interrupts
from today's equivalents of the PC/AT's 8259 and 8254 but note that the 18.2
msec Timer interrupt ain't good enough ;-)
There are a variety of links to microcontroller-based dimmers on my web site.
Also, I have a couple of Artistic License AL4016 IC's (8051-based, not PIC,
DMX dimmers) that each dim 16 TRIACs that I'd give you for a quarter on the
dollar or so. See for complete info.
http://www.artisticlicence.com/cat11_1.htm . USB->DMX converters can be had
for $25 or so on eBay. The TRIACs and or SSRs you already have should work
fine. Email me offline if that is of interest.
HTH ... Marc
Marc_F_Hult
www.ECOntrol.org
comp.home.automation Main Index |
comp.home.automation Thread Index |
comp.home.automation Home |
Archives Home