Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - Contactor problem

(you are viewing a thread; or go back to list of threads)

Contactor problem (by Bozidar)
Hello!
I have problem that I have to put contactor with 220V 50Hz coil close to the 16F877 and every time when contactor energize it reset PIC.
Even with computer power supply it's same.
Any suggestions?
Thanks!
Bozidar
Mon Jun 7 2010, 19:34:40
(no subject) (by MAX)
Hi Bozidar,

Did you tie all the unused pin of the 16F677 to ground, if not connect them to the ground and install pull down (or pull up) resistor to your input pin to avoid false triggering of your input (see interfacing section for more information)

Good luck
Mon Jun 7 2010, 20:46:36
(no subject) (by Jonathan Westhues)
It's good advice to ground unused pins (or, perhaps more conveniently, drive them as outputs, either high or low, doesn't matter). But if the PIC is actually resetting, then that's unlikely to help.

First, I assume that you have a diode to clamp the voltage spike due to the contactor coil's inductance on turn-off. If not, then capacitive coupling of that high voltage can cause all sorts of problems.

Is the problem due to the contactor's coil current, or due to the contactor's load current? (i.e., does the problem occur even if the contactor has no load)?

If you're switching a high-current load, then the problem could be on the output side. A snubber (like an RC circuit; ensure that the resistor is rated for the power, and that the capacitor is rated for use across line voltage) might solve it.

Or in general: Is the circuit built on a printed circuit board with a contiguous ground plane? What's the value of the pull-up resistor on nMCLR?

Can you put an oscilloscope probe on your power supply voltage, and on the nMCLR pin, and see if anything happens when the contactor switches? (Though be careful when probing with high voltage/current stuff nearby; it's easy to get fake coupling due to antenna effects with the probe's ground lead, and see glitches that aren't really there.)
Mon Jun 7 2010, 22:45:43
(no subject) (by Bozidar)
Thanks for replies.
Problem is in the contactor's coil current (no load on the contactor).
MCLR is directly connected to +5V.
It is one side PCB.
I don't have any diode and I am not sure where and how to put it on AC coil.
Thanks
Bozidar,
Tue Jun 8 2010, 08:14:53
(no subject) (by Jonathan Westhues)
I'm surprised that you're using a contactor with an AC coil, since a DC coil would be simpler to drive. In any case, you still should have some type of clamp when switching any kind of inductive load, whether it's a diode, an RC snubber, a Zener/TVS, or something else.

How are you driving the contactor? Can you post a schematic of the circuit that you're using?
Tue Jun 8 2010, 10:30:31
(no subject) (by Bozidar)
Schematics is the same as solid state only for small loads do not use capacitors (datasheet for MOC3083) they will not discharge properly and You have voltage on the coil and will not release.
Tue Jun 8 2010, 13:32:13, download attachment Driving Coil.pdf
(no subject) (by mohan)
hi, are you using external oscillator or internal RC for the PIC.Actually i am trying the same but PIC is not getting reset.Can you send me the complete schematic,it would be very useful for me.
Sun Dec 18 2011, 23:25:41
(no subject) (by Bozidar)
Which schematics do You need?
Mon Dec 19 2011, 09:30:44
thanks and testimony. (by Magno Medeiros)
Hello, my name is Magnus, I am Brazilian.
First I want to take this opportunity to thank Mr. Jonathan Westhues ldmicro for providing this wonderful, because without it, I might not have any chance to program a microcontroller. since domino ladder language only. I believe many are also in the same situation. Then reinforcement: Mr. Jonathan Westhues thank in my name and many ...
On this issue, have also faced. Use a default layout as attached, put capacitors in parallel at various points of the source of 5v and 24v, resistor on MCLR which has lessened the problem but still the pic resets.
Tue Dec 20 2011, 19:29:30, download attachment circuito com pic 2.jpg
(no subject) (by Jonathan Westhues)
As before: Does the problem happen even with no load on the relay? Or does it go away if you disconnect the load? If the problem goes away when you disconnect the load from the relay, then it may be possible to fix it with a snubber on the relay output.

Beyond that, the schematic isn't necessarily making the best component choices, and the opto-isolator circuit is odd. It's not clear to me what the voltage divider's supposed to do; the highest voltage you could ever possibly apply to the pin is (5 V)*10k/(10k+3.3k) ~ 3.8 V, in practice less because of the drop across the photo-transistor. But RB4 is a TTL-level input, so that should still be okay. (If that input went to PORTC, for example, then things might break, because those are ST-level inputs, with a threshold of Vih = 0.8*Vdd = 4 V > 3.8 V.)

The diode across the relay coil is a 1N4148. You wouldn't generally expect to use that as a power device; but if we check its datasheet, then we see that it's rated for up to 1 A for 1 ms. The BC337 you're using has current gain around a hundred; so with (5 V - 0.7 V)/10k = 0.43 mA into the base, you can't be switching more than around 100*(0.43 mA) ~ 43 mA, so that's absolutely fine. (When the transistor switch opens, the inductance of the relay coil will try to maintain constant current through itself; so instead of flowing to ground through the transistor, it will flow to Vdd through the diode. The initial current through the diode will be equal to the current through the transistor switch when it opened.)

On the other hand, that seems like it's potentially too little for the relay coil (which you didn't specify); does the voltage at the collector of the transistor get within a few hundred millivolts of the rail when it's on, or is it higher? If it's higher, then the transistor's not fully on, and needs more base current; drop that 10k resistor.

Nothing seems grossly wrong with the schematic, though. My first guess might be a layout problem. Is the circuit built on a printed circuit board with a ground plane? If not, then you might try a capacitor directly across the micro's power pins, and to wire the resistor on nMCLR directly to the micro's Vdd pin.
Wed Dec 21 2011, 03:25:15
(no subject) (by Bozidar)
First You have to see when pic is resetting, I had same problem but it was not from coil it was from contacts of relay (switching 220V).
Try to add RC snubber 100n+100R parallel with contacts capacitor usually goes on hot side.
Check on google for rc snubber(network)
Wed Dec 21 2011, 15:13:06
(no subject) (by Magno)
I noticed the problem in bench tests, and when I turn off the soldering gun (inductive load 100w) PLC close, but not connected to it. Or after it is installed on the machine, sporadically. In this machine there are 3 engines 100hp among others, that are triggered by the PLC without any problem but when I least expect the pic and all restarts machine is turned off. As the voltage divider, I made the wrong schema and with different value of the real. so I'm sending the new scheme as actually rode the circuit. And I will correct the points that Mr. He pointed.
Wed Dec 21 2011, 18:49:09, download attachment Imagem393.jpg
(no subject) (by Magno)
Expansion of the data
Wed Dec 21 2011, 18:56:46, download attachment circuito com pic 3.jpg
(no subject) (by Magno)
Expansion of the data
Wed Dec 21 2011, 18:58:11, download attachment 1617 v-4.pdf
(no subject) (by Magno)
Expansion of the data
Wed Dec 21 2011, 19:00:34, download attachment 382.jpg
(no subject) (by Ronaldo)
Magno,
Eu tive o mesmo problema acionando 6 valvulas solenoide de 220vca, resetava meu atmega32, resolvi colocando um capacitor de fonte de chaveada (azul) de 22nfx1000v em paralelo com o contato do rele que acionava as valvulas. na entrada alimentação do circuito coloquei um toroide de 1,5cm de diametro com 3 voltas.

Magno
I had the same problem driving 6 solenoid valve 220VCA, restarted my ATMEGA32,I solved the noise placing one capacitor 22nfx1000v (blue) in parallel with the relay contact to activate the valves.in the input circuit power, I put a toroid of 1.5 cm in diameter with 3 turns.
Thu Dec 22 2011, 10:23:54
(no subject) (by Magno)
Thanks Ronaldo,
initially tried the power supply solutions, because it is one of 17 PLC outputs, but if necessary I will do this procedure.
Thu Dec 22 2011, 13:55:55
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):