Searching \ for '[PIC] Multi-zone external light controller with s' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: massmind.org/techref/microchip/devices.htm?key=pic
Search entire site for: 'Multi-zone external light controller with s'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] Multi-zone external light controller with s'
2003\01\04@051114 by Stuart Meier

flavicon
picon face
I have just re-joined the list as I have a project to build a 9 zone external light controller (UK,
"230"v), driven from PIRs, push buttons at each exit door etc.

Planning to use a 16F877 running at 20mhz, zero-crossing detection, phase angle firing to give 'soft
start' (and 'soft stop'?), opto-isolated triacs etc.

All that pretty much as discussed in the archives at various places, thanks guys.

The Question(s) :

I intend to use an ISR to generate a tick perhaps every 250 usecs, then in main loop
a) test for 'on' pulses from PIRs
b) debounce PBs by referenc to ticks (which will both switch lights on, and cancel them, possibly
with 'on' duration set by length of press)
c) fire appropriate triacs at appropriate phase angles if they are dimming up/down, or at zero
crossing if 'on'
d) switch led to indicate zone status (flashing under some circumstances, will need to be timed)
d) keep running count of time to shut off 'courtesy' lights at eg 1am

Am I expecting too much? Will my PIC be fast enough to handle all that with a possible 9 separate
dimming cycles all at different stages (at least in theory) as in effect I am trying to
pseudo-multitask. If I was more expert, I should be able to estimate it without cutting all the
code, but I hope someone with a lot more experience than me has a feel for it.

Am I reinventing the wheel - is there code somewhere where I *haven't* looked in cyberspace?

Are there issues I am overlooking?

TIA

Stuart (Piclist member in umm 1997, 8, 2000)

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\01\04@055119 by Jinx

face picon face
> (and 'soft stop'?)

Wouldn't worry about that

> I intend to use an ISR to generate a tick perhaps every 250 usecs

250us @ 20MHz is over 600 instruction cycles. Plenty, I'd have
thought, with 25,000 (10ms) IC between zero-crossing points

I recall a suggestion that slices of 100us works well but 250us
would be OK for just ramp-up from off to on. Even after 9 updates
there's still 8ms until the next z-c

How are you doing the z-c detection btw ?

> b) debounce PBs by reference to ticks

You could add an RC to lessen/eliminate switch noise and use a
shorter switch debounce routine. Choosing a classy pushbutton
pays off too

It doesn't sound like the PIC would have too much trouble supervising
a circuit like that. Some paperwork and a flow diagram for the code
beforehand wouldn't be a bad idea, to get all the timing nicely dove-
tailed

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\01\04@060807 by Stuart Meier

flavicon
picon face
Hi Jinx

Soft stop would just be for elegance, fades away not dump you in the dark if you are out of range of
PIRs  :-)

zc, opto isolated, don't like 240v potential down low voltage wiring :-(

Not decided on the PBs yet, but they will be chosen for appearance not electrical performance, so
some signal clean up may be a good idea.

TX

Stuart
{Original Message removed}

2003\01\04@062521 by Jinx

face picon face
> Soft stop would just be for elegance, fades away not dump you in
> the dark if you are out of range of PIRs  :-)

Ah, good idea. Perhaps a time delay (5 seconds ?) before the fade

> zc, opto isolated, don't like 240v potential down low voltage wiring :-(

Something like picture 2 here ?

http://home.clear.net.nz/pages/joecolquitt/txless.html

If you need to, use a scope and a PIC output signal to compare to
the input so the timing can be organised so that routines don't trip
over each other

> Not decided on the PBs yet, but they will be chosen for
> appearance not electrical performance, so some signal clean
> up may be a good idea

"hope for the best, plan for the worst", as they say ;-)

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\01\04@113934 by Roman Black
flavicon
face
Stuart Meier wrote:
>
> I have just re-joined the list as I have a project to build a 9 zone external light controller (UK,
> "230"v), driven from PIRs, push buttons at each exit door etc.
>
> Planning to use a 16F877 running at 20mhz, zero-crossing detection, phase angle firing


Hi Stuart, design it from the back first. The user is
going to allow a decent delay after walking into the
room before expecting the light to come on. The triacs
etc need zero cross triggering.

Why not design an int (or poll) at 100Hz, in sync with
your mains, and do all your processing and triac
firing there.

No user is going to be unhappy with 1/100th second
delay and it makes your software job much easier. :o)

For triac phase ramping etc you can just add a delay
after your main code event every 100Hz.
-Roman

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\01\04@165319 by Dwayne Reid

flavicon
face
At 10:10 AM 1/4/03 +0000, Stuart Meier wrote:
>I have just re-joined the list as I have a project to build a 9 zone
>external light controller (UK,
>
>Planning to use a 16F877 running at 20mhz, zero-crossing detection, phase
>angle firing to give 'soft start' (and 'soft stop'?), opto-isolated triacs etc.
>
>Am I expecting too much? Will my PIC be fast enough to handle all that
>with a possible 9 separate
>dimming cycles all at different stages (at least in theory) as in effect I
>am trying to
>pseudo-multitask.

I'm doing 4 channels of dimming (64 levels) plus bit-banged serial comms
and a bunch of other stuff on a 12f675 (8 pin PIC) at 4 MHz so I'd think
that you should have not too much trouble expanding to 9 channels on the
'877 @ 20 MHz.  Give it a go and holler at the list if you run into problems.

dwayne


--
Dwayne Reid   <spam_OUTdwaynerTakeThisOuTspamplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(780) 489-3199 voice          (780) 487-6397 fax

Celebrating 18 years of Engineering Innovation (1984 - 2002)
 .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-
    `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'
Do NOT send unsolicited commercial email to this email address.
This message neither grants consent to receive unsolicited
commercial email nor is intended to solicit commercial email.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\01\05@090127 by Chris Loiacono

flavicon
face
>
> I have just re-joined the list as I have a project to build a
> 9 zone external light controller (UK,
> "230"v), driven from PIRs, push buttons at each exit door etc.
>
> Planning to use a 16F877 running at 20mhz, zero-crossing
> detection, phase angle firing to give 'soft
> start' (and 'soft stop'?), opto-isolated triacs etc.
>
> All that pretty much as discussed in the archives at various
> places, thanks guys.
>
> The Question(s) :
>
> Am I expecting too much?

No, but you might think about keeping all of your AC syncing and gating on
one PIC and the logic for your sensing and timing on another. I am not one
of those people who says to spread PICs all over the place just to make
programming easier, but you will have to constantly time your gate signals
with the ZC's - the timing of which can occasionally vary as utility
providers switch generators on & off line, etc. It's just the most effective
way to keep this function set at the highest priority.


> Are there issues I am overlooking?

Here's one - what about crosstalk - @ 230V, every device gate will see some
effect from nearby gating, which takes the form of fast transients that
exceed ratings for many triac's DV/DT rating. Along the dsame lines - with
sensitivity varying with gating in different quadrants, you may want to
think of using SCR's instead. To run that many channels, work fast to get up
to speed on snubbing and determining the optimal gate pulse
shape/pattern/duration for your devices.

D. R. probably has the most experienc in multi-channel phase angle control -
just  listen carefully to his responses - He's helped me out of a couple of
stickies..


CL

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam@spam@mitvma.mit.edu with SET PICList DIGEST in the body

2003\01\05@132839 by Stuart Meier

flavicon
picon face
Thanks for the comments guys, I'll keep in touch as the project starts to roll, tempted by Dwayne 4
on 8 pins :-)

Hi again Roman, hope u r well; it's external, 'user' won't expect anything, although part 2 could be
the internals.

I ddi consider breaking it up[ over several pics, but decided I'd ask the expert folks on the
PIclist first! I now plan to prototype it on 877, and take it from there. I'll develop code step by
step, see how it fares

Stuart
{Original Message removed}

2003\01\06@074341 by thys

flavicon
face
Hi Stuart

I have done a single zone dimmer using a 12c508 or a 12c671(as a slave.
Do you or any one else have an idea on how to do short circuit protection to
protect the triac?

OK all will probably shout FUSE... but this is not an option.


Thanks
Thys



{Original Message removed}

2003\01\06@082810 by Spehro Pefhany

picon face
At 02:33 PM 1/6/03 +0200, you wrote:
>Hi Stuart
>
>I have done a single zone dimmer using a 12c508 or a 12c671(as a slave.
>Do you or any one else have an idea on how to do short circuit protection to
>protect the triac?
>
>OK all will probably shout FUSE... but this is not an option.

Triacs are very difficult to protect against short-circuit faults.

You could consider replacing the triac with a SC rated IGBT, or just
make the triac easily replaced. Or put a ginormous triac in there
that will allow a circuit breaker to blow before the triac goes
(think hockey-puck sized).

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
speffspamKILLspaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam.....mitvma.mit.edu>

2003\01\07@035913 by Stuart Meier

flavicon
picon face
Stuart
----- Original Message -----
From: "Jinx" <EraseMEjoecolquittspam_OUTspamTakeThisOuTCLEAR.NET.NZ>
To: <PICLISTspamspam_OUTMITVMA.MIT.EDU>
Sent: 04 January 2003 10:52
Subject: Re: [PIC] Multi-zone external light controller with softstart


{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2003\01\07@041201 by Stuart Meier

flavicon
picon face
This is in danger of getting to [EE], however...

> > Not decided on the PBs yet
Jink said
> "hope for the best, plan for the worst", as they say ;-)

After a search of PICLIST archive, I am thinking a good way to go for 'pushbutton' switches might be
QT110 CHARGE-TRANSFER TOUCH SENSOR, mounted on rear of a blanking plate. They will need to feed
signal back over around 40 feet of low voltage wiring.

Has anyone currently on the list any experience using these?

(Apologies missent last previous email)
Stuart

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2003\01\08@163122 by Peter L. Peres

picon face
On Mon, 6 Jan 2003, Spehro Pefhany wrote:

*>that will allow a circuit breaker to blow before the triac goes
*>(think hockey-puck sized).

Or use an inexpensive triac that can be replaced easily (unlike our dear
friends in the far east who bolt it on the heatsink instead of using a
screw).

There is a way to protect scrs from shorts, but it uses another scr
(identical to the first) and driving it is not very easy.

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

2003\01\09@005243 by Chris Hunter

flavicon
face
----- Original Message -----
From: "Peter L. Peres" <@spam@plpKILLspamspamACTCOM.CO.IL>
To: <KILLspamPICLISTKILLspamspamMITVMA.MIT.EDU>
Sent: Tuesday, January 07, 2003 7:40 PM
Subject: Re: [PIC] Multi-zone external light controller with softstart


{Quote hidden}

Triacs are notorious devices - there isn't a "fast-blow" fuse in existence
that will fail faster than a triac!  I have always used back-to-back
thyristors in anything that needs to be more reliable than a domestic
lighting dimmer - the drive circuit configuration is more complex but the
reliability is increased by a few orders of magnitude.

Chris

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

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