Remote Mains PWM


Closed Thread
Results 1 to 20 of 20

Hybrid View

  1. #1
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697

    Default Remote Mains PWM

    Hi, Ive got a circuit that outputs a PWM signal. The PWM is synchronized with the AC sinewave and the signal is sent to a triac which controls a light that is plugged in elsewhere. The circuit cant seem to control the lights properly. If i simply turn them on and off then everything is fine but when using PWM the lights flash or dont turn on at all.

    Ive checked the circuit and ive checked the code. Everything seems to be fine but before wasting more time debugging it i want to check if what im doing is possible. The controller takes the sinewave input from the transformer that powers it. The controller and lights are plugged into different mains sockets but all in the same room of the house. Is it possible that the sinewave is offset at the different sockets? Normally i would supply the controller and lights from a single socket but its not possible in this case.

    Is it worth spending time checking out the circuit and code or will it simply not work in this way?

  2. #2
    Join Date
    Oct 2005
    Location
    Loveland CO USA
    Posts
    83


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by The Master View Post
    The controller and lights are plugged into different mains sockets but all in the same room of the house. Is it possible that the sinewave is offset at the different sockets?
    Likely there are two different phased in the same room. They should be 180 out. I thought 180 off will not upset a triac.

  3. #3
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    When you say "180" do you mean 180 degrees offset? That would normally be fine as the controller has 2 diodes and looks at the DC ripple and the triacs operate in AC anyway.

    By the way, all sockets in this room are on the same ringmain. The only difference is the length of wire between each socket and the consumer box

  4. #4
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    One issue I can see; if you are detecting the zero crossing referenced from the transfomer secondary, there is likely to be a slight phase difference.

    Also, is the objective of the circuit to adjust the intensity? If that is the case, why use PWM? That is likely cause a lot of trouble, and unlikely to work. All you need is a fixed pulse (say 200 uS); depending on how much after the zero crossing the pulse is given, the triac will control the bulb's intensity.

    Regards,

    Anand Dhuru

  5. #5
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    The phase difference from the transformer shouldnt cause a problem. Ive made circuits like these before but usually the circuit and the bulbs are powered using a single wire.

    The purpose of the PWM is so i can adjust the brightness of the lights from a PC

  6. #6
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,604


    Did you find this post helpful? Yes | No

    Default

    Hi,
    They should be 180 out. I thought 180 off will not upset a triac.

    I'm pretty sure there are three phases, shifted 120°, 230VAC between each phase and neutral and 400VAC from phase to phase in the UK. (At least that is what we have here) But please do correct me if I'm wrong!

    Anyway, if the outlet providing the reference (zero crossing) and the outlet actually providing the current to the load is not on the same phase it won't work properly because they are not "in phase" - obvioulsy.

    Can't you just, as a test, power the load from the same outlet as the control circuit just to see if it works or not.

    /Henrik.

  7. #7
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    966


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by The Master View Post
    Hi, Ive got a circuit that outputs a PWM signal. The PWM is synchronized with the AC sinewave and the signal is sent to a triac which controls a light that is plugged in elsewhere. The circuit cant seem to control the lights properly. If i simply turn them on and off then everything is fine but when using PWM the lights flash or dont turn on at all.
    ...snip....
    Is it worth spending time checking out the circuit and code or will it simply not work in this way?
    You cannot/shouldn't control a Triac via PWM. A triac once switched on, turns off only at the zero crossing. That could explain the fluttering instead of controlling. The proper approach would be phase-angle-firing the triac.

  8. #8
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    I am using "phase-angle-firing" but i just call it PWM since it is PWM that is synced with the zero crossing. Like i said, ive made these kind of circuits before. This circuit is actually based on the last one i made which still works perfectly (i even copied some of the code). The only difference is the last one had the triacs on the same PCB as the chip and transformer and this new circuit has the triacs seperate.

  9. #9
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    966


    Did you find this post helpful? Yes | No

    Default

    what kind of distance are we talking of between the driver and the triac? Are you seeing ground loop issues? False firing?

  10. #10
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    The controller and all of the lights are plugged into various sockets in the same room (its my kitchen so not very big).

    I dont think there should be any ground loop issues. I use opto isolators with each triac. The controller outputs about 5V into a wire that is about 3M long. That wire connectes through a diode and a resistor to the opto which then controls the triac.

    I dont get any false firing. When the controller says the lights are off then they stay off. If it turns them completely on then they stay on. I only see the problem when PWM is enabled. I even tried programming the PIC to set the state of the outputs to match the zero crossing and put the code in a tight loop. In this case i would expect all of the lights to be permenantly on (maybe very slightly dimmed) but they still flicker or dont turn on at all.

    Each output also has an LED. The LEDs are powered from the same transformer as the PIC and they appear to fade correctly

  11. #11
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    966


    Did you find this post helpful? Yes | No

    Default

    Can you put up a small sketch of what your setup looks like? It's a little hard to figure it out in text.

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