Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

60 Hz voltage source effects on micrcontroller timing/errors?

Status
Not open for further replies.

PVH

Mechanical
Nov 17, 2002
36
0
0
US
I am trying to trouble shoot a microcontroller circuit utilizing an Hitachi controller chip which runs into a very random error event which I believe may be linked to noise events on the 120 Volt AC power source to the power supply transformer for the microcontroller. The system has its own crystal oscillator that it times off of which runs at 4 MHz but it also use the 60 Hz AC voltage waveform as a check/reference timer.

Has anyone ever seen similar AC power problems causing such errors? Any ideas on how to create (or purchase) a power supply for which noise and volatage sags and spikes could be simulated would also be appreciated. Thanks,

Phil
 
Replies continue below

Recommended for you

I haven't seen 120VAC problems with any of my micro designs but it would possibly help if you would be more specific than "I am having 60Hz problems".

I often use a Variac transformer to test my design's response to voltage fluctuations. They let you turn up and down your "AC supply" from Zero to 130VAC with a twist of a knob.
 
AC lines can have short drop-outs of 1/4 cycle to several cycles. Also, there can be transients on the line. Transients can originate not only from the typical sources (lighing, shorts, etc) but from equipment, HVAC, and motors being switched on/off at your site. Most small transients originate locally on your side of the step-down transformer from the power lines.

If the filtering and detection method and software your circuit is using to sense the 60 cycle does not adequately handle such events then problems could occur. Transients could be counted as several AC cycles. Short drop-outs may not cause the lights to flicker but could cause you system to miss cycles. I have never noticed such problems outside of old digital alarm clocks or appliance clocks.

Do a search for "AC power sources" or "programmable AC power". Search for a model that has the drop-out, transient, or frequency variation features you may need. Many choices are available from test equipment rental companies.
 
Any events on the AC line are short lived (transients, voltage fluctuations, etc) and often do not bother timing devices using the 60Hz as a reference. A bigger and more likely issue might be the harmonics on the line. Since the timing circuit uses the zero cross to determine a period of time has passed, harmonic distortion will lead to multiple zero crosses in one cycle. I would be looking at the incoming wave. This may only occur when certain machines are stopped or started so if it is not there now, it may be later.
Frequencies are often +-0.3Hz from 60Hz and this should have little affect on your timing unless it is an extremely short time or long time.
 
Buzzp,

That is interesting that you mention zero crossing. In one incident location where I got a log of voltage waveforms to a residence, I saw a waveform glitch to 120VAC power that crossed zero from about -170 volts up to about +70 volt and back. This occurred once and the pulse was about 2-3ms in duration.

As for emulating harmonics, can you reccommend a good programmable power supply to rent that I could use to run some tests in this area? Thanks,

PVH
 
"...also use the 60 Hz AC voltage waveform as a check..."

There's an old joke that seems applicable to this case.

A man with a wrist watch always knows
what time it is. A man with two wrist
watches is never quite sure what time
it is...

The concept of using 60 Hz as a check on a crystal oscillator seems dubious. If the 4MHz stops dead, then [I assume that] the uC is not working anyway. If you're using the 60Hz to calibrate the 4MHz over the very long term (days), that would require some fairly elaborate software[*] and trust in the local power company (on top of the noise problems you're having).

[* I assume you're not doing that...]

In short - how about the option of not using the 60Hz? Would the system be more reliable (in every respect) without using the noisy 60Hz as a check?

 
If you are using a simple power supply,tx/rec/cap/reg, then you will allways get problems in real world situations. At the very least you need an emi filter on the line side of the transformer. There is allways noise around the crossing point on the 60hz signal, use a schmitt trigger input to get rid of its effects. Have you tried running from a lab power supply, or battery, with a 60hz waveform from an oscillator?
 
I know you can get some programmable supplies from some reputable companies. California instruments is one (expensive?) and there is another that starts with a 'P' which is more economical more just as functional. Both have programmable harmonics you can inject (3rd, 4th, whatever you want). Sorry have not worked in this area for a while so cant recall their name.
As for using 60Hz for timing, it can be done using appropriately sized caps, etc to form, essentially, a square wave (very steep rising and falling edges) so the zero cross is very direct. If you have a few glitches in the power, it should be no big deal given that one cycle is only 16mS. You can also use a scmitt trigger (as suggested) if you want to get fancy but, to me, it is unnecessary. If a little fluff in the time is unacceptable then use your clock. I would hope your not using the 60Hz for timing out times less than a sec or using it for a real time clock or something.
 
There are commercial "line monitors" that monitor the "goodness" of incoming AC power. They are available for rent from most test equipment rental places. The devices document the nature and time of powerline "events". Such a line monitor might help you isolate the cause of your circuit's problem. I used one made by "Dranetz".

A line monitor will indicate the nature, as well as the magnitude, of the problem. It's a good place to start.

Good luck!

Rick



 
Status
Not open for further replies.
Back
Top