Zero-crossing detector?


Closed Thread
Results 1 to 14 of 14

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Recently ive been using this idea. That page describes how to run an LED from the mains but with just the capacitor and resistor you can run an AC input darlington opto. Ive been using this method for detecting the presence of AC but it should work fine to detecting a zero crossing too.

    I always use an opto for safety. I did try a huge resistor feeding directly into the PIC which seemed to work fine till i connected the PIC to my laptop through serial and the laptop turned itself off.

    My prefered method is to use the 12V coming from the supply transformer. If you can use a transformer for the supply then you only need 2 extra diodes and a resistor to feed into the PIC.

    As for the code, i dont like using oninterrupt but i do use the interrupt flags. The program doesnt have to check the interrupt after each command that way. It checks it when you want.

  2. #2
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Phase shifts the zero cross

    Hi,

    The zero-cross sensing is mostly used for phase angle control. The Master The circuit you mentioned would essentially phase shift the zero cross signal.

    BTW if you replace this idea with this idea then you get more ideas. Like this idea

    Thanks to the author of the site and The Master
    Last edited by sougata; - 11th August 2009 at 15:00. Reason: Found out later
    Regards

    Sougata

  3. #3
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by The Master View Post
    I always use an opto for safety. I did try a huge resistor feeding directly into the PIC which seemed to work fine till i connected the PIC to my laptop through serial and the laptop turned itself off.
    For ZC, the resistor is adequate given the PIC has clamp diodes on the inputs. If you need mains isolation for RS232, use optos in the RS232 lines.

Similar Threads

  1. Replies: 6
    Last Post: - 10th September 2008, 10:04
  2. Crossing Page Boundary - Solution
    By Darrel Taylor in forum FAQ - Frequently Asked Questions
    Replies: 1
    Last Post: - 24th November 2007, 02:52
  3. IR detector
    By geckogrotto in forum mel PIC BASIC Pro
    Replies: 28
    Last Post: - 30th August 2006, 03:16
  4. Crossing Page Boundary .....
    By turkuaz in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 20th March 2006, 07:57
  5. error on compiling
    By parker in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 16th June 2005, 14:31

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