Controlling Christmas lights (AC->DC)

Discussion in 'General Electronics Chat' started by JBmtk, Aug 25, 2009.

  1. JBmtk

    Thread Starter Member

    Jun 29, 2009

    I have this circuit built (the bottom one) and working and I was wondering if it could be possible to control Christmas lights using it. I figure to have a full wave bridge setup to output to DC, however would the DC need to be 120V for the bulbs? I am not sure if the lights are LEDs or regular bulbs, would it still work.

    To make myself clear, the "VU" pad is where the negative side of the LEDs attach to and the whole point of the circuit is to pulse with music.
  2. mik3

    Senior Member

    Feb 4, 2008
    By control you mean flashing them at various rates?

    Or just turn them on and after (for example 20 mins) turn them off?
  3. kkazem

    Active Member

    Jul 23, 2009
    Hi JBmtk,

    I looked at your ckt and if you say that the output FET is switching properly, then you can use that as a control for the XMAS lights. However, there are a few issues I need to bring to your attention. First, your idea about using a diode bridge is right on track, but you'll want to connect the load (Xmas lights) to the AC side of the bridge (See Attached PDF schematic). In this circuit, the load still gets 120 VAC, 60 Hz, but it's controlled thru a standard MOSFET. I picked the IRF740, but any MOSFET with VCC>=350V & Id>=10A can be used. In the arrangement I designed, the lights will be normally on until the Q1 (VU) FET from your controller is turned on, after which the lights will be off. You can modulate the lights with music if your modulation frequency isn't too high, or else you'll need a better FET drive circuit between the optocoupler and the M1 power FET.

    Use caution when operating this circuit from a 120 VAC line. There are several safety measures I designed-in and I'll explain them. First, and often overlooked in breadboards and small projects is the AC fuse. One should never connect directly to the AC line without a fuse in at least one side of the line. I designed-in a 5A fuse, but the actual value of fuse current will depend on how much load current you use. Next, is a small bias transformer for getting teh low bias voltage needed to switch the M1 FET. This is safer and more straightforward than using a dropping resistor from the AC line. Note that the LM78L12 3-terminal regulator is optional. I recommend it and it is inexpensive, but you most likely can get by without it. THen there is the optocoupler. This gives you aboutr 3,750 V of isolation between the 120 VAC side of the circuit and your low-voltage control circuit with the VU output. It is highly dangerous to use this circuit without the optocoupler and transformer. You should be able to run up to about 10 Amps of Christmas Lights of any type that runs off of 120 VAC using this circuit. And the control section with the VU output will be safe to touch when running since it is completely galvanically (resistively) isolated from the 120 VAC line. For the T1 transformer, you can use one of the black, self-contained plug-in types. If it has a DC output instead of an AC output, then you won't need the BR2 Diode Bridge. IF you are going to modulate it at higher frequencies, then youll need to use a MOSFET driver IC like the Microchip TC426 (dual inverting), TC427 (dual non-inverting), or TC428 (one inverting & one non-inverting).

    That's about it. Again, take extreme caution when testing this on the 120 VAC power line. Use a VARIAC or an AC Source if available so that you can dial the AC voltage up slowly from 0 to 120 VAC. THis way, you can avoid exploding semiconductors, etc.

    Good luck.
    Kamran Kazem
  4. JBmtk

    Thread Starter Member

    Jun 29, 2009
    Thank you so much kkazem for your pretty much did my homework:). Thank you for the detailed schematic as well as the tips for beginners as myself. I am going to build this and get back to this thread to post the success.

    I am going to use, like you suggested, a pre-built wall transformer and get rid of the voltage regulator and the cap, but may put them back in if there is a noticeable flicker from the ripple of the adapter. In your original design, you have setup a voltage regulator to power down and clean the voltage coming out from the bridge down to 12V, but the voltage out from the bridge is a little less than 9V....
    Last edited: Oct 16, 2009
  5. JBmtk

    Thread Starter Member

    Jun 29, 2009
    Here is my circuit and was wondering if that would work. I would like the lights to be off when not being pulsed so I got rid of the pull up resistor and source. Instead, I used a comparator that would have the refrence set to GND and sense the diode drop in the opto-isolator and would swing high enough to overcome the IRF540 2.5V forward voltage, hence completing the AC circuit.

    also had a question on the 120V you mean the grounding prong?
  6. Audioguru


    Dec 20, 2007
    Your Mosfet is connected upside-down. There are many other problems that will also blow up your circuit.
  7. JBmtk

    Thread Starter Member

    Jun 29, 2009
    funny that you say that because it already has once, but by trying out kkazem circuit. The IRF540 got completely destroyed. I was going to use a Variac to test my circuit to try and eliminate explosions. Still wondering what is wrong with kkazem setup though...