Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to reduce transients on PCB based motor controller. 3

Status
Not open for further replies.

rkehler

Electrical
Mar 12, 2001
5
I have a PCB based AC motor controller. The motor control is simply two on-board relays (for bi-directional AC motor) that simply turn on and off via a microcontroller. The reason a relay was chosen was to give as much isolation as possible between AC and DC. The board also uses a small transformer and bridge to create the DC voltage for the relay coil and then for the logic circuits. The issue that I am having is that when the loads get switched on or off, but mainly off, I get a very large transient spike present on the board. This is causing problems with my micro. Originally the board was designed with what was referred to as a "snubber" circuit across the AC neutral and each of the two AC hot wires that drive the motor. These components work for a while, but always fail prematurely. I have also tried TVS devices in place of the R/C snubber and have gotten better results. However, I am still having transients on the DC side that occasionally cause microcontroller problems (lock-ups). Does anyone have nay suggestions as to what I might be able to try to help eliminate, or further reduce this problem. I can provide any additional information if needed.
 
Replies continue below

Recommended for you

Hi,

The problem with using relays is all that switching in the contacts and inductive load in the coil.

If I had to use relays then

1. Make sure you have a diode reversed bias across the coil of the relay. When a relay deenergizes the magnetic field in the coil collapses. As it collapses it induces a voltage in the coil and you end up with a big blip on you DC.

2. I would have stayed with a snubber on the coil as relay coils tend to bounce when they close and that quick on/off/on/off can generate a bit of RFI especially with high voltage or current switching. This will create noise on your DC.

3. Make sure your ICs are properly decoupled. A 0.1uF capacitor a close to the IC as possible helps. YOu could also use a 5V VDR across the supply.

4. One problem you'll face and this is a big problem with inductive loads like a motor is the timing as to when you switch on. I mean buy this where is the AC cylce when you switch the relay. If it is a maximum the the motor gets hit with full power. Ideally you want to switch it on when the AC is going through zero. Something, which is very difficult to do with a relay.

All that aside, you quote the reason for using relays is isolation. Had you ever thought of using a subberless high power SCR for switching the motor and an opto isolated SCR for switching the gate on the high power SCR.

With the opto isolation you have mega ohms of safety. You also have the advantage of buying opto isolated SCRs with built in ZERO Crossing detection. One to protect the motor and to reduce spikes.

Have you work with SCRs before. If not then drop me an email and I'll know together a schematic for you.

Any help ?, yes no let me know.

Regards
 
Laffalot,

Thank you for all of your input. I really appreciate it. I would like to reply to some of your inquiries and possibly give you some further information. In response to your suggestions above:
1. Yes, I am using a diode across the relay coil. I was not sure of the total power capacity that this device may have to have for a 12V, 35mA coil and I am only using a SOT23 type package.

2.I apparently mislead you on the snubbers. They were(are) actually not across the relay coil they are across the relay contacts and AC neutral. In other words there is a resistor in series with a cap between AC neutral and each one of the individual contacts of the relay. Thus, the are(were) acting as some sort of snubber for the motor that was externally connected to the controller. The problem I am having with this is that I can't find any good source of information on calculating the "correct" values of components for use in a AC application. All of the info I have found has been for DC, like across the relay coil.

3. All on board IC's are decoupled. I am not quite sure what a VDR is, but I have tried a zener diode across the supply. The problem I have ran into with this line of attack is that it seems as though my DC ground may also be hit with the transients. Therefore even though the supply may maintain a 5V margin, if ground is at some positive potential(with respect to itself) then the zener or VDR would probably not exactly solve this problem for me.

4. I have wondered about the zero crossing potential. I am sure that this is in fact a BIG problem. I do not have experience with this in general. I will be doing some research on this immediately.

As for your final suggestion about SCR's in general, again I unfortunately do not have any experience with them. I would appreciate any further input you may have on them for me.

I would be glad to explain a few more of the exact specifications of this control, like expected life cycles, current capacity, typical installations etc... if it would help in better understanding the issue I am having.

This is the first time I have used this forum, so I am not for sure how to contact you(or anyone) directly via e-mail.

Thanks again for all of your suggestions.

Rkehler
 
Hi,

1. I always use a rectifier diode such as a 1N4001, it does the trick for me.

2. Having re-read my post. OOOOOpppps instead of COIL I should have said CONTACTS (who ever heard of coils bouncing). So no mislead there, just my typing (mind was thinking one thing my hands were typing another).
See the following links regarding suppressors:
(Make sure you check the next pages > as well)

Also for a good snubber see:
(Again from Maplins)

3. A VDR or Voltage Dependent Resistor (or Varistor) are usually AC devices put across the mains supply to reduce transients. They are also available for DC supplies e.g 5v.
I obtained some from a company called MAPLINS (Order Code CP67X) which were rated at 5.5VDC. See the following link:


You could also use them across the coil (higher voltage of course) instead of a snubber.

As for your problem with the earth. As long as the difference is 5v or so it doesn't matter. I have worked on systems which require valve heaters at 6.3 volts. This was sitting at a zero potential of -117,000 volts !!.

4. For info on some of the triacs I use then
is the opto isolated zerocrossing detecting IC.

The power Triac is a BTA12 see the following for a data sheet


If you need any help let me know.

Regards
 
Suggestion: Suitable arc mitigating, voltage suppressing and energy discharging devices have been addressed above. However, the mitigating device must be properly rated so that it dissipates the energy stored in a DC or AC coil. MOV used to be rated in Joules (Wattseconds) to prevent their damage and perform an adequate dissipation of the coil energy.
 
Can you possibly isolate the ground of the high power / transient loads? I am assuming the you are a low side driver, and therefore supplying the ground connection to your loads. If you you isolate you ground for these loads, then you will prevent the voltage spikes (from the loads) from polluting your ground. BTW, do you have a ground plane?

On second thought, you might want to remove your snubbers. When the relay contacts open, you will get a positive spike (size depends on load inductance) on the load side of your contacts. Could your snubbers be passing higher frequency noise into your ground and polluting your microprocessor? This might explain why your micro craps out when you turn off a load.

Just a few thoughts. Keep us posted!!!
 
I have extensive experience in motor controls. Most problems with inductive spikes can be handled in the board layout assuming basic components are in place for bypassing transients,etc. Some of these suggestions (some basic) have been gone over. But here is a list to check:
1. bypass cap (0.1 uF) on the 5v right by microcontroller
2. ground plane or large traces used for ground paths
3. keep coil traces and output relay traces isolated from
each other and any signal lines
4. diode across coil or better yet, put a zener or TVSS
across relay coil to limit the high voltage spikes when
switching.
5. Might consider using a scr or something to turn on relay
at a zero cross. you will have to generate an interrupt
on a zero cross using the microcontroller. You could
also use this zero cross for any timing functions
6. YOu can put a TVSS on the ground to 5V as well to
suppress spikes on the ground line or just use a
bidirectional TVSS to suppress positive or negative
going spikes.
It has been my experience that board layout plays the largest role in causing the microcontroller to reset. Also, what kind of regulator are you using to generate the 5VDC? Is masterclear tied hard to 5V or is there a need for the user to 'reset' the system using this port on the microcontroller. If you like, I can look at a PCB drawing and give some advice. Thanks and good luck.
 
Rkehler
Use a 1N4148 or 1N5711 across the relay coil to kill the coil flyback. Check the forward conductance specs of the 1N4148 vs 1N4001.
 
Everyone,

Thank you to everyone who has continued to try and help me resolve my problem. I have been unfortunately distracted from my project due to a death in the family.

Buzzp, I appreciate your response. I would very much appreciate it if you could possibly look at my PCB layout and give me any feedback you may have for me with my issue. I can e-mail you the layout file if you could send me a short memo directly so that I can get your e-mail address to rkehler@kc.rr.com.

Also as a further note to anyone reading through these posts I have some further information about this project. My original control as described in the first post is made for AC motors. Since I started this thread I have also completed a control for DC based motors. In general the controls are identical with the obvious exception that the DC control only has DC on it. I do not even port AC to te board. I use an external DC power supply to supply the board power and the motor power. The control is basically just the "switch". Anyway the reason I explained all of this is because the DC based control is exhibiting the same succeptability to "lock-ups" as the AC board.

This obviously points out that the AC transients are not the only issue. The most common denominator in the two designs is the relays. I am using standard 12V Nias relays to switch the motor power on an off. The control of the relays is via transistors that run right off of a port pin.

Thanks again for all of the suggestions and comments.

rkehler
 
If you can send me a copy of your layout file, I would be more than happy to take a look at it as well. Also, could you send a copy of the schematic including your power supply circuit! If your power supply is susecptible to spikes, has too much ripple, or a combination of the both, then the sporadic micro lockup can be explained that way.

Hope to hear from you soon!

mark_melone@yahoo.com
 
I forgot to log in so I get to type in my reply again. My email is buzzybooper@excite.com. I will look over the board layout and see if I see anything to check/change. Also, a schematic would be helpful(most people wouldnt want to send a schematic of a design-whatever you want to do here). Your problem sounds similar to the problems we had. The power had to be cycled before it would come out of the lock-up mode. What my theory is: we used microchip microcontrollers capable of pregramming in circuit by pulling MCLR to 13V with a certain rise time. This puts the chip in programming mode with no way out. Hence, everything freezes up. This is assuming there are no loops in the software to cause a lock-up condition. One thing to keep in mind is if any outputs are active (on) when this happens then it is likely in software (endless loop or to many watch dog clears). If all outputs appear to go low then it is likely a mclr problem. Is your mclr pin hard tied to Vdd(+5Volts)? If it is you may want to add some series resistance and perhaps a 16V 10uf tantalum cap to the pin(smaller voltage cap is okay but will depend on if your programming in circuit or not since the 13v required for this would blow up a cap not rated for 13v). Enough of me rattling on. Thank you, Buzzp
 
rkehler,
I have received some good copies of your layout/schematic. I havent had a lot of time to look at this. The diode still bothers me from reset to VCC. It seems a negative going spike coupled onto the 5 volt bus would pull the reset low.
If the spike was generated by the motor, then it could very well be a negative spike making its way through the system through coupling from adjacent traces. I still think the layout will solve your problems. I will try to get a good look at it this weekend and post back here. I should probably hack up a drawing and fax it back to you or scan it and email it. This micro your using, is it an established micro that has been around a while with no recent die changes or anything? My theory is as the die size of these devices decreases, they become more susceptible to this kind of problem. Where I used to work, they had a line of products that have been out for several years, and finally when microchip reduced there die size the last time, the problems with the design and board layout reared its ugly head. I will get back with you, Buzzp
 
Buzzp,

I can agree with your comment about the diode. Although I have two other designs that basically use the same protection circuitry. It is a design suggestion by the manufacturer found in one of their application notes on page 9.


As far as the chip itself goes I believe that this processor has indeed been in service for quite some time. As far as I know there have not been any die changes. I also contacted Motorola Technical support to request any information about similiar problems from other customers, but as I suspected they said they had never heard of this problem before.

You referred to the layout solving my problem, but I don't remember exactly what it was about the layout that you thought might be causing the problem. If you could re-itterate this point for me I would appreciate it.

You had a couple of more suggestins for me in a previous poat about adding a series resistor to the VDD line and possibly a Tantalum cap. I know what the cap is for, but what would the series resistor do?

Thanks again for your resonses, rkehler
 
The resistors inductive properties would help reduce noise to some extent. So any noise making it through to the resistor between reset and Vcc would be somewhat attenuated by the resistor. This is assuming that the problem lies within the reset portion of the micro. I believe you already have a resistor from 5V to reset. I would think the higher the value the better here, say maybe a 10k or even a 100k resistor. Have you been able to reproduce this in the lab? Have you put a good scope on reset and Vcc and just triggered on a negative going waveform and also for positive when the problem occurs? This will tell us the affect of the problem but not necessarily what the real cause of the problem is. This chip can be programmed in circuit as well, true? This is done on microchips (nonflash) chips by placing 13 volts on the MCLR pin within a certain time frame. This feature is what caused most of problems with lockup because it put it in programmig mode with no way out, thus lock-up condition. I would get in the lab and verify that either the 5v bus right at the chip or reset is being pulled low or high for a short duration causing this condition. If the micro can not be programmed in circuit then this is not likely the case unless there are provisions for hardware to put it in sleep mode or some other abnormal mode. We had a hard time reproducing the lock up condition in the lab because we didnt actually have the outputs hooked to the motor, not sure we needed to either because we used electromechanical relays and the output contacts on the relays were close enough to couple garbage onto the coil traces of the relay, giving it a path to the 5v bus. We used the largest contactor we could find and hooked the coil of the contactor up to the output of our relays and were able to occasionally reproduce the situation. Ultimately the short term fix was to put a 10uf tantulum cap right on the chip(shortest leads as possible)(we had through hole boards at that time). The long term fix was very close attention to board layout when we changed to surface mount boards. The problem has not been experienced since. I will still try to look at board layout this weekend, although my step father has cancer so I will get to it when I can.
Some layout rules;
use as large a ground plane as possible on one layer and
try to minimize any 'islands'
keep your coil wires for the relays as far away as
possible from the output traces(everything should be
kept away from any wires or traces that ultimately
end up being hooked to the coil of the starter or
motor
Do not run any traces, grnd or other, underneath the relay(except of course coil traces and relay output traces0
5V bus traces should be as wide as possible
bypass caps could probably be placed closer to chip(just glanced at layout)
I will get back with you later, thanks buzzp
 
Suggestions:
1. The more accurate approach may require some suitable mathematical modeling and sofware simulation.
2. The practical approach would need an oscilloscope to monitor waveforms while possibly empirically adjusting variable(s), and voltage-limiting and energy dissipating component(s).
 
I found the posts above really godsent. We were struggling with a circuit very similar to described in your post on 6th Nov. We are using ATMEL 89C51. The problem was also the same, the micro either used to hang or get reset. The posts gave me a clue as to micro die may indeed have a role to play.

What seems to have worked for us are two modifications:

1) Substitution of micros manufactured in a different year (yes I know this does not make sense, but it positively helped!.)

2) 33pf capacitors on the I/O lines used for relay control. Each line had about 6 inches of wires going to relay board. The caps are almost on the I/O pins. There is 22pf on reset as well.

Before these modifications, we did have TVS and clamping diodes in place. But the problem was not fully resolved by by these measures alone.

Regards
vu2sga
vu2sga@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor