1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Zero crossing detector for Subzero

Discussion in 'Electronic Projects Design/Ideas/Reviews' started by Roff, Jul 29, 2003.

  1. Roff

    Roff Well-Known Member

    Joined:
    May 16, 2003
    Messages:
    7,757
    Likes:
    89
    Location:
    Idaho, USA
    Here is a way you can get the trigger pulse for your 555 and also use the transformer and bridge to provide the DC for the rest of the circuit. If you have a alternate source of DC, I have a couple of slightly simpler ideas for you.
     

    Attached Files:

  2. subzero349

    subzero349 New Member

    Joined:
    Jun 27, 2003
    Messages:
    90
    Likes:
    1
    thank you ron, I do have an alternate source for dc, can you please post the simpler circuits? :)

    basically I want to do 2 things:

    1. use the 555 to control the intensity of a 120V ac light bulb (or small motor)

    2. use a PIC microcontroller to control the intensity of the same thing...

    I want to start with the 555 and than move on to using a microcontroller instead...
    I have a question: do you need to detect the zero crossings and make sure the pulses start on the zero crossings? Can you clarify exactly what a triac is actually doing??

    Any help would be greatly appreciated
     
  3. subzero349

    subzero349 New Member

    Joined:
    Jun 27, 2003
    Messages:
    90
    Likes:
    1
    alright, I have constructed the above circuit! (i used a seperate dc source instead of the regulator circuit)

    it works pretty good... if a put vcc=12V
    than I get a nice 5 volt square wave trigger signal (high for about 8ms and low pulse for about 1ms)

    Can you please explain the function of the transistors in this circuit?
    are they just to make the signal stronger and square?
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. subzero349

    subzero349 New Member

    Joined:
    Jun 27, 2003
    Messages:
    90
    Likes:
    1

    is there anything I could change to make the 1ms pulse smaller?
     
  6. Roff

    Roff Well-Known Member

    Joined:
    May 16, 2003
    Messages:
    7,757
    Likes:
    89
    Location:
    Idaho, USA
    The triac is a solid-state switch which will conduct in either direction, hence its use in AC circuits. Once triggered, it will stay on until the current goes to zero, which is every half cycle, so you need to retrigger it every half cycle. The average power to the load can be varied by adjusting how long you wait after each zero crossing before turning the triac on. This is the job of the 555 in your circuit. The zero crossing detectors you have seen recently (Fairchild's and mine) simply generate a negative-going pulse which starts just before the zero crossing. This immediately triggers the 555. At the end of the 555's timeout, the triac turns on, and stays on until the next zero crossing, where the absence of current causes it to turn off.
    While it's true that a short pulse will theoretically allow you to trigger the triac earlier in the next half cycle, in fact it won't turn on anyway until the voltage reaches a certain minimum value, even if you have applied a pulse to the gate which starts at the very beginning of the half cycle.
    I don't think you need a shorter pulse. You can knock a few tenths of a millisecond off the width by changing the resistor between the bridge and the base from 100k to 10k or so.
    The transistors do exactly what you surmised - they provide gain, which gives you a nice pulse with fast transition times. The first transistor gives a pretty good-looking pulse, but it needs to be inverted. The second one does that and improves the transition times.
    The other circuits, posted below, have slower transition times, which should be OK. The pulse width on zero_xing8 (the top one) is on the order of 200 to 300 microseconds.
    You can also use a bridge rectifier and a comparator to get almost any pulse width you want.
     

    Attached Files:

  7. subzero349

    subzero349 New Member

    Joined:
    Jun 27, 2003
    Messages:
    90
    Likes:
    1
    thank you very much Ron...

    so if I have a nice square wave that pulses low on every zero crossing, and i wanted to make a light bulb 50% bright....

    I could use a PIC to take in the zero cross pulse and every time it goes low I could time for 4ms and than pulse an "on" for the triac... than the next low pulse I would do the same thing... right?
     
  8. Roff

    Roff Well-Known Member

    Joined:
    May 16, 2003
    Messages:
    7,757
    Likes:
    89
    Location:
    Idaho, USA
    Sounds good to me!
     
  9. subzero349

    subzero349 New Member

    Joined:
    Jun 27, 2003
    Messages:
    90
    Likes:
    1
    Ron:

    I really appreciate all of the help you have given me on this matter... I have searched the internet high and low and I have found the information regarding triacs is very limited (at least to someone with my limited knowledge base).

    Thank you for helping me understand how triacs work and how to detect zero crossings so I can control the phase of the triacs.

    Within the next month I hope to create a webpage detailing some important information on triacs and triac circuits. I want the next person who has to build this kind of circuit to find it on the net right away!
     
  10. Roff

    Roff Well-Known Member

    Joined:
    May 16, 2003
    Messages:
    7,757
    Likes:
    89
    Location:
    Idaho, USA
    I have a confession to make. I have never used a triac! However, I'm an old dude with a lot of experience in analog design, and have read a lot about triacs since they were invented about 40 years ago.
     
  11. subzero349

    subzero349 New Member

    Joined:
    Jun 27, 2003
    Messages:
    90
    Likes:
    1
    well... lets hope you're right... I'll be testing the triac portion today...
    at least I know the zero crossing detector works :)
     
  12. Roff

    Roff Well-Known Member

    Joined:
    May 16, 2003
    Messages:
    7,757
    Likes:
    89
    Location:
    Idaho, USA
    Well, I explained how triacs work, but fortunately I didn't design that portion of your circuit. If it doesn't work, blame Fairchild!

    PS I hope you survive the test. You didn't seem to take my warnings about grounding too seriously.
     
  13. subzero349

    subzero349 New Member

    Joined:
    Jun 27, 2003
    Messages:
    90
    Likes:
    1
    thanks... I have the zerocrossing detecting circuit hooked up and running... no electricution yet...

    I already have a triac circuit working... (just in on/off mode controlled by a PIC) i just need to program the PIC to pulse the triac when it needs to...

    I think everything is safe, but can you please clarify the warning? I'm not sure I understood it fully...
     
  14. Roff

    Roff Well-Known Member

    Joined:
    May 16, 2003
    Messages:
    7,757
    Likes:
    89
    Location:
    Idaho, USA
    Sub, this grounding issue is sorta complicated. The design as it stands probably is not dangerous to use, but as with any AC line powered circuit, it is dangerous to test. If you happen to touch the high side of the line (the black wire) while you are touching something that's grounded, you can be electrocuted, or at least receive a nasty shock. The way to protect yourself is to get power from a ground fault circuit interrupter (GFCI) outlet. The problem with Fairchild's circuit is that it will trip a GFCI as soon as you turn on the power. The way to avoid this is to remove the connection which goes from the plug ground to the low side of the AC line. Instead, connect the plug ground to the circuit ground on your controller.
    To understand why the GFCI will trip with the circuit wired as shown in the app note, you have to know how GFCI's work. GFCI's will trip an internal breaker if the current into the load (motor) through the black (hot) wire is not exactly the same as the current returning through the white (neutral) wire. Remember that the neutral returns to earth ground at the breaker box. With a GFCI powered circuit, if you are grounded and touch the hot side of the line, you provide an alternate current path to ground, which reduces the current in the neutral wire. The GFCI will instanteously detect this imbalance between currents in the hot and neutral wires, and will trip the circuit breaker in the GFCI, saving your skin. With the ground (green) wire connected in parallel with the neutral wire as it is in the app note, the return current will split between the neutral and ground wires. Since the neutral wire carries less current than the hot wire, the GFCI breaker will trip. This is not dangerous in itself, but it will force you to use a non-GFCI outlet if you want to be able to test your circuit, and therefore you won't be protected.

    Whew! :)
     
  15. kinjalgp

    kinjalgp Active Member

    Joined:
    Oct 28, 2002
    Messages:
    1,851
    Likes:
    3
    Location:
    INDIA/USA
    Use opto-coupler (MOC3011) for added safety. Using it atleast the low voltage side of your circuit will be safe for tocuhing while its on.
     
  16. Roff

    Roff Well-Known Member

    Joined:
    May 16, 2003
    Messages:
    7,757
    Likes:
    89
    Location:
    Idaho, USA
    The circuit in question is this one. As you can see, it already is optically isolated, although Subzero plans to replace the zero crossing detector/isolator with a transformer and a separare zero crossing detector. I was just trying to explain why he should rewire the ground so he can run it from a GFCI outlet for added safety.
     

Share This Page