Light switch sensing


Closed Thread
Results 1 to 14 of 14

Hybrid View

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

    Default Light switch sensing

    I've built a device that you plug your bedside lamp into, and after a preset time, it slowly dims down to a preset value (upto as far as not being illuminated) the trick is... I have to be able to sense the light switch at any phase of the operation - if switched off - then timer etc resets. I've done this by winding a current transformer and putting output to an opamp. However this has some drawbacks, namely if the amp is set too sensitive it gets triggered during the dimming phase soley by the capacitance in the lead and on the other hand not sensitive enough and it doesn't pick up lightbulb when either fully on or pretty much off - you can tune it so it works with a bulb of a certain wattage and a lead length of a certain amount - but not ideal!!! Any other ways anyone can think of for sensing when the light is turned on/off? I was thinking about trying to send a 5v pulse down the wire at every zero crossing to pick up if switch is on or off - but am a little unsure if it will work or how exactly to do it. Any ideas would be really appreciated.

    Cheers

  2. #2
    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

  3. #3
    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 00:36.

  4. #4
    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

  5. #5
    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

  6. #6
    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

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, 17:32
  2. A/D on 16F767 for light tracking.
    By Ryan7777 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 10th November 2007, 05:56
  3. Replies: 14
    Last Post: - 26th September 2007, 05:41
  4. PIC10F200 Automated IR Light Switch
    By Bruce in forum Code Examples
    Replies: 7
    Last Post: - 3rd May 2007, 11:40
  5. Newbie - 16F628A and switch latching
    By malc-c in forum mel PIC BASIC Pro
    Replies: 45
    Last Post: - 19th May 2006, 02: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