Triggering scope upon removal of periodic AC signal - Page 1
Forum section: electronics / beginners

author: iroc86
author_rank: Regular Contributor
timestamp: November 30, 2019, 05:49:34 pm
content: I'd like to trigger my oscilloscope when a periodic AC signal is no longer present. In this particular application, I'm measuring the circuit response when 120 VAC mains is removed. The circuit is entirely AC, so there are no DC signals upon which to trigger.If I play around with the trigger thresholds, I can sometimes hit things just right, but it's entirely luck of the draw... and I don't really want to cycle on/off repeatedly just to get a decent capture.One solution might be to use a small isolation transformer with rectified DC output and trigger off of that. Is there an easier (or "best practices") method of triggering a scope in this situation?

author: Nerull
author_rank: Frequent Contributor
timestamp: November 30, 2019, 10:35:43 pm
content: Can you use normal (not auto) triggering mode set to trigger on the AC waveform, it should stop triggering when the AC vanishes leaving the transition on screen.(assuming its a DSO)

author: KaneTW
author_rank: Frequent Contributor
timestamp: November 30, 2019, 10:49:44 pm
content: What triggers do you have available?

author: iroc86
author_rank: Regular Contributor
timestamp: November 30, 2019, 10:55:59 pm
content: Quote from: Nerull on November 30, 2019, 10:35:43 pmThat's a good idea, but unfortunately it doesn't work so well on my scope (HP 54645A). It's a DSO, but the screen refreshes after the trigger point--I'll see the transition for a split second before the trace flatlines. I can occasionally capture the trace in single shot mode, though.Another option I have is setting the scope to "roll" mode (200 ms/div) and then just manually stopping the acquisition. I can zoom in after the fact. The 54645A has decent sampling memory for its age (and my purposes), but it'd be nice to be able to precisely trigger for capturing data at faster timebases.Quote from: KaneTW on November 30, 2019, 10:49:44 pmI only have rising edge, falling edge, glitch, and TV. No fancy waveform triggers like the more modern scopes.

author: RoGeorge
author_rank: Super Contributor
timestamp: November 30, 2019, 11:04:34 pm
content: Not sure if I got the request right:A very efficient way to filter out the AC influences out of a signal is to use averaging, if you have a digital oscilloscope. That way you'll implement a lock-in amplifier rejecting the mains (or other) frequency.

author: StillTrying
author_rank: Super Contributor
timestamp: December 01, 2019, 01:03:57 pm
content: "but the screen refreshes after the trigger point--I'll see the transition for a split second before the trace flatlines."It still sounds like the trigger is on AUTO rather than NORMAL, as mentioned in the 1st reply.

author: iroc86
author_rank: Regular Contributor
timestamp: December 01, 2019, 11:15:31 pm
content: Quote from: RoGeorge on November 30, 2019, 11:04:34 pmThanks for the idea. I'm measuring a fully-AC signal at mains frequency (60 Hz) with no DC component, so averaging will just show a "better" sine wave. I'm looking for a way to trigger the scope when the signal disappears entirely. I appreciate the reply, though!Quote from: StillTrying on December 01, 2019, 01:03:57 pmSorry, I must have misread your original post. Using Normal triggering does stop the acquisition when the signal goes away, but the transition point is still unpredictable. Sometimes it's on the screen; usually it's not. I think it's just probability as to where it lands when I cut the signal based on the frequency.

author: jonroger
author_rank: Regular Contributor
timestamp: December 01, 2019, 11:47:16 pm
content: Rectify and filter the AC to get a DC trigger voltage. You will get a falling edge trigger when the AC goes away.

author: gcewing
author_rank: Regular Contributor
timestamp: December 02, 2019, 12:37:42 am
content: Maybe use a small plugpack power supply if you have one lying around. Might need a lamp or something as a load so the output falls off quickly.

author: vk6zgo
author_rank: Super Contributor
timestamp: December 02, 2019, 03:34:43 am
content: Quote from: gcewing on December 02, 2019, 12:37:42 amThat's the hard bit!The loss of AC has to happen before the trigger can be generated, so you are really battling.Perhaps the OP could reverse things so that the 'scope triggers, then the AC disappears a fraction of a second later.That is, of course, no help if they are looking for a way to see something which happens in an unplanned manner.Switch off times with mechanical switches are surprisingly fast, & obviously the timing is quite random.Another thought is, if you are only looking at one AC source & you have another one which doesn't break with it, would be to compare both sources, (first ensuring they are in phase) & if one disappears, generate a trigger pulse.If you can't have another source which doesn't break, perhaps sync an oscillator to the incoming AC frequency & compare that.It will drift over time if it loses its reference, but hardly at all over the first cycle after that event.

author: not1xor1
author_rank: Frequent Contributor
timestamp: December 02, 2019, 06:12:46 am
content: Quote from: iroc86 on November 30, 2019, 05:49:34 pmI might have misunderstood what' the problem, but if that is a dual channel scope why do not you just use a channel for monitoring a permanent AC signal (triggering on that) and another for the periodically removed signal?

author: Daixiwen
author_rank: Frequent Contributor
timestamp: December 02, 2019, 08:29:03 am
content: How about cutting the mains with a relay and connect the relay control voltage to the scope's trigger input?Then to run the test you cut the relay control voltage instead of the mains itself

author: iroc86
author_rank: Regular Contributor
timestamp: December 03, 2019, 02:35:39 am
content: Just for context, I'm tuning an RC snubber on a small shaded-pole AC motor, so I'm using the scope to measure the back-EMF at shutoff. That's why I'm looking for a nice, defined event upon which to trigger. When the motor is running, triggering off the AC source is just fine to see the whole 60 Hz waveform (10 ms/div), but I'm looking to capture the spike over a very short period of time (10 µs/div or faster).Comparing the primary AC source against a reference signal at similar frequency/phase is an interesting idea (vk6zko's reply). I can generate another signal, but comparison would be tough since the primary source is at 120 V RMS. It'd need to be stepped down to a more manageable voltage.Based on the other replies, it sounds like rectified AC might be the easiest option, but perhaps through a step-down transformer for safety (or a plugpack as gcewing suggested). The relay idea is cool, too.I'll think about this some more and see what parts I can scrounge up. I can post back later with the results.

author: David Hess
author_rank: Super Contributor
timestamp: December 03, 2019, 03:28:25 am
content: If you are using the 120 VAC mains, why not use the line trigger source which is built into the oscilloscope? That is what it is for.

author: vk6zgo
author_rank: Super Contributor
timestamp: December 03, 2019, 04:15:29 am
content: Quote from: iroc86 on December 03, 2019, 02:35:39 amA dual timebase analog 'scope could see 10usecs in 10ms, but might not trigger reliably, & couldn't store the result, in any case.A DSO may have too low sample rate at 10ms/div to see the spike, so it looks like the 'scope needs to be set to an appropriate time/cm setting for it, & be set to only run when triggered by the loss of AC source.As I don't have a modern, or indeed, any DSO, I may be missing some facility available on such instruments.Quote

author: Circlotron
author_rank: Super Contributor
timestamp: December 03, 2019, 04:38:58 am
content: Quote from: iroc86 on December 03, 2019, 02:35:39 amMaybe measure thepeakAC current. Then put this much DC (only) through the winding, switch off and trigger on the spike and see what your snubber does.

author: MarkL
author_rank: Unknown
timestamp: December 03, 2019, 02:54:09 pm
content: It's not a trigger per-se, but if you have the mask testing option you could create a tight mask on the AC waveform, set no persistence, and set the scope to stop if the mask test fails. When the AC is removed, the mask will be violated and the scope will stop, but how much of the "off" event you will capture is still left to chance. With a few tries you should be able to get one that starts near the left edge.On some DSOs, mask test failures can also generate a trigger output. This could be used to trigger a second scope to capture a longer record of the event. I don't know if the 54645A has this.You could also set infinite persistence. All the traces will be layered, but you can probably pick out any interesting deviations from the normal sine wave.If you wanted a nice, clean, repeatable trace, I would probably use a relay to cut AC power and use the relay control voltage as the trigger, as others have already pointed out.

author: macboy
author_rank: Super Contributor
timestamp: December 03, 2019, 04:01:12 pm
content: Quote from: vk6zgo on December 02, 2019, 03:34:43 amThis would be a big problem 30 years ago with an analog scope, but all digital scopes have the capability to capture the waveformleading up tothe trigger event, rather than exclusively after the trigger, like with an analog scope. In fact, most digital scopes place the trigger event at the center (horizontally) of the screen by default, rather than at the left edge as was normal in analog days. You can further manipulate the controls to capture exclusively prior to the trigger, or after the trigger or anywhere in between. Of course you will need to set sample rate and sample depth appropriately in order to ensure that you can capture both enough time (pre-trigger) and enough HF detail.The glitch trigger may be the best bet here. Usually this will halt capture when a periodic trigger comes early or late. Try to set up a one-shot glitch trigger so that the absence of a trigger transition after 1/50 or 1/60 second (+10% or so) will cause the capture to halt. You might be able to set up the scope to save the waveform and start again, or do something similar from a connected PC. Or you might need to just monitor the scope and deal with each captured waveform individually.Some scopes have an envelope trigger (or something similar under another name) which lets you specify a min/max that the waveform must entirely fit within. If any sample point falls outside the envelope, capture is halted. It seems you probably don't have this, but the glitch should work for you just as well or better.

author: David Hess
author_rank: Super Contributor
timestamp: December 04, 2019, 06:09:53 pm
content: Quote from: iroc86 on December 03, 2019, 02:35:39 amDepending on how quickly shut-off occurs, setting the trigger to reject low frequencies will selectively trigger on the back EMF spike. I do this all the time to trigger on just reverse recovery of a diode in a low frequency circuit.

author: iroc86
author_rank: Regular Contributor
timestamp: December 05, 2019, 01:13:31 am
content: Those are some cool ideas! There's always more than one way to skin a cat, and I appreciate learning some other techniques from you all.Quote from: Circlotron on December 03, 2019, 04:38:58 amThat's an interesting alternative approach to measuring the back-EMF. Could you elaborate a bit more on this, and how the test setup might be configured in practice? The motor is drawing about 1 A peak-to-peak at 120 VAC according to my Fluke clamp-on current probe. Since the motor is designed to operate at mains voltage, wouldn't I need a fairly high-voltage DC source to generate that sort of current?Quote from: MarkL on December 03, 2019, 02:54:09 pmI do have the HP measurement module with mask testing on this scope, so this is definitely worth trying!Quote from: macboy on December 03, 2019, 04:01:12 pmThat's also a slick approach. I'll admit that I'm only familiar with basic triggering techniques, but the criteria for the glitch trigger as you described makes a lot of sense in this situation.Quote from: David Hess on December 04, 2019, 06:09:53 pmYeah, I think triggering on the event itself would probably best reflect what I'm actually looking to capture. I can see how rejecting LF would allow for triggering on the spike (relative to the 60 Hz signal) even if the overall magnitude of the spike is being limited by the snubber.--Okay, so now you've all got me thinking about a variety of ways to accomplish this task without resorting to external hardware. I should have some time over the next few days to investigate each of these ideas and report back.

author: Circlotron
author_rank: Super Contributor
timestamp: December 05, 2019, 01:43:51 am
content: Quote from: iroc86 on December 05, 2019, 01:13:31 amOne thing I don't think you mentioned and that is, are you switching the motor with a relay contact or a triac? The relay might switch off at the max of 0.5 amps whereas the triac will switch off when the motor current dips below the triac's holding current - maybe tens of milliamps.Anyway, for the method I suggested all you would need to do is apply enough DC voltage to the motor winding to make it conduct 0.5 amps (assuming you are using a relay). Motor will not run, of course. The needed DC voltage would depend only on the DC resistance of the motor winding. Upon turnoff the energy stored in the airgap of the magnetic circuit will try to arc the relay contacts, so your snubber will damp this of course. Just put the scope directly across the contacts and Bob's your uncle!

author: iroc86
author_rank: Regular Contributor
timestamp: December 05, 2019, 03:10:28 am
content: Quote from: Circlotron on December 05, 2019, 01:43:51 amGotcha! Silly me; I didn't realize that the DC voltage would be much lower due to the DC resistance of the winding. It's about 25 ohms, so that'd be just 25 VDC for 1 A.The motor is being driven by a triac to chop the waveform and adjust the speed, but I'm toggling the circuit on/off through a regular switch to mains (just for convenience during testing; the final design may use a relay in the same location). In this case, I don't think the triac will play a role in the shutoff timing, but I see what you mean about the switch points. Ideally, I should probably be cutting the AC source when the current is at its peak during the half-cycle to generate the largest spike and test the snubber in its worst-case scenario. Then again, it sounds like your suggestion with the DC approach might accomplish the same thing.

author: iroc86
author_rank: Regular Contributor
timestamp: December 18, 2019, 02:21:36 am
content: I thought I'd reply back with some updates on the scope triggering options. I tried each of the suggestions mentioned in this thread and had pretty good luck. I admittedly need a proper 100X probe to properly measure and tune my snubber circuit, but this was a useful exercise for triggering purposes.I didn't have a chance yet to test out Circlotron's method with DC current, but I will.Mask Test Triggering (MarkL)I created a waveform mask and set the acquisition to stop when the mask test fails, as well as automatically save the trace to memory. There are two disadvantages with this method, at least on my scope: 1) I need to use averaging mode because random peaking causes the test to fail, resulting in lost data due to the short duration of the back-EMF spike, and 2) the output is a trace capture, so I can't zoom in on the waveform after the fact. Even so, the technique was easy to set up and very repeatable.Glitch Triggering (macboy)This method required some fiddling, but it did work well. The glitch settings were negative polarity with a duration around 1/2 the period, or ~8.3 ms for 60 Hz. I started at 16.7 ms and slowly reduced the duration until the scope stopped triggering. Then, when I cut the power, it would trigger right in the center of the screen. In this situation, I think the duration is largely dependent on the shape of the waveform and its timing at the trigger voltage level. I'm using a triac to drive the circuit, so the output isn't a perfect sine wave.Back-EMF Triggering (David Hess)Turning on LF rejection and just triggering on the event itself worked reasonably well, although I'm definitely at the limit of my vertical range with only a 10X probe--the natural peaks and ringing from the LC input filter in my circuit interfered with the trigger, but I can see how this'd be a useful method.Current Probe TriggeringA few posts up I mentioned about measuring the current with a clamp-on current probe... that'd work for triggering, too! I don't know why it didn't occur to me earlier. I just set the trigger threshold outside the steady state peak-to-peak value coming from the probe and triggered on the current spike at shutdown.

author: David Hess
author_rank: Super Contributor
timestamp: December 18, 2019, 02:47:28 am
content: Quote from: iroc86 on December 18, 2019, 02:21:36 amFor oscilloscopes which support it, one trick is to use a delayed sweep and B trigger. The A trigger is used to trigger on an event which reliably occurs before the desired event and then the delayed sweep is set to trigger after delay with the delay set to just before the desired event.