Thanks Andy
I would use a PC controlling a bunch of solid state relays. Years ago I
built custom factory automation equipment using DOS era PCs, and even that
would be capable of doing what you want.
Jeff
"ANDREW GREGORY" <4py...@verizon.net> wrote in message
news:onBYg.1136$Dg5.1061@trndny09...
Not going to happen. X10 is too slow.
> I have seen all the ready made charismas light hardware and software but I
> do not have the time or money to go that route and was hoping to save some
You can save time by spending money. Or save money by spending time.
You will need to determine where on that scale you need to be.
> of my investment in X-10 that has served me well all these years leading up
You can use X10 for the slow stuff (1sec or slower) and start adding
faster stuff for the faster effects.
As for software... I do my own. Sorry.
You can find more software and hardware info at sites such as
http://computerchristmas.com/ (highly recommended) See their "how-to"
and forum sections.
If you aren't comfortable doing 120vAC component wiring, controllers can
be purchased, but they aren't what I would call cheap.
Long and boring hardware details follow...
-----------
If you are up to doing 120vAC component wiring, you can save money by
spending time. You can build controllers using a solid-state relay
(SSR) controlled from a parallel port and switching a 120v circuit. Or
for cheaper you can build your own SSR using an opto-coupler (to protect
the parallel port) and a triac. I have been able to buy SSRs cheap
enough on the surplus market that I haven't bothered with triac
circuits. For example, this looks like it would work well:
(http://www.allelectronics.com/ then Relays then Solid-State)
home page at:
http://www.crydom.com/products/productFamily.aspx?id=22
detail spec:
http://www.crydom.com/userResources/productFamilies/22/crydom_ez.pdf
The 3-15vdc control input means most PC parallel ports should be able to
control the relay. The 240vac at up to 18amps means you can switch
about as many lights as you would ever put on one circuit. (Probably
you want to keep the number under 50%, or less than 9 amps because these
relays will need a heat sink to keep them cool when running large loads
or high ambient temperatures.) That particular relay is "zero crossing"
which minimizes the interferance to TV and radio reception, but also
means you cannot make a light dimmer or ramp brightness up or down as
well as a "random" switching relay. At under $10/ea buying a dozen is
maybe half of retail price. (A typical PC parallel port can typically
control 12 such relays.) Sometimes you can find even better deals.
AllElectronics also lists a 1amp SSR for $1.50. that might be enough for
each channel. Can't find good specs on it though. However at that
price I'm tempted to buy a dozen just to play with. Small enough to
mount right on the outlet and probably easy to fit four of them into a
four-gang metal box with two duplex outlets...
I build my controllers in sets of four (four independently switched
outlets in a metal box) with a short 120vAC plug for power and an RJ45
(8 conductor "network" jack) for control input. (of the 8 control
wires, four (two pair) control the circuits, two (one pair) provide
ground, and the last two (one pair) provide power (which these simple
relay boxes do not need or use). I use the standard power-over-ethernet
wiring for the power distribution and use what would normally be
"ethernet" wires for the control signals. Then I can use up to three
such boxes per parallel port. Because I use standard jacks I can use
whatever off-the-shelf patch cord I want between my parallel port
adapter and the box. I've used up to 100ft patch with no problems.
I've toyed with the idea of building an expansion for the parallel port
to control more boxes, but it seems too tedious so I haven't.
-----------
Anybody have a source for cheap PCI parallel port cards (e.g. four
parallel ports on one card)?
sdb
--
Wanted: Omnibook 800 & accessories, cheap, working or not
sdbuse1 on mailhost bigfoot.com
>Anybody have a source for cheap PCI parallel port cards (e.g. four
>parallel ports on one card)?
Never seen such a beast.
A venerable and still current solution to the need for multiple digital (TTL)
input-output (I/O) are ISA- and PCI-bus cards based on the 8255 Programmable
Input Output (PIO) IC from the 8080 chip family which predated the original
8088 IBM PC.
Google 8255 PIO for hardware, drivers and software ideas.
There are typically many for sale at eBay for nickels on the dollar.
Business & Industrial > Industrial Electrical & Test > Test Equipment > Card
Based (VXI/PXI/PCI)
The current National Instruments DIO cards are the PCI-6503 (24 TTL I/O),
PCI-DIO-96 (96 TTL I/O) and PCI- 6257 (48 I/O, optically isolated with 120ma
drive).
(I'll be having an internet porch sale in a couple of weeks and will have a
pile of these and related instrumentation and HA items for sale/swap.)
HTH ... Marc
Marc_F_Hult
www.ECOntrol.org
>The current National Instruments DIO cards are the PCI-6503 (24 TTL I/O),
>PCI-DIO-96 (96 TTL I/O) and PCI- 6257 (48 I/O, optically isolated with 120ma
>drive).
oops. Its PCI-6527, not 6257
... Marc
Why not use MIDI? There's a very inexpensive controller that you could
build (midibox.org) that will give 128 inputs and outputs. More can
be added by just daisy chaining more controllers on the MIDI cable.
You can program with free MIDI sequencing software. You'd also have
the capability of syncing easily to a sound track!
---john.
Good point, John. One of my favorite Christmas displays is about three miles down Proctor Rd from my home in Sarasota. There are
something like 400,000 (really) lights on all kinds of moving displays. Everything is sequenced to a MIDI soundtrack playing
traditional Christmas hymns through speakers hidden in the trees. The entire theme is really about Christmas -- no Santa and no
reindeer. Every year they add to the display. It's a pretty famous light show, attracting visitors from all over the world every
year. This is a private home, by the way.
--
Regards,
Robert L Bass
=============================>
Bass Home Electronics
4883 Fallcrest Circle
Sarasota · Florida · 34233
http://www.bassburglaralarms.com
=============================>
>Anybody have a source for cheap PCI parallel port cards (e.g. four
>parallel ports on one card)?
The below board might be better than parallel ports.
SsssssssLlllllllOoooooooWwwwwwwww
Granted, MIDI is probably 10x the speed (in theory) of X10, but I
haven't seen a complete solution to know what is achievable. And that
still means only about 10 cycles per second (Hertz or Hz), which still
limits you to only basic on/off effects. (Compare to 50-60Hz for a
zero-crossing A.C. relay or way over 1000Hz for a PC parallel port.)
With a direct access binary I/O (eg parallel port or a normal digital
I/O pin of a microcontroller such as PIC) it is trivial to PWM a light
from dark to full on and back to off to create fades. If all I wanted
to do was turn on and off there are innumerable ways, and X10 is darn
effective. But once you add speed into the mix, it changes the problem
dramatically.
As for midibox, it appears to be a midi controller primarily, with some
direct I/O capability included. I don't see the direct applicability
unless I wanted to replace to the PC as a controller, and then I see no
obvious reason to introduce the complexity and delays of MIDI.
That looks like a nice I/O board. But I'm skeptical of the speed at
which one could arbitrarily change the bits. For example, walking-1 or
walking-0 thru the entire set, or invert all or some arbitrary subset
(xor), and other common effect operations.
Something like these (similar to what Marc pointed out) is more likely
to be fast enough: http://www.futurlec.com/PCI16IO.shtml or
http://www.futurlec.com/PCI8255.shtml That actually looks like a nice
card. Each 8255 is roughly two XT/AT style parallel ports so if it is
designed well, that card might do what I need, and the price isn't too
far out either. Too bad Futurelec doesn't put detailed tech info
online. There's no way I'd be using Windows! Of course, for that price
I could build a PIC based solution and not need a PC at all...
The MIDI controlled Christmas lighting display I described earlier sequences hundreds of circuits. Lights and motors switch on and
off, sometimes at blazing speeds, to the tune of the MIDI track. There are several scenes where a series of lighting circuits
flashes on and off at about 10-20 times per second per circuit. Note: I'm guessing as to the rate, but it was way too fast to
count.
> Granted, MIDI is probably 10x the speed
> (in theory) of X10, but I haven't seen a
> complete solution to know what is achievable...
I have and it's pretty darned fast. A group of volunteers starts to build the set each year around the middle of October (it takes
seven weeks to set the whole thing up according to a notice at the entrance to the property). I'll stop by this weekend and ask
which controller they're using. I believe someone said they used Cakewalk software to sequence the system. I'll check on that,
too.
> And that still means only about 10 cycles
> per second (Hertz or Hz), which still limits
> you to only basic on/off effects. (Compare
> to 50-60Hz for a zero-crossing A.C. relay
> or way over 1000Hz for a PC parallel port.)
Controlling holiday lights that should not be much of a limitation.
> With a direct access binary I/O (eg parallel
> port or a normal digital I/O pin of a
> microcontroller such as PIC) it is trivial to
> PWM a light from dark to full on and back
> to off to create fades. If all I wanted to do
> was turn on and off there are innumerable
> ways, and X10 is darn effective. But once
> you add speed into the mix, it changes the
> problem dramatically.
In addition to clunky X10 and faster, more flexible MIDI, there are other options. The DMX-512 protocol is used for modern
theatrical lighting. It's also in use on commercial buildings where its simple topology and reliable performance are important
considerations. One of the regular posters here has even designed a home-use DMX-512 lighting controller. I've used DMX-512
extensively in designing theatrical lighting systems for churches and small auditoriums.
DMX-512 can run up to 512 circuits (hance the name) on a single cable. It's fast enough to run high speed, automated spotlights and
musicians' light shows. Controllers used to be prohibitively expensive for home use. However, over the last few years a number of
companies have come out with PC card-based DMX-512 controllers. Dimmers and dimming "packs" range from a hundred dollars or so to
over $2K, depending on the number of circuits and their ampacity. Homebrew DMX-512 compatible dimmers and relays would be
significantly cheaper, though I couldn't begin to tell you how to build one from scratch.
> As for midibox, it appears to be a midi controller
> primarily, with some direct I/O capability included...
It depends on the box. There are relatively inexpensive, multi-circuit lighting controlers (DJ's use them) that can be controlled
by MIDI, DMX-512 or 0-10 Volts DC. DJ lights can dim and flash on/off as fast as the beat on a MIDI sequencer runs a set of Roland
digital drums. The tempo can be blindingly fast. If you've ever watched a rock concert on stage you've seen MIDI controlled
lighting effects.
> I don't see the direct applicability unless I
> wanted to replace to the PC as a controller,
> and then I see no obvious reason to
> introduce the complexity and delays of MIDI.
It's just one of a number of protocols you can use to control lights. The choice shouldn't be about the protocol so much as the
available hardware and its cost. Any one of a number of protocols can be used effectively for this project. MIDI would work fine
(it's faster than you might realize). That doesn't mean MIDI is best for your application but it's certainly worth investigating
IMO.
> It's just one of a number of protocols you can use to control lights.
> The choice shouldn't be about the protocol so much as the available
> hardware and its cost. Any one of a number of protocols can be used
That's the disconnect.
I'm talking about the hardware, and you are talking about the protocols
to talk to the hardware.
I don't see why you consider MIDI too slow to accomplish the task. The MIDI protocol isn't inherently slow and the MIDI hardware
I've seen is lightning fast. What is it you'd like to accomplish in terms of holiday lighting that is faster than the system
(hardware, software and protocol together) which I described?
If you're interested in a holiday lighting controller with serious power and speed, I'd be happy to try to get the specs from these
neighbors who built the system. AFAIK, they are using mostly off the shelf components.
Given the solid state relay you reference in the previous post you could
send the MIDI command to turn the light on and off four times (worst case)
in the time it would take the relay to turn on.
>Granted, MIDI is probably 10x the speed (in theory) of X10, but I
>haven't seen a complete solution to know what is achievable. And that
>still means only about 10 cycles per second (Hertz or Hz), which still
>limits you to only basic on/off effects. (Compare to 50-60Hz for a
>zero-crossing A.C. relay or way over 1000Hz for a PC parallel port.)
I agree that the parallel port is much faster but how fast is fast
enough? Your relay is going to take ~8ms to turn on. An incandescent
bulb can take at least 25ms to reach full brightness (often more).
It depends on how many relays you are going to control and that's
pretty limited unless you multiplex your parallel port.
Do whatever works. I think MIDI may be fine in many cases. And it'd
be easy to program given the free software that is available.
---john.
I'm wanting the hardware to control TRIAC or SSR switches, eg a parallel
binary I/O port. With that I can turn on and off a light (or anything
else) at a rate over 1000 times per second.
This allows all kinds of creative fades to On, Off, or anywhere in
between at 100% the whim of my self-written software.
MIDI cannot do that and was never intended to do that. MIDI is a
control protocol which is used to tell my hardware what to do. I'm not
interested in another protocol that will tell my hardware what to do. I
am trying to build hardware. :)
> The MIDI protocol isn't inherently slow and the MIDI hardware
MIDI is inherently slow.
MIDI runs at several bytes per second. Each command is a few dozen
bytes. Do the math. It's slow.
Thanks for your offer, but it is the wrong direction for me.
Doable with MIDI, DMX-512, 0-10VDC and a few dozen other means.
> eg a parallel binary I/O port. With that I
> can turn on and off a light (or anything
> else) at a rate over 1000 times per second.
Considering the lag time between turning on the power and the filament heating up enough to be seen, why would you care if it can do
1,000 cycles per second?
> This allows all kinds of creative fades to
> On, Off, or anywhere in between at 100%
> the whim of my self-written software.
Yep. I've designed and installed a number of theatrical lighting control systems which would make most home holiday displays pale
by comparison. I can also tell you that there are existing, off-the-shelf solutions which can accomplish what you want to do,
although none issue 1,000 commands per second.
> MIDI cannot do that and was never intended
> to do that. MIDI is a control protocol which
> is used to tell my hardware what to do. I'm
> not interested in another protocol that will
> tell my hardware what to do. I am trying to
> build hardware. :)
Sounds like a fun project. I hope you'll share your experiences as it progresses.
>> The MIDI protocol isn't inherently slow and the MIDI hardware
>
> MIDI is inherently slow.
>
> MIDI runs at several bytes per second. Each command is a few dozen
> bytes. Do the math. It's slow.
You've decided to use another protocol so this is just a discussion -- not me trying to convince you what to use. That said, here's
some info about MIDI. The protocol allows an instrument (or sequencer) to be controlled by "clocks" or "ticks". 48 clocks are sent
per second. Ticks, on the other hand, are sent at a rate of 1 message every 10 mSec. That's only 100 changes per second. Note
that a "change" can be a command such as "Begin fade from scene 125 to 126" or simply, "turn circuit 125 on". Note that while ticks
are intended as a means of keeping things sync'd, it is possible to store a series of commands to build a sequence, then cause them
to execute in order based on tick count.
> Thanks for your offer, but it is the wrong direction for me.
No problem. I look forward to reading about your project (hoping you'll hang around and share what you learn as you go).
Regardless how you choose to execute it, this is the kind of project that interests a lot of regulars here. IN that light, you
might also want to Google the archives of CHA using "Christmas lights" or some such. There have been a number of interesting
threads on the subject every year since I've been posting (and that's a long time) here.
Best of luck.
> I agree that the parallel port is much faster but how fast is fast
My design threshold is 1000hz. That seems to be fast enough to PWM
lights (remember that is 1000 on and 1000 off per second).
> enough? Your relay is going to take ~8ms to turn on. An incandescent
No, that is only for a zero-crossing detecting swith. Typically those I
use for small lighting loads (a few amps) cycle in well under 1ms. I
only use zero-crossing for larger loads (currently up to 40a) where that
characteristic matters, or where I don't need blazing speed.
> It depends on how many relays you are going to control and that's
> pretty limited unless you multiplex your parallel port.
Very. 12 on a standard parallel port, but only 8 of those are 'fast'.
That's why I was asking about multiple parallel boards. :)
The PC is primarily the prototyping platform for sw development. The
final target is a microcontroller that will either be autonomous
(little) or sit on an ethernet (big).
> Do whatever works.
Yup.
I know that. I'm building the instrument that is controlled, not the
controller...
> that a "change" can be a command such as "Begin fade from scene 125 to
And the instrument which actually implements the fade is what I am
building. Unless it uses HUGE variable resistors with HUMONGOUS heat
sinks to dump the waste heat, it will use PWM (Pulse Width Modulation)
to actually fade the light. PWM requires switching the light on and off
very fast, otherwise you will see flicker instead of fade.
That is what I am building. It isn't anything new. It is just
phenomenally cheaper to build, plus I get exactly what I want.
> might also want to Google the archives of CHA using "Christmas lights"
Yup. I've posted a few myself. Such as
http://www.computerchristmas.com/ just a few days ago and almost exactly
two years ago. :)
> or some such. There have been a number of interesting threads on the
> subject every year since I've been posting (and that's a long time)
Yeah, I've been around a while myself. Looks like I just passed my 11th
anniversary in this group. :)
Oh, and BTW, I was doing the stage lighting thing nearly 30 years ago, and
we didn't have any PWM equipment, much less computer control. The light
board in the booth was simply a remote control for large mechanical
dimmers (motor-driven rotary variable resistors) in the 'cage'. A scene
change made all kinds of impressive whirring and buzzing noises, and the
heat coming from that equipment would power a small town. I find PWM
incredible, especially since the introduction of low loss and high-power
MOSFETS. I almost cannot believe the way we set any light level on a
2000w fresnel, with comparatively no heat generation and noise.
Anything faster than about 30 times per second you will see as a fade rather than flickering. However, when using incandescent
bulbs the lamp doesn't actually turn off when power is cut. Instead, the filament starts to cool down. It takes a few ms to "go
out" and by that time the current has turned on again. Triac based theatrical dimmers do what you're trying. These vary in cost
partially with their load capacity.
> That is what I am building. It isn't anything new.
> It is just phenomenally cheaper to build, plus I
> get exactly what I want.
>
>> might also want to Google the archives of CHA using "Christmas lights"
>
> Yup. I've posted a few myself. Such as
> http://www.computerchristmas.com/ just a few days ago and almost exactly
> two years ago. :)
>
>> or some such. There have been a number of interesting threads on the
>> subject every year since I've been posting (and that's a long time)
>
> Yeah, I've been around a while myself. Looks like I just passed my 11th
> anniversary in this group. :)
Heh, heh, heh... You know, Sylvan, if I had taken note of the name in the headers I would have recognized you immediately. :^)
> Oh, and BTW, I was doing the stage lighting thing nearly 30 years ago, and
> we didn't have any PWM equipment, much less computer control. The light
> board in the booth was simply a remote control for large mechanical
> dimmers (motor-driven rotary variable resistors) in the 'cage'.
I've seen those backstage at a few "antique" theater houses over the years but never actually used one. I've worked with 0-10V, a
few proprietary schemes, DMX-512 and MIDI. We used MIDI to integrate lights with sound tracks for a few youth department functions.
I also used it to trigger strobes, foggers and fans at preset times before I installed a computerised control system.
> A scene change made all kinds of impressive whirring
> and buzzing noises, and the heat coming from that
> equipment would power a small town...
Sounds familiar. We decided to upgrade the dimmer closet in a large church in CT a few years ago. I acquired a replacement
transformer -- 440 / 208 WYE. The transformer powered a 400-Amp breaker box which in turn powered the dimmers. Even using triacs,
the air conditioned dimmer room (where the transformer was located) was always about 15 degrees warmer than the rest of the
building. The real fun was installing the thing in the second floor dimming closet though. It took five men to push and pull it up
the stairs.
> I find PWM incredible, especially since the introduction
> of low loss and high-power MOSFETS. I almost cannot
> believe the way we set any light level on a 2000w fresnel,
> with comparatively no heat generation and noise.
Our system had 105 permanent circuits and about 15 open ones that could be attached to rental dimmers if needed. Eight circuits
were 6kW each for running ACLs and such. The rest were 1kW loads though with the gradual changeover to Source IV luminaires, we
were able to get the same light as a 1kW unit with ~600W.
One particular play for which I was the LD had something like 300 cues. I'd plot the lights on my PC at home, configure the
"scenes" on stage, time all the cross-fades and then tweak each one until I was satisfied with everything. At various times we used
a pair of fog machines, a bubbler (ala Lawrence Welk), half a dozen computerized strobes, various moving lights, four manual spots
and, once in a while, all of the FOH fixtures. It was a fun place to go to church.
After doing that for a number of years a few other churches and schools asked me to work on their lighting systems. I learned the
hard way an old saying, "Strand is also a verb." Anyone who hasn worked as an LD will know what that means.
>Very. 12 on a standard parallel port, but only 8 of those are 'fast'.
>That's why I was asking about multiple parallel boards. :)
You may want to look into getting the SIIG parallel port cards
like below. One assumes you have chosen an OS and software that
will support your high speed timing requierments.
>On Sat, 21 Oct 2006 02:13:08 -0400, Robert L Bass <rober...@comcast.net>
wrote:
>> sylvan wrote:
>>> I'm talking about the hardware, and you are talking about the protocols
>>> to talk to the hardware.
>>
>> I don't see why you consider MIDI too slow to accomplish the task.
>
>I'm wanting the hardware to control TRIAC or SSR switches, eg a parallel
>binary I/O port. With that I can turn on and off a light (or anything
>else) at a rate over 1000 times per second.
>
>This allows all kinds of creative fades to On, Off, or anywhere in
>between at 100% the whim of my self-written software.
>
>MIDI cannot do that and was never intended to do that. MIDI is a
>control protocol which is used to tell my hardware what to do. I'm not
>interested in another protocol that will tell my hardware what to do. I
>am trying to build hardware. :)
DMX512 (aka DMX-512, DMX512a) can read and(or) write one byte values to each
of 512 addresses ~44 times per second. This is faster than the human flicker
fusion frequency under most circumstances (Q: Do incandescent lights flicker
when run on 50 hz power?)
There are many DIY approaches Google " dmx 512". Also some homebrew and
commercial stuff here: http://www.econtrol.org/dmx512.htm Chips here:
http://www.artisticlicence.com/cat11_1.htm (I have some left-overs I would
part with cheep.)
Search eBay for "USB DMX Interface" and "DMX 512" for a panoply of lighting
devices.
DMX is _designed_ for control of lights. If you've been to a rock concert,
theatre, or play in the last decade, you've seen DMX512 at work. RF and
ethernet implementations have emerged.
... Marc
Marc_F_Hult
www.ECOntrol.org
>I know that. I'm building the instrument that is controlled, not the
>controller...
>
>> that a "change" can be a command such as "Begin fade from scene 125 to
>
>And the instrument which actually implements the fade is what I am
>building. Unless it uses HUGE variable resistors with HUMONGOUS heat
>sinks to dump the waste heat, it will use PWM (Pulse Width Modulation)
>to actually fade the light. PWM requires switching the light on and off
>very fast, otherwise you will see flicker instead of fade.
<snip>
<I find PWM incredible, especially since the introduction of low loss and
<high-power MOSFETS. I almost cannot believe the way we set any light level
<on a 2000w fresnel, with comparatively no heat generation and noise.
Are you referring to reverse-phase AC control using MOSFETs as "PWM"?
Dimming of AC lamps is conventionally done by turning on the current to the
dimmer after the zero-crossing rather than at the zero crossing. This is
conventionally described as "phase control", not " Pulse Width Modification",
whether TRIACs, back-to-back SCRs, IGBTs, or (rarely?) MOSFETs are used as
the semiconductor control elements and whether the switching is conventional
or reverse phase.
Or are you talking about lamps or LED's operated on DC?
Is so, there are DMX512->PWM and 0-10vdc analog-> PWM converters that
modulate DC.
There are of course many DMX512--> AC dimmer and 0-10vdc --> AC dimmers
I've wired parts of my house with 10AWG for ceiling-mounted DC lamps. At
present, I have 24vdc ->> 0 to 12vdc dimmers which are under DMX/0-10vdc
control and have begun investigating high-power LED's (the lamps are still to
pricey for me at this time). LEDs are an arena for PWM in home lighting,
especially when combined with RGB lighting control so that color as well as
intensity can be controlled. High-power LED controller ICs are emerging eg
from Maxim.
... Marc
Marc_F_Hult
www.ECOntrol.org
sylvan was asking about cards with four LPTs (the one cited only have two
ports). In any case, LPT ports seem to be an inefficient way to get 4 x 8 =
32 'fast' TTL outputs.
In bygone days, the LPTs were convenient because they were supported by the
OS. As Si implies above, attempting to control multiple LTP's in real time
deterministically at 1000hz with a PC without a real- time operating system
would cause one to see many more flashes and other glitches owing to OS and
software timing problems in the PC than anything caused by the hardware.
I presume that sylvan gets his "1000hz" requirement from 120 zero-crossings
per second * 8 positions per zero crossing = OFF + 8 other intensity values.
Pretty crude. Not sure why he would go this route. Conventional dimmers do
much better than that -- eg DMX512 nominally has 255 intensity values, some
X-10 implementations nominally 32 different values, etc.
... Marc
Marc_F_Hult
www.ECOntrol.org
>On Sat, 21 Oct 2006 02:13:08 -0400, Robert L Bass <rober...@comcast.net>
wrote:
>> sylvan wrote:
>>> I'm talking about the hardware, and you are talking about the protocols
>>> to talk to the hardware.
>>
>> I don't see why you consider MIDI too slow to accomplish the task.
>
>I'm wanting the hardware to control TRIAC or SSR switches, eg a parallel
>binary I/O port. With that I can turn on and off a light (or anything
>else) at a rate over 1000 times per second.
>
>This allows all kinds of creative fades to On, Off, or anywhere in
>between at 100% the whim of my self-written software.
1000 on-offs per second controlling 60 hz AC lighting yields:
(1000/sec) /(120 zero-crossing/sec) = 8.33 control choices per second.
As a practical matter, about one-third of those possible on-off signals will
fall so early in the AC cycle that they wouldn't produce enough current to
make visible light (although they would use up electricity).
So as a practical matter, unless you first convert the AC to DC, you might
have as few as 5 distinct illumination levels.
This is probably completely adequate for most scene-control purposes where
slow, smooth transitions from scene to scene are unimportant, but you are
touting this "1000hz" approach as being as providing "all kinds of creative
fades" and "anywhere in between" when as a practical matter, your "1000hz"
approach is much cruder than even the simplest X-10 dimmer.
And it pales in comparison to DMX-512 with 255 distinct values and the dimmer
curves and pre-heat values (i.e, non-linear relationship between input
control value and phase value) are part and parcel of even moderately
sophisticated implementations.
Are you doing more work and accomplishing less with this technique? Or do I
misunderstand something quite completely -- wouldn't be the first or last
time ;-)
... Marc
Marc_F_Hult
www.ECONtrol.org
255 levels * 44 changes * 120 zero-crossings/sec = 1,346,400 hz
= 1.35 mhz = frequency needed to bit-bang a phase-controlled AC dimmer with
the same number of intensity levels and time resolution as DMX512.
(Assuming phase control. The arithmetic for amplitude control is a bit
different and bumps into other limitations such as flicker.)
sylvan is asking about doing this from a PC bus with off-the-shelf LPT cards
so, presumably requires a real-time OS that runs on conventional x86 PC
hardware such as Windows CE, Labview RT, QNX, BeOS, VxWorks,
RTLinux/FreeRTOS/Linux2.6.18+ and so on.
(I wonder what use the 100 MB release of Windows PE 2.0 might have for HA if
the 24-hr run limitation could be overcome/thwarted? Not RT, but small
enough for simple installation and use without a hard drive.
http://www.microsoft.com/technet/windowsvista/deploy/winpe.mspx )
... Marc
Marc_F_Hult
www.ECOntrol.org
Or mostly as standard hardware that was easy to access both on the SW
and hardware side. (though a simple design change by IBM in the
original to swap the addresses of the status and control ports would
have made high speed much easier!) A SW example: port write to 0x378
switches 8 lines simultaneously. 0x37a does four lines. On anything
faster than a 4.77mhz 8088, the cycle time is limited by wait states on
the ISA bus. (PCI (and microchannel) reduce or eliminate most of the
CPU wait states.) This means that the slowest PC you can buy today can
set the state of 8 lines hundreds of thousands of times per second.
Compare that with an 8255 solution which takes multiple port writes to
set the state of any set of the 24 output lines. If it takes two
writes, you just cut your maximum rate in half. Three writes == 1/3.
Etc. Even the parallel port multiplexing solutions which take five or
six writes are way faster than my 1000hz target (which only requires
2000 writes per second on a standard parallel port).
> As Si implies above, attempting to control multiple LTP's in real time
> deterministically at 1000hz with a PC without a real- time operating system
The 1000hz is the design target. And modern PCs are fast enough that an
ancient 386/20 laptop running linux has worked great for simple testing.
It has worked so well, I may even change my stuff to be a kernel driver.
The ancient PC speaker driver would produce full sound effects using
1bit PWM under linux. As long as you kept the sounds from about 1000hz
to 12,000hz and didn't mind a bit of jumpiness on the keyboard. :)
Given that, I expect I could run fades on 8 lights (one parallel port)
from this 386/20 without needing any "real time" anything.
In reality, not all bits on all ports will need to be toggling that
fast. Mostof the time, no bits will be toggling. When a light is
full-on or full-off the system is idle. It is only while fading or
maintaining a dim level that any toggling will need to happen.
> would cause one to see many more flashes and other glitches owing to OS and
> software timing problems in the PC than anything caused by the hardware.
Again, the PC is mostly a SW development and prototyping platform.
There is no OS involved. It boots DOS and loads my code which takes
over the entire system. Or another way of saying it, I've written the
OS. Even the really little, cheap pics can do 4 channels (bits aka
loads). That's what's in many of the remotable dimmers.
> I presume that sylvan gets his "1000hz" requirement from 120 zero-crossings
> per second * 8 positions per zero crossing = OFF + 8 other intensity values.
Not even close.
> Pretty crude. Not sure why he would go this route.
I'm not.
> Conventional dimmers do
> much better than that -- eg DMX512 nominally has 255 intensity values, some
Think of it as me building a DMX512 or X10 dimmer. How does it actually
create the varying intensities? By turning on and off the light many
times per second. That's what I'm doing.
I'm modulating D.C., or rather, creating modulated D.C. The technique
of modulating the D.C. is PWM. That D.C. is then used to switch a
triac to control A.C. loads. Phase syncronization is mainly needed to
control R.F. and sometimes to control switching transients. With fairly
low power loads (typically under 200 watts) R.F. is minimal and
controllable in other ways. Switching transients aren't significant
with primarily resistive or incandescent loads.
> There are of course many DMX512--> AC dimmer and 0-10vdc --> AC dimmers
You seem to be confusing how the dimmer is controlled (with DMX or
0-10vdc or...) with how the dimmer controls the A.C. I'm doing the
latter. Not real interested in the former at the present time.
> control and have begun investigating high-power LED's (the lamps are still to
> pricey for me at this time). LEDs are an arena for PWM in home lighting,
> especially when combined with RGB lighting control so that color as well as
> intensity can be controlled. High-power LED controller ICs are emerging eg
> from Maxim.
Yes, very cool stuff. It is just beginning to hit the market, and looks
to have potential to revolutionize ambient lighting.
If DMX could issue 44 commands per second per address, it could turn a
light on and then off only 22 times per second. Is that what you meant?
> fusion frequency under most circumstances (Q: Do incandescent lights flicker
> when run on 50 hz power?)
A: No, because incandescent lights are very, very slow.
Q: Do fast acting lights (LEDs, fast phospher in fluorescent tubes,
CRTs, LEDs, etc) flicker when run on 50hz power?
A: Yes. Even if not consciously apparent to the human eye, 50hz and
60hz and even 120hz flicker is easily detectable with primitive
mechanical instruments, and is known to cause eye strain during extended
exposure.
> DMX is _designed_ for control of lights.
Yup, and someday I may want to add a DMX interface to my devices so they
can be controlled from such a standard protocol. It's not on the
vintage chart today.
I don't know how come I cannot seem to communicate this...
Perhaps today's batch of posts will connect.
How do you think the X-10 dimmer actually fades the light?
> And it pales in comparison to DMX-512 with 255 distinct values and the dimmer
And the DMX dimmers actually control the light how?
> Or do I
> misunderstand something quite completely -- wouldn't be the first or last
> time ;-)
I think so!
You are looking at the problem from the "top" -- how to control a
dimmer.
I'm looking at the problem from the bottom -- how to build a dimmer.
>On Mon, 23 Oct 2006 11:25:18 -0400, Marc_F_Hult
<MFH...@nothydrologistnot.com> wrote:
>> Or are you talking about lamps or LED's operated on DC?
>> Is so, there are DMX512->PWM and 0-10vdc analog-> PWM converters that
>> modulate DC.
>
>I'm modulating D.C., or rather, creating modulated D.C. The technique
>of modulating the D.C. is PWM. That D.C. is then used to switch a
>triac to control A.C. loads. Phase synchronization is mainly needed to
>control R.F. and sometimes to control switching transients. With fairly
>low power loads (typically under 200 watts) R.F. is minimal and
>controllable in other ways. Switching transients aren't significant
>with primarily resistive or incandescent loads.
ROTFL
A TRIAC dimming household 60 hz AC can be switched on *exactly* twice every
1/60th of a second: once during 0-180 degrees and once during 180-360
degrees. And a TRIAC can _never_ be 'switched off'. So what you say you are
doing (as I understand it) simply won't work. Everything that can be done to
control a TRIAC can be done with no more than 120 low-to-high transitions per
second. Having the ability to switch at 1000 hz is intrinsically no more
useful than 120. It is _when_ during the cycle with respect to the
zero-crossing that the SCR is turned ON that determines the dim level.
>> There are of course many DMX512--> AC dimmer and 0-10vdc --> AC dimmers
>
>You seem to be confusing how the dimmer is controlled (with DMX or
>0-10vdc or...) with how the dimmer controls the A.C. I'm doing the
>latter. Not real interested in the former at the present time.
No, it's all quite clear to me. DMX can change the 0-255 dim level setting up
to 44 times per second. Based on the 0-255 level instruction it receives via
DMX (which can change up to 44 times per second) the dimmer module (in the
case of household AC lighting) sets the dim level of the TRIAC/SCRs by either
turning the TRIAC into conduction at 0 and 180 degrees (= Full ON), at some
phase angle 0 < a < 180 and 180< a < 360 (= dimmed"), or not at all (= full
OFF). This can be done (eg) with a comparator that compares the voltage of a
simple (eg) 0-10 volt ramp (sawtooth signal) that begins at the zero crossing
and a 0-10vdc DC control signal. When the ramp reaches the value of the
control signal, the comparator goes high and causes the TRIAC to go into
conduction. This is repeated 120 times a second.
So being able to switch at 1000hz or 10000hz or a gigahertz has no intrinsic
advantage over switching at 120hz (at the right times) in controlling
TRIACs/SCRs. But only being able to turn the TRIAS on at 1000hz/120hz = 8.33
(dimensionless) different phase angles (your 1000hz case) means that you
will only have a maximum of 1000/120 = 8.33 different dimmer settings
(assuming that you are synchronized with zero crossing, which you don't seem
to be). In contrast DMX512 has 255 different dim levels (my previous comments
about dimmer curves, preheat and un-useful phase angles not withstanding).
This is the same as I wrote before. What you need to grok is that a TRIAC is
not turned OFF when the TRIAC gate control signal goes low (= OFF). So
turning the control signal ON-OFF does NOT turn the TRIAC ON-OFF lock-step.
... Marc
Marc_F_Hult
www.EControl.org
>On Mon, 23 Oct 2006 11:49:44 -0400, Marc_F_Hult
<MFH...@nothydrologistnot.com> wrote:
>
>> I presume that sylvan gets his "1000hz" requirement from 120
>>zero-crossings per second * 8 positions per zero crossing = OFF + 8 other
>>intensity values.
>
>Not even close.
Then please do post how you chose 1000 hz.
>> Pretty crude. Not sure why he would go this route.
>
>I'm not.
>
>> Conventional dimmers do much better than that -- eg DMX512 nominally has
>> 255 intensity values, some
>
>Think of it as me building a DMX512 or X10 dimmer. How does it actually
>create the varying intensities? By turning on and off the light many
>times per second. That's what I'm doing.
No. DMX512 does not "turn[] on and off the light off many times per second".
DMX512 can set a new, 0-255 dimmer level up to 44 times a second, but it is
the dimmer that turns the conduction of a TRIAC or back-to-back SCR ON
depending on the phase at each half cycle. A TRIAC cannot be "turned off"
during 0< a < 180 and 180 < a <360 degrees. It turns _itself_ OFF at 0 and
270 degrees whether we like it or not.
If you are turning ON the light many times per second, how do you synchronize
with line frequency? If you don't, what happens if you turn on the light when
it happens to be at 0 or 180 degrees compared to when it happens to be at 90
or 270 degrees?
... Marc
Marc_F_Hult
www.ECONtrol.org
>On Mon, 23 Oct 2006 11:25:18 -0400, Marc_F_Hult
<MFH...@nothydrologistnot.com> wrote:
>> Or are you talking about lamps or LED's operated on DC?
>> Is so, there are DMX512->PWM and 0-10vdc analog-> PWM converters that
>> modulate DC.
>
>I'm modulating D.C.,
So you first rectify the AC ?
>or rather, creating modulated D.C.
>The technique
>of modulating the D.C. is PWM. That D.C. is then used to switch a
>triac to control A.C. loads.
OK. But what you end up with is a poorly-timed control signal for the TRIAC
gate. What's the point? You end up with more noise and less resolution (of
different dim levels) than if you were synchronized. I guess I answered my
own question: you don't have to synchronize with the zero crossing ;-)
>Phase syncronization is mainly needed to
>control R.F. and sometimes to control switching transients. With fairly
>low power loads (typically under 200 watts) R.F. is minimal and
>controllable in other ways. Switching transients aren't significant
>with primarily resistive or incandescent loads.
See my other comments.
>
>> There are of course many DMX512--> AC dimmer and 0-10vdc --> AC dimmers
>
>You seem to be confusing how the dimmer is controlled (with DMX or
>0-10vdc or...) with how the dimmer controls the A.C. I'm doing the
>latter. Not real interested in the former at the present time.
No I am not ;-) What you describe is a very low-resolution way ( max 8 dim
levels at 1000 hz) to dim AC power using TRIACS or back-to-back SCRs.
... Marc
Marc_F_Hult
www.ECOntrol.org
>On Mon, 23 Oct 2006 09:01:36 -0400, Marc_F_Hult
<MFH...@nothydrologistnot.com> wrote:
>> DMX512 (aka DMX-512, DMX512a) can read and(or) write one byte values to
each
>> of 512 addresses ~44 times per second. This is faster than the human
flicker
>
>If DMX could issue 44 commands per second per address, it could turn a
>light on and then off only 22 times per second. Is that what you meant?
No it is not. I mean what I wrote. It can change the steady-state 0-255 dim
level 44 times per second. The dimmer does the dimming.
>
>> fusion frequency under most circumstances (Q: Do incandescent lights
>>flicker when run on 50 hz power?)
>
>A: No, because incandescent lights are very, very slow.
But they are what you are controlling, no?
>
>Q: Do fast acting lights (LEDs, fast phospher in fluorescent tubes,
>CRTs, LEDs, etc) flicker when run on 50hz power?
They do not turn on-off faster than the human flicker fusion frequency which
is what I wrote. And you can't change the 60 hz frequency of the light
intensity modulation by turning the TRIAC gate control signal ON-OFF at
1000hz or one gigahertz or any other frequency for reasons I have posted
tediously already ;-)
... Marc
Marc_F_Hult
www.ECOntrol.org
To expand and clarify: In order to provide the gate control signal for a
TRIAC/ Back-to-Back SCR dimmer with the 256 dim levels achieved by DMX512,
your fixed-frequency scheme needs to operate at a frequency of 120*256 =
30720 hz.
So your 1000hz target, which you suggest/imply is itself extravagant, is a
factor of 30 slower than what is needed to accomplish what off-the-shelf,
(relatively ;-)inexpensive, globally accepted, ANSI-standard,
http://www.usitt.org/standards/DMX512_FAQ.html DMX-512 lighting can do.
You can change the arithmetic co9mpletely by timing the gate control voltage
with the AC line zero crossing, but if you do that with a PC, all you've
really done is create the world's largest (? I dunno ;-) dimmer controller at
a substantial cost in time expended, size, power consumption, complexity, and
difficulty of repair and maintenance by others.
'Course I do things related to HA just as time-consuming and idiosyncratic,
so no criticism is implied ;-)
... Marc
Marc_F_Hult
www.ECOntrol.org
The discussion has moved on but these statements need to be corrected.
With MIDI, a command to 'turn something on' with up to 128 'intensities'
is 3 bytes worst case and 2 bytes best case. No where near the 'few
dozen bytes' stated by the previous poster.
MIDI runs at 31.25Khz. A byte can be sent in 320 microseconds. That's
about 3 bytes per millisecond or 3000 bytes per second. That's a few
more than the previous poster's 'several bytes per second' I think.
Most use triacs.
> I'm looking at the problem from the bottom -- how to build a dimmer.
Not any more. You explained that already and I understand you. I'm fairly certain Marc does, too. His point is that your design
criteria may not yield what you want.
FWIW, Marc has built a DMX-512 compatible lighting controller for home use. I had references to his work on my FAQ... until
hurricane Charley came along. Oh, well.
I'm quite interested in your design. I hope you can make it work to your satisfaction. These kinds of projects tend to inspire
people to produce commercially viable products and that is good not only for the DIY folks here but also for retailers like me who
cater to them. :^)
Whatever protocol you choose one you're at that point, I hope you'll share about it here as the job progresses.
Yup. And the triac is controlled by a microprocessor switching the gate
current on and off at least 120 times per second.
Of course, you (Robert) are responding to a message intended for
Marc. :)
> I understand you. I'm fairly certain Marc does, too.
I am confident he does not.
> FWIW, Marc has built a DMX-512 compatible lighting controller for home use.
I wonder if he created the software that actually runs in the
microcontrollers inside each dimmer / load controller...
> Then please do post how you chose 1000 hz.
With 1000hz I can smoothly synthesize any waveform from D.C. up to 500hz
and of course squarewave up to 1000hz. Then the interface electronics
will allow me to use D.C. lights (with a class-D amplifier) or A.C.
lights (with a triac or SSR).
>>Think of it as me building a DMX512 or X10 dimmer. How does it actually
>>create the varying intensities? By turning on and off the light many
>>times per second. That's what I'm doing.
> No. DMX512 does not "turn[] on and off the light off many times per second".
DMX doesn't, but the DMX dimmer does. That is EXACTLY how EVERY SOLID
STATE DIMMER works. Even a DMX dimmer and same with an X10 dimmer.
Read http://home.howstuffworks.com/dimmer-switch2.htm if you don't want
to believe me. (microprocessor controlled dimmers simply replace the
analog R.C. timing circuit with a digital output pin)
> If you are turning ON the light many times per second, how do you synchronize
> with line frequency?
I don't.
> If you don't, what happens if you turn on the light when
> it happens to be at 0 or 180 degrees compared to when it happens to be at 90
> or 270 degrees?
When gate (trigger) current is available for the triac, it will conduct
the A.C. waveform. When gate current is not available, it will not
conduct beyond the zero crossing. Basic electronics.
The microprocessor will switch on and off the gate current. The triac
will cease conducting within 1/120 of a second (at 60hz). That's rather
faster than your hand can interrupt the A.C. using a mechanical switch.
It is also reasonable compared to typical mechanical power relays. If
you don't want to call that "switched off" that is your prerogative nit.
> doing (as I understand it) simply won't work.
But I can see it does.
> OFF). This can be done (eg) with a comparator that compares the voltage of a
> simple (eg) 0-10 volt ramp (sawtooth signal) that begins at the zero crossing
> and a 0-10vdc DC control signal. When the ramp reaches the value of the
> control signal, the comparator goes high and causes the TRIAC to go into
> conduction. This is repeated 120 times a second.
Yup. Now how would your DMX dimmer generate the 0-10vdc control signal
for the comparator? Nyquist might help you understand how, and also
how/why I can simplify the whole mess with a bit of software and make a
generic controller, just as long as I keep my switching frequency many
times faster than line frequency. (And 1khz just so happens to be a
typical lower bound in many PWM designs.)
>I had references to his work on my FAQ... until
>hurricane Charley came along. Oh, well.
I was wondering why you took down your famed "FAQ". I have a copy of
it sucked with Teleport Pro in HTML and the .zip file in RoboHelp
format taken from your /images directory you left unprotected.
No, you can't have it.
--
-Graham
(remove the double e's to email)
Your prediction of 8 dim levels is without basis or merit.
Assuming 60hz. Typical phase control the triac must be triggered 120
times per second at a TBD offset after the zero crossing. If the triac
is instead triggered exactly twice as often, it will function exactly
the same -- the output A.C. waveform will be identical. Same if the
triac is triggered exactly 4x as often. Or 8x as often. 8x is 960/sec.
If I instead trigger at 1000/sec, that is a max of 4% error when it
happens at random instead of synchronized to zero crossings. This error
has imperceptible effect (to my eye when using incandescent lighting).
And I am building dimmers, thus I need to turn the light on and off many
times per second and DMX is irrelevent (unless you can offer DMX dimmers
in the $5 to $10 per channel range when buying 4 channel blocks).
>>A: No, because incandescent lights are very, very slow.
>
> But they are what you are controlling, no?
For the most part. And their slow speed is why a 60hz A.C. dimmer
works. But just because the output cannot reproduce the frequency, that
is no reason not to have the frequency. E.g. CD audio was (and remains)
a useless waste a fidelity for most purchasers of CD content.
>>> (Q: Do incandescent lights flicker when run on 50 hz power?)
>A: No, because incandescent lights are very, very slow.
>>Q: Do fast acting lights (LEDs, fast phospher in fluorescent tubes,
>>CRTs, LEDs, etc) flicker when run on 50hz power?
> They do not turn on-off faster than the human flicker fusion frequency which
> is what I wrote.
But they do. I and many others see the flicker from LEDs run on
unfiltered 60hz A.C. simply by turning ones head causing eyes to sweep
past the LEDs. Many people complain of this with LED christmas lights
and night lights.
Fluorescent lighting phosphers are a bit slower, and the 120/sec
flashing is much faster, but they also produce easily discernable
flicker that bothers many people and is proven to exhaust eyes even for
those people who are not consciously aware of flicker.