Help, processor reset when power on large transformer.

I've got a simple pic based controller that turns on power via a relay to a 1000W transformer used for high energy lighting. When I turn the power on the processor ends up reseting. I've traced this back to about a 2 micro second low going pulse break in the power to the processor. Adding capacitance, and even putting in diode based filter has not helped. I'm guessign the emf field from the transformer is causing inductance via the wires on the prototype (this design has not gone to board yet). The power glitch happens on the output of the LM2940 5 volt reg I'm using, and it is supplied by a 24 volt DC off line power supply that doesn't glitch. I've tried various caps on the regulator with no help. I'm switching the power anywhere in the AC cycle, and it doesn't always reset. Anyone have any ideas of things to try?

I rewrote the software so that a reset is part of the normal power on and off sequences for this device, if it happens. While this works I find it a real cop out.

Thanks

Rocky

Reply to
Rock
Loading thread data ...

Most pics take very little power. Perhaps you could use a resistor + bypass to 'filter' the power supply? If your glitch is 2us, then you don't need much to keep it above water. If you use a 10 ohm resistor from the power supply to your Vdd pin, and a 1uF cap from there to ground, the supply will only drop to 82% of Vdd during the 2us glitch.

--
Regards,
   Robert Monsen

"Your Highness, I have no need of this hypothesis."
     - Pierre Laplace (1749-1827), to Napoleon,
        on why his works on celestial mechanics make no mention of God.
Reply to
Robert Monsen

relay

about

to

volt

supply

doesn't

a couple of things..

#1 you may have a measurment issue, when then power transformer turns on, there is a large EMI spike and you may be seeing that on the scop and it is not really on the +5. If you put your scope probe on the ground, do yo usee the same spike?

#2 big power xformers can saturate at turn on due to residual flux. This causes them to draw a very large current spike. look up trasnforer flux stauturation at turn on.. the only sure cure is to soft start it first. Maybe you can use two realys, one through a resistor, or maybe you can use a PTC soft start device in series.

#3 when the xformer draws the large current spike, this is somehow being injected into your up. Try to keep all the power wiring away fom the up low level circuits. think about the current loops in the power wiring and arrange ther components to minimize the area of the loop. Example, keep the relay close to the transformer and bring the low level relay drive to the relay instead of the other way round.

good luck.. Mark

Reply to
Mark

I agree with your distinction here, but would add: Anytime you see big spikes or glitches, either they are really there or some fast changing field (most often magnetic) is inducing the observed signal in the probe/scope/circuit-under-observation circuit. Even if the latter is responsible, it can be a good clue as to what is going wrong, especially if the circuit being examined is not built in a way that tends to make it immune from ambient fields.

That is a good point, and very relevant. However, I will quibble with both the cause and the cure. When a line transformer is not designed to handle about twice the peak magnetic flux that occurs during steady state operation, and is switched on near a voltage zero-crossing, it can saturate, often with an audible "whump". In addition to the cure you mention, two others are available. One is to switch on near a voltage peak. (This is counter-"intuitive", so please consider carefully before contradicting this.) Another is to specify a transformer with enough more iron that it will not saturate upon turn-on regardless of the starting phase.

Another aspect of transformer saturation often overlooked is that the external magnetic field from a saturating transformer will far exceed that which occurs when the flux is much more confined to the intended, highly permeable magnetic paths. This effect can be used as one of the tell-tales of saturation.

All good advice.

--
--Larry Brasfield
email: donotspam_larry_brasfield@hotmail.com
Above views may belong only to me.
Reply to
Larry Brasfield

Hello Rocky,

Do you have a full ground plane? If not it may be time to provide one. The uC and other chips should all have at least a 0.1uF ceramic to GND very close to their pins. No more than very few millimeters.

Also, some low drop out voltage regulators can become a bit fickle when their input line impedance changes, even if these changes are caused by EMF. Since you have a 24V supply you shouldn't need low drop out. I'd consider a more classical regulator such as the LM317 series. These are the ones I use a lot and I never had any problems even in the vicinity of serious RF fields.

Another issue to watch out for is where the lines from the uC go. If there aren't any series resistors or better yet, RC networks, it is possible that surges are induced in those lines. Then the current spikes often have no other path than to run into the substrate diodes of the uC. From there it's either into GND or VCC. If you hook up a battery such as four NiMH cells and the problems are still there you might have signal lines picking up stuff.

Regards, Joerg

formatting link

Reply to
Joerg

a reset facility has been used in almost any circuits I've seen with an 1M and 10-100nF capacitor grounding the reset pin when powered on, can't understand that such is unknown

-JM

--
J. M. Noeding, LA8AK, N-4623 Kristiansand
http://home.online.no/~la8ak/91n.htm
Reply to
J M Noeding

More generalized bullsh_t from a narcissist who imagines himself to be the great teacher- but fails miserably because he doesn't have the intellectual horsepower to put anything into practice.

Total bullsh_t once again- every damn transformer made will draw considerably more current and nearly saturate when starting from zero flux density...most reasonable people make their circuits tolerant of this effect rather than over-specifying the transformer, idiot.

Well- yeah, yeah, yeah- ya' friggin idiot, it is a simple field divider circuit where the field divides in accordance with the reluctance- this is simple Electricity 101...

And as usual, you add nothing but garbage hot air and non-information...

>
Reply to
Fred Bloggs

This is almost certainly being caused by the relay and its solenoid field cutting the area formed by the 5V regulator to Vdd to GND and back to the regulator. You can verify this by supplying power to the relay through two twisted wires as well as moving it away from the PIC circuit altogether.

Reply to
Fred Bloggs

Sounds like it's possible poor pcb design ( loop areas for example ) or lack of attention to general EMI issues.

There's tons of stuff written about how to do it right but I guess you need to read some.

You won't be the first to experience this kind of issue for sure.

Graham

Reply to
Pooh Bear

Hmmm, thinks. Is the 5V regulator close to the PIC or far away ?

It *should* be close to the PIC.

Watch out for common ground current paths too.

Graham

Reply to
Pooh Bear

Derf transform applied.

"Fred Bloggs" wrote .... [derf]

nearly saturate when starting from zero flux

rather than over-specifying the transformer [derf].

Many "made" line transformers do saturate when turned on near a voltage zero-cross. Depending on the regulation of the transformer, currents 20 times larger than the inrush under more favorable conditions, or more, will flow. This is not usefully similar to what happens "near saturation".

The problem is one that leads to reduced fuse life, (even when slow-blow fuses are used), and is clearly addressed by those vendors who do design the magnetics to handle worst case starting peak flux. I have looked at a number of transformers when dealing with the problem, and discussed it with at least two transformer designers who worked for reputable transformer vendors.

divides in accordance with the reluctance- this is simple

The point, perhaps not clear to you, is that the OP may want to use the effect to see if saturation is occurring. As for it being elementary, I have worked with many competent engineers who had not worked out all the details and ramifications of how magnetic devices work.

.... [derf]

--
--Larry Brasfield
email: donotspam_larry_brasfield@hotmail.com
Above views may belong only to me.
Reply to
Larry Brasfield

Yeah- so what- they're line operated and the saturation is "soft"- no one seems to have a problem with it except a dodging pseudo-intellectual and unproductive weakling like you- looking for *any* excuse for not producing.

Yeah- right- BULLSH_T!

divides in accordance with the reluctance- this is simple

Oh yeah- there you go again with your assumptions about everybody being inferior to yourself- DESPITE ALL EVIDENCE THAT YOU ARE THE WEAKEST P.O.S. ON S.E.D...BULLSH_T...

Optimized manufacture of line transformers requires that saturation is approached from zero residual core flux- anything else would be as much of a waste of material as you are of time. GFY.

Reply to
Fred Bloggs

"Fred Bloggs" wrote in message news: snipped-for-privacy@nospam.com...

[Apparently quoting the OP]

cutting the area formed by the 5V regulator to Vdd to

relay through two twisted wires as well as moving it

Most relays have a closed magnetic path going through iron everywhere except for small construction gaps and the gap which varies to operate the relay. Allowing much flux into the surrounding air is bad for the efficiency, and would be a sign of a poorly designed relay, if it happened.

I have used quite a few relays in close proximity to other circuits without seeing the magnitude of effect you claim, including circuits made with single-layer etch for cost reasons. So I am quite skeptical that your "certainly" is well founded in reality.

--
--Larry Brasfield
email: donotspam_larry_brasfield@hotmail.com
Above views may belong only to me.
Reply to
Larry Brasfield

cutting the area formed by the 5V regulator to Vdd to

relay through two twisted wires as well as moving it

Hahahahaaa- I like that "gap which varies to operate the relay"- damned moron, the very principle of operation is to "vary" the gap to "operate" the relay, idiot. How the hell do you pull in the armature otherwise, mental midget...

Who gives a damn about your skepticism...what you seem to be missing is the timescale of the interference with 2us being a bit short for anything induced by a line frequency action- not to mention repeatability going against an unsynchronized activation- whereas the DC coil circuit is self-synchronizing. As usual, you're not even in the same ballpark...

>
Reply to
Fred Bloggs

Derf transform applied.

"Fred Bloggs" wrote >> "Fred Bloggs" wrote in

cutting the area formed by the 5V regulator to Vdd to

relay through two twisted wires as well as moving it

[derf]. How the hell do you pull in the armature

When considering the magnetic circuit, it is useful to separate the incidental gaps due to construction from the gap for which the magnetic circuit exists. You need not get all excited thinking I meant to write a primer on magnetically induced motion. I merely reminded readers that only certain flux does any good in such a device.

I notice that you chose to not deal with my point, which is that flux setup outside the relay is wasted and minimized in well designed relays.

2us being a bit short for anything induced by a line

The reliable observation is the system malfunction. With the breadboard construction reported by the OP, that "about a 2 micro second low going pulse break in the power to the processor" is legitimately suspect. I think you need to learn to weight the evidence you consider.

The OP stated "I'm switching the power anywhere in the AC cycle, and it doesn't always reset." This repeatability issue works directly against your "almost certainly" hypothesis.

Does that mean it turns on when it turns on? That fancy language of yours is confusing.

[derf]

Since you seem so fond of your "solenoid field cutting the area" idea, I'm going to provide more detailed reasons for an objective person to discount that hypothesis.

The OP mentions a problem encountered upon energizing a relay and mentions only 24 VDC or 5 VDC as sources that might be used for that purpose. Let us assume, (or divine, as you wish), that the highest of these is applied to the solenoid. (This assumption has little bearing on the end result since ampere-turns are held nearly constant for a given coil size.) The problem, as deduced or divined by Fred, is that a voltage has been induced by flux emanating from the solenoid sufficient to interfere with a 5V regulator powering a uP.

Most people familiar with the elementary theory of induction, back EMF, magnetics, and the like can see that the flux linking that solenoid will then change at a maximum rate of 24/N Webers/Second, where N is the number of turns on that solenoid. Those people can also see that the maximum voltage this changing flux may induce in a single circuit loop outside of the solenoid itself is k * 24/N Volts where k is the fraction of flux that manages to escape the closed magnetic circuit I mentioned ealier as being the most probable form of that solenoid.

Consdering that the only flux that acts to operate a solenoid is that which is in the volume that changes as the intended motion occurs, it should be obvious that suffering the IR losses necessary to establish similar flux levels in many times that volume would be very wasteful. A brief examination of how most relays are constructed reveals that their designers are not that incompetent. They arrange that most of the flux path is either iron, (which conveys the flux without much stored energy or required MMF), or air which develops useful force due to that flux.

Having never yet seen enough flux linkage to worry about, I have not measured the k value for any relays yet, but values in excess of 0.1 would surprise me a lot if exceeded by any but a small fraction of relay designs out there. (I exclude reed relays from this; they are inefficient and irrelevant to the OP's issue.) This estimate is based on common constructions I have seen and the idea that, when driven at their intended levels, the iron in the path tends to not saturate during energization. (The magnetic circuit is gap dominated.)

I have unwound a number of solenoids wound for 12 V and 24 V service. They invariably have many dozens if not a hundred or more turns. A 24V coil with as few as 25 turns would be most unusual.

Based on these estimates and observations, I expect the ordinary magnitude of Fred's "almost certainly" induction to be less than 0.1 * 24V / 50 turns = 48 mV, and most likely much less.

But of course, in Bloggs World, we must make a few concessions to the vast variability of the "real" world. So, let's allow that the relay designer was able to get only half the flux where it could ever do any good, (and a much smaller fraction of the field energy there), and make it a truly high powered coil, having, say, only 10 turns. Under those conditions, we might see 0.5 * 24V / 10 = 1.2 V. By gosh! That

*must* be it!. The OP has spread out the feedback for his three-terminal regulator over enough area to capture a significant fraction of that wasted flux! And it is seeing the 1.25 V (or so) that it wants when there is not a proportionate output but merely the illusion of it induced by that humongous and hot coil designed by one of the multitude of idiot relay designers sadly allowed to live in Bloggs World.

Another mystery resolved by astute divination.

--
--Larry Brasfield
email: donotspam_larry_brasfield@hotmail.com
Above views may belong only to me.
Reply to
Larry Brasfield

cutting the area formed by the 5V regulator to Vdd to

relay through two twisted wires as well as moving it

[derf]. How the hell do you pull in the armature

What a joke example of your extreme narcissism- like the world is watching the great Larry-Fairy and taking notes on everything he says, keeping score of his words of wisdom. No one is reading your worthless bullsh_t- you have been exposed as a fraud who can't do anything except babble- you're a dull and uninteresting person.

It is there in considerable quantity if it's mounted right on the PC board with the PIC.

2us being a bit short for anything induced by a line

I am not going to argue over what the OP said- he doesn't have the intelligence to think himself out of a wet paper bag. Like how damned hard is it for the reptile to disconnect the drive to the transformer. Plus these f___g OPs lie quite often. That is why I never argue about what some idiot OP might have meant. So it looks like you loose the chance to post 10,000 words of conjectural bullsh_t...too bad.

Right- the non-repeatability does go against the relay- but like I said- these OPs lie quite often- so I discounted it.

There would be no other reason for having a 24VDC supply other than using that to drive the relay, idiot.

No- that is nonsense- only holds for a single layer coil with no leakage flux.

[...snipped the usual over-simplified elementary textbook garbage barfed by Brasfield...]
Reply to
Fred Bloggs

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.