Light switch sensing


Closed Thread
Results 1 to 14 of 14

Hybrid View

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

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


    Did you find this post helpful? Yes | No

    Default

    Will give it a go thanks, if it has little to do with capacitance, why do you think the apparent current goes up 10% when I start to dim the bulb? I agree that the apparent current seems strange since the capacitance of the lamp wiring I'm currently using is only 500pF, but I thought that it's possible that those currents could be since it's going from zero volts upto possibly three hundred volts nearly instantaneously, rather than following a curve. The other thing that I thought I should try is to only read the current shortly after triggering the triac, currently I'm charging a cap from the opamp and reading this whenever.
    Thanks

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


    Did you find this post helpful? Yes | No

    Default

    Yes, the risetime when the triac fires is pretty quick, but I'll bet that still won't give the current levels you are measuring. Look at the risetime on a scope and calculate it yourself. I = C* dv/dt "I" in amps, C in Farads, dv/dt in volts per second

    I still think your setup is showing you PEAK, not average current.

    Peak current can easily go up with reduced duty cycle. Consider the fact that if you were firing the triac at 60 degrees into the cycle, the bulb would not be at full brightness. Since the filament would be colder than normal, its resistance would be lower than the normal operational value (tungsten resistance is inversely proportional to temperature). The peak voltage (at 90 degrees phase angle) would still be the same as before, and working into the lower resistance of the colder filament, the peak current would be a bit higher.

    One other thing comes to mind: I'm not an expert in current transformers, but is it possible that they have a frequency-response component to their operation - that is, if the frequency goes up, their output does as well? If that is the case, the short risetime when the triac conducts would look like a high frequency signal and couple better than the normal 60 (50?) Hz stuff.

    Whenever I need to measure current, I use a Hall-effect device. It has perfect isolation, near perfect linearity, doesn't cost much, and Doesn't have any "funnies" that I have to deal with.
    Charles Linquist

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Sometime current transformer are great, sometime, when misplaced and/or not properly insulated they can ruine your life and reading... just think what happen if they're located to close of a transformer, or close to a switching power supply, or, or, or.

    EDIT: Did you place any kind of load at the output of your current transformer before sending it to your op-amp???
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi,

    See picture below.

    Best regards,

    Luciano

    Attached Images Attached Images  
    Last edited by Luciano; - 20th July 2006 at 12:37.

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


    Did you find this post helpful? Yes | No

    Talking

    Thanks Luciano,

    I had thought of that initially, but disregarded it as the TRIAC would have to be off at the same time as the light bulb is on. But seeing your picture made me think about it, and I figured that I can just measure the voltage there just after zero crossing and before I trigger the triac - either that or charge a little cap through a diode and read the cap anytime. Makes it a really simple circuit too!! Will try it as soon as I get back from holiday - am off to Fiji for a week, BULA!!!

  7. #7
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by George
    ... or charge a little cap through a diode and read the cap anytime.
    Yes, this was the idea.

    * * *

    AN521 Interfacing to AC Power Lines
    http://ww1.microchip.com/downloads/e...tes/00521c.pdf

    AVR182: Zero Cross Detector
    http://www.atmel.com/dyn/resources/p...ts/doc2508.pdf

    * * *

    Enjoy your holiday!

    Luciano

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