'My first REAL pic project!!'
Mohamed El Egairy wrote:
> <snipped a little>
Sounds like a good lamp dimmer design, the LDR's next, right? <G>
My suggestions - for various reasons, admittedly somewhat redundant;
Nuts & Volts
Mohamed El Egairy wrote:
> My project is a small system that is used to light up building stair's
> light and, after pre-set time, switch off the lamps again
A somewhat tangential suggestion is to install fluorescent lighting in
the first place. This requires no start-up dimming (rather the reverse)
but is at least three times as efficient so you can afford to double the
"on" time and still save electricity.
Actually, excess cycling and start-up is undesirable with fluorescents
more so than with incandescents so you really *want* to extend the "on"
time in order to make it more likely that the next person will enter
while the lights are still on and not have to switch them on *again*.
Conversely, conventional inductive ballast (but *not* electronic)
fluorescents, if switched electronically, can be switched *off* for a
couple of cycles which does not count as a switch-on cycle as the tube
fires immediately afterward, but would be the equivalent of your dimmed
warning of imminent turn-off. That is, it could "flick" every 2 seconds
for the last ten (or twenty).
> - Extend lamps life time by start dimmed for some time to heat up the
About ¸ second.
> - Doesn't light up even you press the button unless it's night (light
> level using LDR) not yet implemented :)
Your subsequent comments indicate you may be implementing a software
PLL (Phase Locked Loop) to synchronise with the mains cycle. Taking
this a bit further, you could implement a "time-of-day" function based
on the LDR which would ignore the light from the controlled lights
themselves, and relative darkness due to say, rain. Of course if it is
dark with rain, you may want the lights on anyway.
> and some more features..
> In this project I used get the AC interfaced to the PIC and used
> interrupt on change to determine zero crossing it helps a lot in many
RB0 interrupt might be better than interrupt-on-change which has a bit
of a "bad press".
> first I know where to fire the triac exactly (delay using TMR0).
> Second system count cycles to determine the time (while programming
> and lighting up).
> Also used it for switches debounce delay, ...
> Actually I used it in the system to be hardware independent
> (oscillator) so it doesn't matter if there is drift in RC circuit (I'm
> using RC circuit for osc no crystal because of cost).
More... (looser matching)
- Last day of these posts
- In 1999
, 2000 only
- New search...