Re: Specifying a relay to control lights etc.
- From: scouselad <allanlewis99@xxxxxxxxxxxxxx>
- Date: Tue, 23 Oct 2007 03:18:42 -0700
On Oct 23, 10:49 am, John Fields <jfie...@xxxxxxxxxxxxxxxxxxxxx>
wrote:
On Tue, 23 Oct 2007 01:17:25 -0700, scouselad
<allanlewi...@xxxxxxxxxxxxxx> wrote:
On Oct 22, 11:58 pm, John Fields <jfie...@xxxxxxxxxxxxxxxxxxxxx>
wrote:
On 22 Oct 2007 01:49:49 -0700, scouselad
<allanlewi...@xxxxxxxxxxxxxx> wrote:
Hi,
I'm doing a project on home automation and, as you might expect, I'd
like to control a lighting circuit (standard filament bulbs, most
likely) via a digital light sensor and a micro-controller. Obviously,
to control the mains supply, I'll need some sort of relay. However,
I'm not sure how I could emulate a "dimmer" control in this way. For
example, I considered using PWM (which my micro-controller can produce
automatically), but I'm not sure if a relay can respond that fast. I
understand that solid-state relays (SSRs) respond much faster than
electromagnetic and electromechanical relays, so I'd like to use an
SSR if possible.
Basically, I'd like a device that I can give some variable input so
that it will vary the amount of AC mains voltage across my light bulb
(or heater, or fan, etc.). It would be nice if there was something
that will take digital input (perhaps PWM) but all I've found so far
in that department is the Crydom MCTC range, which are a little too
expensive (~£80/$160) compared to small SSRs (~£4-10/$8-20). However,
I'd be happy with something that takes analog input if it saves me a
lot of money.
---
From your description I assume that you want to be able to set, and
have the device keep the ambient light level constant in, say, a
room, regardless of the effects of external light streaming in
through windows or from adjacent rooms.
That is, if there was no external light streaming into the room the
lamp would be at its brightest, but as more and more external light
illuminated the room the lamp would dim in order to compensate.
Is that right?
--
JF
Exactly. I have already bought a light sensor (an Intersil ISL29003)
with I2C output that I intend to control from a Microchip 16F877 or
similar - setting up that system is really another task entirely. What
I'm looking for is something that I can give a variable input (either
PWM or some digital input - I2C would be nice - or just an analogue
voltage level) causing it to adjust the power delivered to the light.
I know I can do this by adjusting the firing angle of a triac, but I'm
not sure of the circuitry involved to make to control fully
electronic. I've found lots of similar "dimmer" circuits on the net,
mostly using triacs, but they all have a large potentiometer to
control the dimming. What I want to do is use a circuit like that but
with an electronically-controlled potentiometer. Again, I know that
digital pots exist, but I don't think they will take UK mains voltage
(220-240V).
---
Since you're going to use a µC, you could use something as simple as
a pushbutton or two to ramp the setpoint up and down, and the output
of the sensor to cause the µC to servo about that point.
For example, let's say that you have one pushbutton which causes the
light to get brighter, another which causes the light to grow
dimmer, and that you've held one of them down (or repeatedly pressed
and released one of them) until the illumination in the room is at
the level you want.
Now, when you release the pushbutton and the illumination in the
room changes because of, say, the sun shining into the room through
a window, later, the output from the sensor will increase and the µC
will dim the light until the output from the sensor is as it was
when the pushbutton was released.
--
JF
I'm not quite clear about what your saying, and I'm not sure that it
addresses my problem.
I'm already planning a control panel (cf. your push buttons) to adjust
the setpoint, which will be a combination of the ambient light and
that provided electrically. However, what I need is a way to control
the electric light level from the PIC. It should be pretty simple to
work out an algorithm to decide how much power to put into the light
bulb (or how much voltage across it - could be done several ways) but
that's not what I need help with: what I'm asking is how to control
the level of the bulb using an output from the PIC. Ideally, this
would be a digital output, but I'm happy to do use a DAC if necessary.
Perhaps you could clarify a little...
.
- Follow-Ups:
- Re: Specifying a relay to control lights etc.
- From: John Fields
- Re: Specifying a relay to control lights etc.
- References:
- Specifying a relay to control lights etc.
- From: scouselad
- Re: Specifying a relay to control lights etc.
- From: John Fields
- Re: Specifying a relay to control lights etc.
- From: scouselad
- Re: Specifying a relay to control lights etc.
- From: John Fields
- Specifying a relay to control lights etc.
- Prev by Date: Re: PIC Assembler.
- Next by Date: Re: Specifying a relay to control lights etc.
- Previous by thread: Re: Specifying a relay to control lights etc.
- Next by thread: Re: Specifying a relay to control lights etc.
- Index(es):
Loading