Light switch sensing


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Smile

    Hi George,

    www.Smarthome.com has 2-way X-10 devices that can tell you the status of the device you are controlling. But if you want to continue on with building your project yourself, Micromint sells a chip called the PLIX. It handles al of the X-10 coding so you don't have to. The chip is available both in parallel and serial configurations. Check out www.Micromint.com for more details. They have examples of using a PIC with the serial device and the parallel device is for use with your PC.

    BobK

  2. #2
    Join Date
    Oct 2005
    Location
    New Zealand
    Posts
    171


    Did you find this post helpful? Yes | No

    Default

    Thanks, tho I'd like to build myself, just for the experience if nothing else! I'm thinking of setting up an oscillator which will send a tone down the line at every zero crossing, however I'm not sure on how to receive the tone on the other end due to mains potential. So basically I have a triac powering - just before I fire the triac I'll be listening for the tone on the output of the lamp, if the switch on the lamp is turned off, no tone should come back.

    Does anyone have any ideas how I can isolate that nasty mains potential either side of my the lamp circuit (bear in mind also that there will be rapid voltage transitions when in the middle of dimming.

    Thanks
    Last edited by George; - 14th July 2006 at 01:36.

  3. #3
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Hi Bob,

    Why not look for the 50/60 hz pulse itself, taken from the live side, and thru' an opto?

    Or am I missing what your reuirement?

    Regards,

    Anand

  4. #4
    Join Date
    Oct 2005
    Location
    New Zealand
    Posts
    171


    Did you find this post helpful? Yes | No

    Default

    Because if the triac has the light on, you won't see it as that side will be grounded, you could do it if you missed a pulse now and then - but you would also see that by the light flickering.

    Thanks

  5. #5
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    Have you thought about using a Hall-effect current sensor. The output is directly proportional to the current, and can be heavily filtered eliminating any noise from the switching.
    Charles Linquist

  6. #6
    Join Date
    Oct 2005
    Location
    New Zealand
    Posts
    171


    Did you find this post helpful? Yes | No

    Default

    Yeah I have thought about that - but figured that it wouldn't be much different to what's happening now with my current transformer. With a 100W lamp on at 100% the current through a multimeter is 390mA - curiously as the % drops the current flow rises to a peak of 433mA - this is due to the combined lamp load and the capacitance of the cable when faced with the sharp turnon of the triac part way through the phase cycle. When the lamp has dimmed down to 3W (filament extinguished) there is 135mA of current flowing (this in my mind is the capacitance of the lead) - in perfect world would be 13mA. When the light switch is off and the dimming phase is part way, multimeter reads upto 180mA - which makes it impossible to figure if the light switch is turned on or off by current alone.

    This is why i was figuring I should send some sort of 'tone' down the line and listen for it on the other side - whether it be at zero cross only or all the time, I'm just not quite sure how to do it having such a large potential either side of my circuit.

  7. #7
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    It doesn't sound right.

    I'm sure that the load has little to do with capacitance. The resistance of a filament IS non-linear with respect to applied voltage, however.

    It would appear that the measurements from your current transformer are PEAK readings, not average. Since you are using a triac - even though the lamp is on only part of the time, the peak current won't drop much at lower brightness levels. If you are using a peak detector (diode) on the output of your current transformer - or even a regular voltmeter (which actually shows .707 * Peak reading, rather than true RMS), I would expect the type of readings you are seeing.

    If I was going to continue using the current transformer, I would put a load resistor across it, then feed the output to a diode into a capacitor, and then a resistor across that capacitor. My guess is that if you put a low enough value across that capacitor, you will find that it gives you a good average of the charge current, and is almost linear with respect to brightness.
    Charles Linquist

Similar Threads

  1. Stairwell light code from BS1 to PHP2.50a
    By vtt-info in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 21st December 2007, 18:32
  2. A/D on 16F767 for light tracking.
    By Ryan7777 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 10th November 2007, 06:56
  3. Replies: 14
    Last Post: - 26th September 2007, 06:41
  4. PIC10F200 Automated IR Light Switch
    By Bruce in forum Code Examples
    Replies: 7
    Last Post: - 3rd May 2007, 12:40
  5. Newbie - 16F628A and switch latching
    By malc-c in forum mel PIC BASIC Pro
    Replies: 45
    Last Post: - 19th May 2006, 03:35

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts