PC controlled AC dimmer?

Discussion in 'The Projects Forum' started by CygnusX1, May 3, 2007.

  1. CygnusX1

    Thread Starter New Member

    May 3, 2007
    5
    0
    Hello,

    My goal is to control the lights in my room using my PC's parallel port along with a program. The lights are currently controlled with a Lutron Maestro dimmer. The dimmer has 3 buttons/switches on it: dim, brighten, and on/off toggle. I'll be using all 3 with my PC. So, I soldered some wires onto the leads of the buttons.

    When I tested the lines, I found they vary between 3V and 9V AC. I found some info online about using 2n3904 NPN transistors as control switches instead of using relays, but the tutorials were for DC switches, not AC. I wonder if the AC will damage my computer. So, I thought of using a diode to ground in order to prevent back-flow of current. Will this work? Or would I be better off just using relays? It seems like it may be simpler.

    Please go easy on a newbie. I'm attaching a diagram of my circuit.

    Thanx in advance!
     
  2. CygnusX1

    Thread Starter New Member

    May 3, 2007
    5
    0
    OK... so I kind of answered my own question through a little digging on the web. I found a popular control circuit using a relay/transistor combination, along with a diode and resistor to protect the parallel port. The relay requires an external voltage source, and I was hoping for something a little simpler (like using power from the parallel port).

    If any one has any suggestions, please let me know.

    Thanx!
     
  3. thingmaker3

    Retired Moderator

    May 16, 2005
    5,072
    6
    You might want to try a search on "triac." (You'll need to learn about the "Silicon Controlled Rectifier" prior to understanding the "triac.")
     
  4. lightingman

    Senior Member

    Apr 19, 2007
    374
    22
    Hi.If you are controling your dimmer just by onnecting a device accross the existing buttons, you will be best of doing it with a CD4066 (quad bi-lateral switch).If the dimmer is at mains potential you MUST use opto isolators !!!!!If the signal is AC, you should arange your cicuit and interface it so that the input/outputs and control voltages for the 4066 do not go beond limits.I.E. if the signal that you are controling is AC (lets say 6 volts paek to peak)Then the supply to the 4066 must be at least plus and minus 6 volts.In any case, input signal for the 4066 should never go more that 0.5 volts above or below the supply rails.If controling AC signals with a 4066, the control voltage to each switch should be VSS (off) and VDD (on), so some simple level shifting will be required to run from the port.If you would like a schematic and some ideas for this, let me know and I will design something for you..I will need to know exactly what you need... and details of what you are driving/controling.Good luck.Daniel.
     
  5. CygnusX1

    Thread Starter New Member

    May 3, 2007
    5
    0
    Hello Daniel,

    Thanx for the reply. The voltages on the switch are nowhere near 120- they are more like 3-9V AC. I think the voltage varies as the lights are dimmed/brightened. I've seen circuits with opto-isolators for AC mains switches, but this is relatively low voltage, so I shouldn't need it, right? I did a quick look at the bilateral switch and it looks like essentially multiple transistors in one package, correct? And do you need a supply voltage to control it or does it work at TTL levels? I am curious what a circuit would look like with this, and how involved it is.

    Through my own research, I found a reed relay that only consumes 20mA @ 5V. The one question I have is whether this is too much for the parallel port. If I could use this it would be really simple: just 3 reed relays and 3 diodes to protect from voltage spikes. If not, I could go with the transistor switch controlling a relay with a separate power supply (a familiar design I have seen many times for controlling devices with a PC).

    It looks like I have a few options. I'm trying to choose the best, while gaining some knowledge of circuits at the same time. Thanx for the help!
     
  6. lightingman

    Senior Member

    Apr 19, 2007
    374
    22
    Ok...I understand that the voltage accross each switch may be 3 to 9 volts, but what potential are they above ground.Or are they on a remote control dimmer unit ???give me 2 or 3 hours, and I will post some ideas and schematics on here.Daniel.
     
  7. lightingman

    Senior Member

    Apr 19, 2007
    374
    22
    Sorry I foregot..No.. the port will not sink or source 20mA..You would need a driver (ULN2003), or some transistors to drive the relays.Details soon.Daniel.
     
  8. lightingman

    Senior Member

    Apr 19, 2007
    374
    22
    If you are going to use relays, it would be the easiest way to do it.
    I hve attached a couple of relay drivers that may help.
    The ULN2003's should be easy to get hold of.

    I hope this helps !!

    Daniel.
     
  9. CygnusX1

    Thread Starter New Member

    May 3, 2007
    5
    0
    Fantastic, Lightingman. The ULN2003 is a great idea and I think I will use it as it gives me freedom to easily add more outputs in the future. I'm thinking of getting the voltage for the relay directly from the PC power supply (I'll have a wire coming out of the case, which might look odd, but I don't mind).

    Thanx again for the diagram!
     
  10. lightingman

    Senior Member

    Apr 19, 2007
    374
    22
    Glad I could be of help..Just a note:-If you wish to use all 8 data outputs from the port, you could use a ULN2803 it has 8 drivers.Good luck.Daniel.
     
Loading...