+ Post New Thread
Results 1 to 17 of 17
  1. #1
    Newbie level 4
    Points: 75, Level: 1

    Join Date
    Oct 2018
    Posts
    6
    Helped
    0 / 0
    Points
    75
    Level
    1

    Zero Crossing Detector

    What is the exact use of zcd circuit in dual converter using thyristors ? Is it used for generating pulse or pulse can be generated using by PIC itself ?

    •   AltAdvertisement

        
       

  2. #2
    Super Moderator
    Points: 79,953, Level: 68
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    13,093
    Helped
    4377 / 4377
    Points
    79,953
    Level
    68

    Re: Zero Crossing Detector

    Normally ZCD is used to produce a pulse for synchronizing the software operations with the incoming AC waveform. For triggering thyristors the pulse needs to be offset from the start of the AC waveform by some delay, the ZCD gives it a reference point in the waveform to start the delay from. After the delay, the PIC may produce the trigger to the thyristor itself.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  3. #3
    Newbie level 4
    Points: 75, Level: 1

    Join Date
    Oct 2018
    Posts
    6
    Helped
    0 / 0
    Points
    75
    Level
    1

    Re: Zero Crossing Detector

    Thank you so much sir. But then, does ZCD circuit needs any coding? I'm am working on dual converter using thyristors. I'm not able to understand the logic for coding.

    And please sir can you explain the ZCD circuit's working. I've uploaded the picture of ZCD circuit that I will be using.

    Click image for larger version. 

Name:	zcd.png 
Views:	21 
Size:	123.6 KB 
ID:	149837



  4. #4
    Super Moderator
    Points: 75,658, Level: 67
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    15,339
    Helped
    3491 / 3491
    Points
    75,658
    Level
    67

    Re: Zero Crossing Detector

    Hi,

    There are so many threads in this forum and in the internet, code examples, tutorials, even videos...
    Design notes, descriptions, flow charts...
    Did you go through some of these free sources of information?
    What of these informations did you use?

    Did you recognize the box below "similar threads"?

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  5. #5
    Super Moderator
    Points: 79,953, Level: 68
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    13,093
    Helped
    4377 / 4377
    Points
    79,953
    Level
    68

    Re: Zero Crossing Detector

    ZCD is a hardware function, it produces an electrical signal that is read in by your PIC so it knows the state of the AC line.

    I am greatly concerned by the wording in your schematic "LINE" and "NEUTRAL", if these are the AC power lines you should expect considerable smoke, anything more than about 25V RMS at the input will damage the regulator and surrounding components. Also be aware that if it is working from the AC power lines, it has no isolation and therefore presents a lethal risk of electric shock unless the whole thing is entirely enclosed in an insulating box.

    How it works is simple, the two bridge rectifiers (which you can simplify down to one) convert the AC to DC. BR1 is then used to maintain charge across C6/C7 to provide power for the regulator. BR2 has no filter capacitor so the voltage at it's output drops to zero as the AC passes transits between positive and negative polarities. When the voltage is above about 0.7V, it lets current flow through R1 to make Q1 conduct. The idea is that Q1 conducts all the time except when the voltage from BR2 is below 0.7V so it produces a pulse output around the zero voltage crossing point.

    I think it would be advisable to add another resistor of about 330K between the base of Q1 and it's emitter to be certain it turns off adequately, otherwise residual charge might leave it conducting longer than wanted.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  6. #6
    Advanced Member level 2
    Points: 2,863, Level: 12
    baileychic's Avatar
    Join Date
    Aug 2017
    Posts
    564
    Helped
    49 / 49
    Points
    2,863
    Level
    12

    Re: Zero Crossing Detector

    The circuit provided by OP is mine. In that LINE and NEUTRAL represents Low voltage connections that is it is the output of 0-15V transformer if I remember right. In Simulation I had used BR1 with ZCD circuit but due to 1000 uF 63V capacitor at output of BR1 I was not getting ZC signal and so I used a separate bridge for ZCD circuit which provided the required signal.



  7. #7
    Super Moderator
    Points: 79,953, Level: 68
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    13,093
    Helped
    4377 / 4377
    Points
    79,953
    Level
    68

    Re: Zero Crossing Detector

    The simplification I was thinking of is to use a single diode between BR1 (+) and C6. The waveform at BR1 would then be the same as from BR2 and the diode would block the charge from C6 leaking back.

    With 15V from a transformer secondary it should be fine but labels of LINE and NEUTRAL can be misleading as they imply a direct mains connection.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



    •   AltAdvertisement

        
       

  8. #8
    Advanced Member level 2
    Points: 2,863, Level: 12
    baileychic's Avatar
    Join Date
    Aug 2017
    Posts
    564
    Helped
    49 / 49
    Points
    2,863
    Level
    12

    Re: Zero Crossing Detector

    I found my circuit which I had posted here sometime ago. I had not done any mistake in naming the connections. I had named LV LINE and LV NEUTRAL. Find the attached Proteus Simulation.

    @Karmajeet

    Yes, you need to write code using external interrupts and timer interrupts.

    Proteus 8.8 SP0 is needed to open the simulation file.

    ZCD circuit doesn't generates SCR gate trigger pulses. It provides pulse when AC mains voltage crosses 0. You need ZCD to start counting the delay before firing the SCR to get required firing angle or conduction angle.
    Last edited by baileychic; 5th November 2018 at 09:04.



    •   AltAdvertisement

        
       

  9. #9
    Newbie level 4
    Points: 75, Level: 1

    Join Date
    Oct 2018
    Posts
    6
    Helped
    0 / 0
    Points
    75
    Level
    1

    Re: Zero Crossing Detector

    you have used Vdd and Vss but it is not connected in PIC. So what is the use of that ? Also I'm not getting pulsated DC from ZCD but the output of Full bridge rectifier circuits. Can you Please help me ?

    Click image for larger version. 

Name:	zcd.png 
Views:	4 
Size:	218.2 KB 
ID:	149894Click image for larger version. 

Name:	zcd.png 
Views:	4 
Size:	218.2 KB 
ID:	149894



  10. #10
    Newbie level 4
    Points: 75, Level: 1

    Join Date
    Oct 2018
    Posts
    6
    Helped
    0 / 0
    Points
    75
    Level
    1

    Re: Zero Crossing Detector

    Thank you but can you share the code with me please ? I'm quite running on the deadline. It would be great if you could help me or atleast share the logic for coding.



  11. #11
    Advanced Member level 2
    Points: 2,863, Level: 12
    baileychic's Avatar
    Join Date
    Aug 2017
    Posts
    564
    Helped
    49 / 49
    Points
    2,863
    Level
    12

    Re: Zero Crossing Detector

    Zip and post your Proteus file here.

    PIC or any MCU pins in Proteus are hidden and they are connected to VDD and VSS that is 5V and 0V (GND) in power rails configuration by default. I have used 10uF and 100nF capacitors to connect between PIC power pins.

    ZCD doesn't give pulsated DC. Pulsated DC is th einput to ZCD circuit and the output is a pulse (short pulse).

    In my scope data, the yellow signal is the LV AC (transformer output) = 24V AC 50Hz.
    Red signal = Pulsated DC input to ZCD circuit.
    Green signal = ZC pulses.

    What motor or load you are trying to control ? 12V, 24V, 36V, 48V, 200V DC ?

    What is the current rating of the motor or load ?

    Are you only simulating or do you have the hardware ?
    Last edited by baileychic; 6th November 2018 at 08:32.



  12. #12
    Super Moderator
    Points: 75,658, Level: 67
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    15,339
    Helped
    3491 / 3491
    Points
    75,658
    Level
    67

    Re: Zero Crossing Detector

    Hi,

    As already mentioned: a resistor across BE of the bjt will improve ZCD operation.

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  13. #13
    Advanced Member level 2
    Points: 2,863, Level: 12
    baileychic's Avatar
    Join Date
    Aug 2017
    Posts
    564
    Helped
    49 / 49
    Points
    2,863
    Level
    12

    Re: Zero Crossing Detector

    Modified ZCD circuit according to betwixt and KlausST.



  14. #14
    Newbie level 4
    Points: 75, Level: 1

    Join Date
    Oct 2018
    Posts
    6
    Helped
    0 / 0
    Points
    75
    Level
    1

    Re: Zero Crossing Detector

    I've attached my proteus file. I've used your HEX file for PIC. Aim of my project is to control speed and direction of a 12V DC motor using 2 push buttons. One push button will change(decrease from max) speed in steps when pressed and another button will change the direction of rotation. First I need to run simulation, and once it is error free I have design the same in hardware. I've only 2 weeks for my software simulation. Please, I need your help.
    Last edited by karmajeetsinh; 6th November 2018 at 09:52.



    •   AltAdvertisement

        
       

  15. #15
    Super Moderator
    Points: 75,658, Level: 67
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    15,339
    Helped
    3491 / 3491
    Points
    75,658
    Level
    67

    Re: Zero Crossing Detector

    Hi,

    I've only 2 weeks for my software simulation. Please, I need your help. Please can you share me the code in a word file ?
    A forum is not meant that others do your job.
    If you want others to do your job you should consider to pay for it.

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  16. #16
    Super Moderator
    Points: 79,953, Level: 68
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    13,093
    Helped
    4377 / 4377
    Points
    79,953
    Level
    68

    Re: Zero Crossing Detector

    I suggested R28 = 330K, not 2K !

    It is there to ensure leakage through the transistor and rectifiers is pulled to ground quickly when the waveform is close to zero volts. By using a much lower resistance the potential divider of R1 & R28 prevents the transistor turning on until a higher voltage is present so the pulse is wider than necessary.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  17. #17
    Advanced Member level 2
    Points: 2,863, Level: 12
    baileychic's Avatar
    Join Date
    Aug 2017
    Posts
    564
    Helped
    49 / 49
    Points
    2,863
    Level
    12

    Re: Zero Crossing Detector

    @betwixt

    Yes, you are right, I changed to 330k.



--[[ ]]--