Pulse width measurement on Rigol/Keysight - Page 1
Forum section: electronics / testgear

author: Blackgar
author_rank: Contributor
timestamp: June 26, 2023, 11:41:01 am
content: Hello all,I have the Rigol DS1102 and Keysight DSOX1102A oscilloscopes available for my measurements.For debugging purposes, for a 5V debug signal (output from MCU), I want to measure the pulse width that will be triggered x300 times.What I actually wanna do is to run the same event multiple times and measure the min and max of the durations.Is this somehow possible to be captured using the above oscilloscope and captured on a CSV or whatever file so I can analyze it?I might have access to other oscilloscope also.

author: alm
author_rank: Super Contributor
timestamp: June 26, 2023, 12:26:56 pm
content: Are you looking for aggregate statistics like mean pulse width and standard deviation, or do you need access to the individual measurements?I'm not familiar with those scopes, but scopes commonly support calculating statistics over measurements. But to get access to a series of measurements on this class of scope, I think you'll need a computer program that repeatedly takes a single shot acquisition, retrieves the measurement value and stores it. If the software that comes with the scope doesn't support it, then look into doing it with something like with WinGPIB (search the forum), TestController (also on this forum), Python or LabVIEW.Does the sampling rate matter? This way the sample rate won't be very high. Maybe in the order of 10 samples per second.

author: 2N3055
author_rank: Super Contributor
timestamp: June 26, 2023, 01:18:41 pm
content: Yes, like alm says for that you need to enable statistics on measurements..That old Rigol does not have it..I don't know if "Scrap the Toys, Get a Real Oscilloscope" Keysight DSOX1102A added statistics, they didn't have it at first if I remember correctly...Most new entry levels scopes from Rigol and Siglent do have statistics. Siglent SDS2000X+ and up also have histograms and histicons and other advanced features.

author: Blackgar
author_rank: Contributor
timestamp: June 26, 2023, 03:04:28 pm
content: Thanks for the replies.I need the actual measurements and not the statistics (min, max, avg etc)

author: Njk
author_rank: Frequent Contributor
timestamp: June 26, 2023, 03:36:13 pm
content: Perhaps it'll make sense to extend the scope to include the counters. That's a specialized instruments and their main advantage is that it seems difficult for the vendors to pack that devices with more and more features resulting in an instrument that can do everything (equally poor), like what we have now with the oscilloscopes. A counter can do one thing but do it well. Even a toy counter like that in the Rigol DG generator series can do what you need, including the statistics, plus the variation plot. The other advantage it that the situation there is more calm so the prices are lower. An old yet decent branded counter can be purchased on the second hand market at a friendly looking cost. Just an opinion.

author: 2N3055
author_rank: Super Contributor
timestamp: June 26, 2023, 05:19:46 pm
content: Quote from: Blackgar on June 26, 2023, 03:04:28 pmYou either don't understand or did not ask right question..You want to look at pulse width and monitor what was Min and Max for many repetitions?On a scope with statistics, you enable pulse width measurement. Scope takes a capture and shows measuement. You do that 100 times, and then statistics will show what was min and max width (and other stats you might not need).There are scopes that will measure only once per trigger event. Your Keysight is one of those.But there are other scopes that you can take one single trigger with let's say 100 pulses in it, and then it will measure pulse width of all pulses individually and make a statistics what was min, max (and other stat) in between those 100 pulses captured at one time...

author: Blackgar
author_rank: Contributor
timestamp: June 26, 2023, 06:32:13 pm
content: The statistics is not what I need.I need the measurement values foreachtriggered event. I thought the oscilloscope will be able to buffer the data and save them to one final CSV file.

author: 2N3055
author_rank: Super Contributor
timestamp: June 26, 2023, 06:35:29 pm
content: Quote from: Blackgar on June 26, 2023, 06:32:13 pmAha so not well explained..You could try to speak to a scope via SCPI from computer. That way you could write small program that will command scope to take capture and return measurements you need for that trigger event. Rinse and repeat. Save data to file..Picoscope has something called DeepMeasure that does something similar.

author: alm
author_rank: Super Contributor
timestamp: June 26, 2023, 08:55:06 pm
content: Quote from: Blackgar on June 26, 2023, 06:32:13 pmFor an advanced scope like a Windows-based scope you might be able to do something like that, but not these entry level scopes.Quote from: 2N3055 on June 26, 2023, 06:35:29 pmI already suggested the computer control solution in the first response and suggested some programs that might make that easier. TS could either do this with a scope or with a reasonably advanced frequency counter. The counter would be more accurate, but since they already have the scopes I'd start with that.

author: tautech
author_rank: Super Contributor
timestamp: June 26, 2023, 09:08:29 pm
content: Why ?Checking a protocol pulse train ?Use a Pulse trigger to set the parameters pulse must be within and an = or not =Also setting a mask can be useful but depends on the consistency of pulses if a mask can be useful.

author: nctnico
author_rank: Super Contributor
timestamp: June 26, 2023, 09:31:40 pm
content: Quote from: Blackgar on June 26, 2023, 11:41:01 amA frequency / time interval counter (typically a frequency counter can also measure time intervals) can do what you need. It depends a bit on the age on what is the best way to interface. Moderns ones can save measurements to a CSV file directly, for older models you'll need to read the measurements through GPIB, RS232 or USB using SCPI.

author: JDubU
author_rank: Frequent Contributor
timestamp: June 26, 2023, 10:14:28 pm
content: You can use a logic analyzer for this.Download Saleae's logic application (https://www.saleae.com) and use it in free demo mode to see if it works for you. You can export the captured data in a .csv file and do what you want with it.Latest versions of their devices can also capture analog signals and export voltage levels for each sample interval.

author: Caliaxy
author_rank: Frequent Contributor
timestamp: June 26, 2023, 11:17:22 pm
content: Sounds (to me...) like a perfect case for using segmented memory acquisition.Acquire in segmented mode then save the outcome on a USB memory stick, in CSV format. All your segments (each with a pulse) will be there. Should work on your Keysight DSOX1102A (it works beautifully on my DSOX1204). Not familiar with that particular Rigol model, but if it has segmented memory it should work too. Of course, you can analyze the segments directly on the screen, one by one, after acquiring all of them.You might miss some pulses if they are fired faster than the trigger re-arm time (~10us or so). Also, might not be very happy with the resolution (each acquisition will be limited to the total memory of the scope divided by the number of segments - i.e. you'll get ~33,000 data points/acquisition for 300 segments, to a total of 1MB - the available memory on that scope, if I am not mistaken).

author: 2N3055
author_rank: Super Contributor
timestamp: June 27, 2023, 05:16:56 am
content: Quote from: Caliaxy on June 26, 2023, 11:17:22 pmHe wants pulse width measurements, not scope captures...

author: ozcar
author_rank: Frequent Contributor
timestamp: June 27, 2023, 06:15:00 am
content: Quote from: Blackgar on June 26, 2023, 11:41:01 amDepending on the timing, perhaps another MCU?

author: Caliaxy
author_rank: Frequent Contributor
timestamp: June 27, 2023, 02:58:30 pm
content: Quote from: Caliaxy on June 26, 2023, 11:17:22 pm^^^^^^^^^^^^^I have to take this back, it's not true - just one segment (probably the one displayed on the screen at the time of saving) gets saved as CSV. Bummer.Edit: actually itdoessave all the acquired segments if so instructed, with each datapoint time stamped, so you can figure what the blind time between consecutive segments was.

author: Blackgar
author_rank: Contributor
timestamp: June 28, 2023, 06:06:50 pm
content: Thank you all for the replies.I managed to get access to a Keysight DSOX4024A and captured what I wanted.