PDA

View Full Version : Interfacing AC power lines



BobEdge
- 23rd March 2007, 09:05
Hi,

Can anyone please tell me if i need to connect the 0V line to neutral, or earth if connecting an input to ac power lines, as described in Microchips app note AN521??

sougata
- 23rd March 2007, 10:50
Hi,

Even if you reverse your phase and neutral the zero crossing detector will work. But be extremely careful while testing your circuit cause fatal voltages are there. Also to make measurements with a scope you need an isolation transformer or a scope with floating inputs (balanced probes perhaps).

mister_e
- 23rd March 2007, 14:55
If it was me... i would use opto-coupler instead. For debugging and development, isolated PIC supply, opto-coupler from the main... few meters away of my face always serves me well :D

If your PIC supply is not isolated of the main, it's another story. If you're using a transformerless PSU (Capacitive dropper) there's few things to know first.

It will help us if you elaborate a little bit more about you app.

sougata
- 23rd March 2007, 15:26
Hi,

I designed a FAN/LIGHT IR remote controller which had a tight BOM (cost) restriction so I had to use a TXR-Less PS and direct AC ZC sense. But for my other projects like thyristor controlled charger, Pro Dimmer I always use an Opto. So I would go with Steve. Infact while development and debug you can use a isolated PS (Txr based) and opto then when through with the code and hair falls convert it to dirt cheap.

BobEdge
- 26th March 2007, 14:30
Hi,

Thanks for your replies.

The application is controlling a 3 phase welder with current feedback giving between 200 & 3000 amps. I already have a working product, but on some sites the welders act strangely. I eventually thought what are the 3 phase inputs refferenced to? So I am now thinking i need to connect the pcb's 0V line to Neutral or earth. Earth would be best since most 3ph supplies dont have a neutral connected in practice.

Bob...

sougata
- 26th March 2007, 14:51
Hi,

If you are doing a phase angle control then make sure you have a EMI/RFI filter between your zero cross sensing path. Using an opto-coupler is a good choice and the LED currents are not that much sensitive to the line noise (third harmonic injection by your thyristor control module). On the photo-transistor side use a constant current source followed by a schmitt trigger buffer. You can also use a low pass filter there. This gives you a rock-solid sync. If you are not doing a phase angle control then make sure you are firing the thyristors right at the zero cross. I use a sustained fence-pulse circuit (using the HPWM module of PIC). And for low current applications I use opto-triacs (both zero cross and non zero cross depending on the application). As far as the field experience goes , phase reversal are common problems that drive the synchronized trigger algo crazy. Post your schematic if possible.

BobEdge
- 26th March 2007, 16:25
Hi,

There is the current feedback, and phase angle thyristor driver drawings.

When the machine switches on U14 figures out the phase rotation, and whether a star star or star delta transformer is being used. As you can see the only connection to the pic's is the primary and secondary windings. There is no connection to neutral or earth. This works fine in most cases, but with certain mig welders nearby the current loses control, & during the weld some thyristors seem to stay open for a cycle, at random intervals. This got me thinking how does the pic detect the zero crossing point when the phase inputs are not refferenced to the pic power supply, I am wondering how it ever worked at all.

Bob...

Luciano
- 26th March 2007, 17:45
Hi,

See page 2 of this PDF.
http://www.atmel.com/dyn/resources/prod_documents/doc2508.pdf

Best regards,

Luciano

sougata
- 27th March 2007, 05:58
Hi,

You mentioned that your circuit works for most of the time. Give me some idea how you have used your zero-cross routine. Have you taken all precautions to prevent a rollover triggering ?? Best practice is to limit the maximum firing angle (minimum output) to 150 degrees. Anyway down to the last 30 degrees you would be getting average power that is probably unsusable for your design. This prevents that you are not triggering the thyristors close to a zero cross. Due to the phase lag and current lag your thyristors may experience the current zero cross a little late after the voltage zero cross (your pic). I use an asm interrupt to turn-off the outputs and do not fire (in case of full firing) before a certain delay to make sure that the thyristors turned off at the zero cross. For firing I use a timer interrupt.

Also from your schematic I understood that you are using a PIC for Phase health check and measuring the shunt-current. Why not use a single PIC that has three external interrupt sources? You can then do away with the DAC part. I would suggest that at each zero-cross you turn off the outputs and do the AD to find out the next firing angle.

Seems it is time to look at your code.

Ioannis
- 27th March 2007, 07:36
... few meters away of my face always serves me well :D


I remember once I was trying to light a LED and suddenly the top of the LED was launched like a rocket and bounced 3-4 times to the ceiling and the walls before land somewhere in the lab! I was very lucky that the part missed my eye that was nearly on top of it!

Ioannis

Archangel
- 29th March 2007, 06:55
Hi,

Thanks for your replies.

The application is controlling a 3 phase welder with current feedback giving between 200 & 3000 amps. I already have a working product, but on some sites the welders act strangely. I eventually thought what are the 3 phase inputs refferenced to? So I am now thinking i need to connect the pcb's 0V line to Neutral or earth. Earth would be best since most 3ph supplies dont have a neutral connected in practice.

Bob...
Hi Bob,
Your welder is producing up to 130000 watts of plasma arc (assuming a peak of 46 volts, just a guess) anyway that's a whole lot of RF floating around. You should shield your PIC in a metal box grounded to the welder. I assume you are using 4 wire 3 phase with the fourth wire being ground. Mister_E's recommendation of an opto coupler is a good idea, also shield the wires going into the box containing the pic. I had friend who raced a Midget car with a radio and it would cut the ignition when he keyed the mic due to R/F, shielding fixed it.
JS

BobEdge
- 29th March 2007, 10:57
Hi,

Thanks for all your help guys.

I managed to get hold of a mig welder, and can now replicate the problems here in the workshop. I have looked at the mains inputs to the pic's in relation to when the thyristors are firing, and there is no change with or without the fault, so i feel that the reference signals are not the cause of the problems. This is a big releif since using opto's would have meant a redesign of the pcb.
I have connected the star point of the welding transformer secondary through a 1k resistor to 0V on the pcb. I have also fitted a capacitor to the welding earth where it comes in to the machine, and to mains earth, and also fitted ferrite's to the welding earth cable. This seems to have cured the problems. I can hardly measure any interference coming into the machine now. I'm now off to weld hundreds of studs with the mig running. Hopefully i will not get any bad welds. How things will work out on site with 20 or so mig's running is another matter.

Once again thank you all for your help, & advice

Regards
Bob...

SOMRU
- 30th March 2007, 19:02
This I Know.
The problem is not in the zero pick up.
If you scope your phase in at the driver pic and compaire it to the actual output from the pic to the gate drivers you will see the occasional "missing phase".
what a bummer this was.

I solved the problem by moving the ADC funtion from the feedback pic to the actual driver pics.

The reason for the "missing phase" was the time it took the feedback pic to SERIN/OUT to pics 1-3. plenty of room and time for pic 1-3 to do the ADC and make adjustments post gate firing.

SOMRU
- 30th March 2007, 19:03
This I Know.
The problem is not in the zero pick up.
If you scope your phase in at the driver pic and compaire it to the actual output from the pic to the gate drivers you will see the occasional "missing phase".
what a bummer this was.

I solved the problem by moving the ADC funtion from the feedback pic to the actual driver pics.

The reason for the "missing phase" was the time it took the feedback pic to SERIN/OUT to pics 1-3. plenty of room and time for pic 1-3 to do the ADC and make adjustments post gate firing.

this worked well for me at 200-2400ADC