Monitoring AC Voltage Loss

Status
Not open for further replies.

mityeltu

Senior Member
Location
Tennessee
I need some help. I am being asked to remake a system for testing ac voltage/current sources. One of the tests is to determine the timing of events. Specifically, I need to determine the time between signal input and loss of AC.

The device under test is a Doble F2250. There is a relay timing function that I am calibrating/verifying. The issue is that the Doble produces an AC signal that (according to the manufacturer's data) switches off at the zero crossing. I have to be able to capture the moment when the AC is switched off. I have been struggling with a method for some time. I have considered a PT/rectifier setup as well as a Rogowski coil. I have even considered using an derivative op amp circuit figuring the change in slope from the negative to a fixed 0 would be something I could pickup, but the duration of the resulting pulse is likely to be very small and possibly not noticable even for the 40MHz microcontroller I will be using for the brains under the hood. The bad part is actually not monitoring for the loss of AC but rather the timing. I have to get this within a few uS. I have not actually mocked anything up at this point because I am not certain of the idea's soundness.

Has anyone ever had a need to do this? Does anyone have any ideas as to hoe to pull this off?
 

winnie

Senior Member
Location
Springfield, MA, USA
Occupation
Electric motor research
Are you looking to trigger some event on the basis of loss of AC signal, or are you simply trying to record the event so that its timing can be analyzed in relation to other events?

Could you simply use a digital storage scope to record the events? Or if you have a bunch of events to log, use a simple divider and clamping circuit to convert the AC into a logic level signal and then log it with a logic analyzer?

-Jon
 

gar

Senior Member
Location
Ann Arbor, Michigan
Occupation
EE
150504-2131 EDT

mityeltu:

Who do you work for? Doble or someone else. Are you trying to test the Dolbe F2250, or some device or product with the F2250?

Much more information is needed. As winnie said use a digital scope. Keysight has some good triggering capability. I would use a resistive shunt properly designed, or a wide bandwith Hall type current sensor.

.
 

Bugman1400

Senior Member
Location
Charlotte, NC
I need some help. I am being asked to remake a system for testing ac voltage/current sources. One of the tests is to determine the timing of events. Specifically, I need to determine the time between signal input and loss of AC.

The device under test is a Doble F2250. There is a relay timing function that I am calibrating/verifying. The issue is that the Doble produces an AC signal that (according to the manufacturer's data) switches off at the zero crossing. I have to be able to capture the moment when the AC is switched off. I have been struggling with a method for some time. I have considered a PT/rectifier setup as well as a Rogowski coil. I have even considered using an derivative op amp circuit figuring the change in slope from the negative to a fixed 0 would be something I could pickup, but the duration of the resulting pulse is likely to be very small and possibly not noticable even for the 40MHz microcontroller I will be using for the brains under the hood. The bad part is actually not monitoring for the loss of AC but rather the timing. I have to get this within a few uS. I have not actually mocked anything up at this point because I am not certain of the idea's soundness.

Has anyone ever had a need to do this? Does anyone have any ideas as to hoe to pull this off?

You will not be able to obtain uS accuracy unless you use some type of hi-res data acquisition device like the I/O Tech unit. Otherwise, you could try a modern o-scope w/ a trigger input feature to capture the event and store.
 

mityeltu

Senior Member
Location
Tennessee
I am testing the timing function ON the Doble unit. There are on/off, open/close timing sequences used in the field to test relay operations for pickupo and dropout. My job at the lab is to calibrate/verify that the timing on these units is within the specs published by Doble.

The current setup requires the use of an external triggering device that was designed and constructed in the lab for this purpose. The box provides the timing and the trigger for the Doble. Additional equipment that is cuurently needed is a dso and a frequency counter to capture everything. The reason for the scope is due to lag between the current trigger box and the actual pickup/dropout of the onboard relay and the doble's output whoch drives the onboard relay. It's complicated, but basically the idea is to move away from having such a convoluted setup and make it such that anyone with a basic understanding could set it up and run the test.

The new timing box I am working on will use a PIC microcontroller with isolated inputs to provide accurate timing of the trigger to the Doble. The pickup sequence is easy, filter the input from the Doble (noisy AC), use a fast comparator (the Doble always starts output from zero), and as soon as the pic recognizes the input, start the timer. That is the easy side. The hard part is monitoring dropout.

The Doble will be running with AC output and then the doble output must be turned off to simulate the loss of AC to the relay. This loss of AC STARTS the timer. THAT is what I need to know- the exact moment the AC is off. The problem is I have no idea how to accomplish this. We do not want to continue using the dso and would like to avoid additional pieces of equipment. The uC can handle all the timing, input and output issues. I just need a way to know when the ac power is lost.

Any thoughts?
 

gar

Senior Member
Location
Ann Arbor, Michigan
Occupation
EE
150505-1140 EDT

mityeltu:

You are not providing a clear statement of the problem.

What is a "dso"? Apparently it is a digital scope, but I really don't know. It seems this is inadequate for your purpose. You seem to say this is not satisfactory because it does not provide a simple digital readout of a time period.

I believe you are saying:
You want to build a box to trigger the "dobe", detect the time at which the "dobe" actually "turns on" the output voltage (occurs at a voltage zero crossing of the output voltage), use this output "turn-on" time as a reference time to trigger a time measurement to the time when the "dobe" turns off the output voltage which is at a current "zero-crossing".

If this is what you want, then you need a current sensor with no phase shift. The current "zero- crossings" can be detected with a comparator. At each "zero-crossing", positive and negative, generate a pulse. In your micro-computer measure the time from the voltage "turn-on" to the last current "zero-crossing". Do this by storing the time to the latest current "zero-crossing". A timer would be used to detect when no more current "zero-crossings" occurred. The last stored time is your time measurement.

How you design the comparator will determine whether you detect the last "zero-crossing" or the next to last. If it is the next to last, then add the 1/2 cycle time period. Your differentiator may be a better idea on how to detect the last "zero-crossing".

.
 

winnie

Senior Member
Location
Springfield, MA, USA
Occupation
Electric motor research
Okay, I think I get it.

You have an existing system that uses a Digital Storage Oscilloscope to capture the change of output state. Someone probably has to actually manually read the desired timing off of the DSO.

You want to replace this system with a simpler (cheaper??) system based on a microcontroller. It isn't clear if the microcontroller is generating the initial trigger or if you need to detect it. I think that your main question is how to capture the timing of the shut off of the output AC signal.

If I understand you correctly, you don't need to respond in microseconds to the shut off of the AC; you just need to know (and report) the timing of the shut off to microseconds.

It seems to me that you can just take the AC and somehow convert it to a logic level square wave, say by using a comparitor to catch the zero crossings. Then have your microcontroller trigger on each and every zero crossing and record its time relative to your initial trigger. The last value that you record will be the time that you are looking for.

Capturing the timing of edges on a microcontroller is trivial, and converting 60Hz AC to a train of edges should also be easy.

-Jon
 

gar

Senior Member
Location
Ann Arbor, Michigan
Occupation
EE
150506-1453 EDT

mityeltu:

I will try to respond later, but I don't know what later means.


winnie:

I believe I have the ADC-216 working. But the Radio Shack power connector I obtained is sort of flaky.

.
 

mityeltu

Senior Member
Location
Tennessee
Winnie:

Cheaper is not really at issue. Simpler is the real issue. The microcontroller (uC) will do both: generate trigger and monitor for the event.

During the pickup portion of testing, when the Doble output is energized, the uC has already energized an isolated mosfet. This mosfet serves as "relay contacts" for the Doble. When the doble power is sensed by the uC, the timer starts and delays the preset time then 'opens' the contacts (de-energizes the mosfet). The time on my timing box needs to be within margon of the time displayed on the Doble (which is also monitoring the event). This portion of testing is easy as it relies on the Doble source output going from zero to +30VAC (easy to trigger on using fast comparator) and timing provided by the uC.

During dropout, things get a little tricky. The Doble output (30VAC) is on and must be monitored for "turn off" which occurs when the user switches the output off. This signal then starts the timer and things essentially move along as they did in the pickup section.

There are 2 other tests where the uC is sourcing the voltrage to the Doble, but the timing issues for pickup and dropout are essentially the same. The only propblem I need to overcome (at this point) is how to catch the loss of voltage. I believe I can use the ADC (analog-digital converter) on the uC as the data sheet indicates that I can sample at about 300kHz with my planned circuit. If I use that, then I lose the ability to monito the voltage at about 5mV (10 bit converter on a 5VDC source - rectified and atenuated Doble output signal) which means I will have a reading of 0v for 296.8uS or about 90 samples. So if sample 91 is still zero then I have lost voltage.

I don't really like this method, but I might not have much an alternative.
 

winnie

Senior Member
Location
Springfield, MA, USA
Occupation
Electric motor research
You could use the ADC and simply monitor the AC output; then the job is one of creating an algorithm to recognize the end of the AC. IMHO this will work but will use a huge amount of the microcontroller resources.

If you continue with this approach, I think you should double check your math. A 60Hz sine wave, attenuated for +-5V peak to peak (which gives you 0 to 5V when rectified, _if_ you use an active rectifier that doesn't itself drop a volt or 2) has a slope at zero cross of 2 * pi * 60 * 5 V/s = 1900V/s or 1.9 millivolts per microsecond. If your LSB is 5mV, then the duration of 'signal is zero' is on the order of 5 microseconds, not 300 microseconds.

If you go down the microcontroller path, I'd still suggest using a comparator to catch the 0 crossing of the AC signal, and timing the edges. If you decide to use the ADC, then you might as well use all that information to calculate the dV/dt rather than simply looking for '0' values.

-Jon
 

mityeltu

Senior Member
Location
Tennessee
Yeah,I'm not sure how I hosed that one up. Assuming ideal transfer and attenuation, using a 10bit a/d I should only be unable to register the voltage for 5.1uS. Thanks for catching that. That's only 2 samples as 300kHz sampling rate. hat's much more reasonable. I still don't like that idea, but it's a workable solution. The back calculation of loss of voltage is not ideal.
 

gar

Senior Member
Location
Ann Arbor, Michigan
Occupation
EE
150508-1039 EDT

mityeltu:

Before you get too excited about your full wave rectified signal look at what the valley looks like.

Also it looks like the differentiation method won't work well because of the high frequency noise on the line.

Why do you need resolution to a few microseconds?

.
 

mityeltu

Senior Member
Location
Tennessee
Yes, lots of noise, but a 4th order lowpass filtered front-end has taken care of that on the pickup side of things and I can time down to an error of less than 1%.

Why uS? Because I'm timing 8mS. Shorter is better and will give me better accuracy. Back calculating is not ideal. If possible a better solution is to capture the actual loss of voltage, but that requires nS-uS timing and accuracy that I might not be able to achieve.

Still hoping.
 
Status
Not open for further replies.
Top