Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] Zero Crossing Detector

Status
Not open for further replies.

karmajeetsinh

Newbie level 4
Joined
Oct 4, 2018
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
55
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 ?
 

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.
 

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.

zcd.png
 

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
 

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.
 

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.
 

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.
 

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.
 

Attachments

  • Dual Converter.rar
    140.5 KB · Views: 70
Last edited:

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 ?

zcd.pngzcd.png
 

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.
 

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 ?
 

Attachments

  • DC1.png
    DC1.png
    84.2 KB · Views: 86
Last edited:

Hi,

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

Klaus
 

Modified ZCD circuit according to betwixt and KlausST.
 

Attachments

  • DC2.png
    DC2.png
    126.8 KB · Views: 101

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.
 

Attachments

  • Desktop.rar
    34.1 KB · Views: 68
Last edited:

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
 

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.
 

@betwixt

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

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top