Author Topic: Oscilloscope Single Shot Capture?  (Read 1901 times)

0 Members and 1 Guest are viewing this topic.

Offline gleeTopic starter

  • Contributor
  • Posts: 36
Oscilloscope Single Shot Capture?
« on: July 27, 2022, 02:27:49 pm »
Hello. I'm new to oscilloscopes but interested to learn. My current goal is to use a Hantek 5072P to capture two separate single events: a) charging and b) discharging a capacitor in an RC circuit. This seems like it should not be hard. But so far I have been unable to capture these wave forms. I hope someone with experience using this scope might be able to see what I'm doing wrong.

For guidance, I am using the Hantek DSO5000P Series User Manual (Version 1.1).

Section 6.4 Example 4 reads:
Quote
Capturing Single-shot Signal
You may refer to the following example to easily capture some aperiodic signals like pulses and
glitches. To set for a single-shot acquisition, follow the steps below.
1. First, set up the oscilloscope probe and the attenuation factor of CH1.
2. Turn the vertical VOLTS/DIV and horizontal SEC/DIV knobs to a proper position for a better examination of the signal.
3. Press the ACQUIRE button to see the Acquire menu.
4. Push the Peak Detect option button.
5. Push the TRIG MENU button and select Rising for the Slope option. Then adjust the trigger level properly.
6. Push the SINGLE SEQ button to start the acquisition.

I understand in general what each setting on the relevant menus aims to do but no doubt subtleties are lost on me. Using this recipe I have been able to capture a single instance of the scope's own 5V square wave calibration signal. I cannot understand why I have not been able to capture the RC circuit wave forms.

The RC circuit is constructed on a breadboard using 100nF cap and 1k resistor connected to variable DC power supply set to 3V. I have a push button switch connected across the capacitor to discharge. I can see with a multimeter that the circuit behaves as expected: with power supply on the capacitor shows ~3V. When the switch is closed the voltage across the cap drops to ~0V, when open it returns to ~3V.

With the 10x probe on CH1 of the scope connected to the positive side of the cap and the ground clip connected to the circuit ground, I can see a trace showing constant 3V when the scope is in Auto mode. My understanding is that for this circuit tau = RC = 100 x 10^-9 * 1000 = 10^-4 = 0.1ms = 100us and I have the horizontal time base of the scope set to 80us so that the charging event should take approximately 5 * tau = 500us = ~6 horizontal divisions to complete.

On the Acquire menu I have tried Normal and Peak detection modes with DC Coupling.

On the Trigger menu I have tried a) rising edge in either Auto or Normal modes. b) slope detection with a trigger value of +1V over 100us (a voltage which should be exceed during the first time-constant interval).

Any insight appreciated. Thanks!
« Last Edit: July 27, 2022, 02:30:30 pm by glee »
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3116
  • Country: us
Re: Oscilloscope Single Shot Capture?
« Reply #1 on: July 27, 2022, 03:11:12 pm »
Try this configuration:

Code: [Select]

          /
         /
  +12---o  ---o--/\/\/--o--||----GND
              P1        P2
 

Connect probes at the points P1 and P2.

Start with the capacitor discharged. Set your oscilloscope to trigger on probe 1, single-shot mode.

When you close the switch the scope will trigger and start recording. You'll see the cap charge on probe 2.

You can replace the switch with a square wave generator and you'll see the cap both charge and discharge.
« Last Edit: July 27, 2022, 03:15:09 pm by ledtester »
 
The following users thanked this post: glee

Offline gleeTopic starter

  • Contributor
  • Posts: 36
Re: Oscilloscope Single Shot Capture?
« Reply #2 on: July 28, 2022, 11:00:28 am »
OK. Thanks for the suggestion. I have rearranged the circuit and again, can verify with the multimeter that the cap dis/charges as expected. But I'm still unable to trigger the scope.
 

Offline eugene

  • Frequent Contributor
  • **
  • Posts: 495
  • Country: us
Re: Oscilloscope Single Shot Capture?
« Reply #3 on: July 28, 2022, 02:28:24 pm »
This is the standard circuit for observing RC charging and discharging. Flip the switch up to charge the cap and down to discharge it.

Put a scope probe on TP1 for triggering. If you set it to trigger on a rising edge, then the scope should trigger when the switch is flipped up. A scope probe on TP2 will show the voltage across the cap as it charges. Now set the scope to trigger on a falling edge and flip the switch down. In this case you can watch the cap discharge on TP2.

There's likely to be a problem with a mechanical switch. Namely switch bounce. That's because the contacts don't open and close cleanly; they bounce. Contact is made and broken over a few milliseconds. That will likely cause the scope to trigger repeatedly depending on where you have the trigger level set. If you set the scope to normal trigger mode (as opposed to auto) the last trigger will be saved on the screen. The problem is that your time constant is so short that the cap will have partially charged or discharged by the last trigger, so you won't see the entire charge/discharge event.

The typical way to avoid switch bounce its to get rid of the switch and drive the RC circuit with a square wave from a function generator. That way you can see both charging and discharging at the same time.

If you don't have a source of square waves handy, then you can increase the RC time constant to something much larger. That way, even if the cap charges or discharges a little before the last switch bounce, it will be only a tiny fraction of the total amount and will be insignificant. I have had students do this with a multimeter instead of a scope with a very long time constant like RC = 5 seconds. With a scope you could probably get away with RC around 1 second, but you will need a much larger capacitor and resistor.
« Last Edit: July 28, 2022, 02:31:11 pm by eugene »
90% of quoted statistics are fictional
 
The following users thanked this post: glee

Offline JustMeHere

  • Frequent Contributor
  • **
  • Posts: 782
  • Country: us
Re: Oscilloscope Single Shot Capture?
« Reply #4 on: July 28, 2022, 02:41:11 pm »
Your scope should have a square wave generator for calibration.  Pratice capturing the rising and falling edges on the wave.
 
The following users thanked this post: glee

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9914
  • Country: us
Re: Oscilloscope Single Shot Capture?
« Reply #5 on: July 28, 2022, 03:08:10 pm »
This display would be so much easier to create if the signal was repetitive.

Your scope probably has a 1 kHz compensation output for probe calibration.  As such the output is high for 500 us and low for 500 us (total 1 ms which is the period of 1 kHz).

If you want to show 6 time constants on both edges (charge and discharge), you need an RC time constant of 500us / 6 or around 83 us.  Given a 100 nF capacitor, the resistor needs to be

83x10-6 = R x 100x10-9 so
R = 83x10-6 / 100x10-9 = 830 Ohms  so 820 Ohms would be great, if available, but 1k Ohm will give just slightly less than 6 Tau.

So, drive the resistor / 100 nF capacitor with the compensation output and adjust the scope for proper triggering, V/div and t/div.  Once you have a stable and repetitive display, experiment with one shot.

Triggering from a bouncy toggle switch isn't destined to end well.

Personally, I would use an Arduino and the tone() function.

 
The following users thanked this post: glee

Offline gleeTopic starter

  • Contributor
  • Posts: 36
Re: Oscilloscope Single Shot Capture?
« Reply #6 on: July 28, 2022, 03:50:29 pm »
Ah. I see. Maybe I am too ambitious for a first try at this idea with a) such a short time-base and b) one-shot rather than repetitive sampling.

I also hadn't thought about the switch bounce problem at all. These things all make practical sense.

I don't have a function generator (other than the calibration signal from the scope, which I am able to capture) but I saw this post:

https://www.eevblog.com/forum/beginners/is-my-math-wrong-my-scope-off-or-whats-going-on/

with a schematic for a square wave generator ... maybe I can duplicate that...

Meantime, I can play around with (much) longer time-constant combinations and see if I can get a one-shot capture. Are there some switch types which are less prone to bounce? I guess electronic ones are. Maybe I can use a transistor as my switch?

Thanks for all the comments. Really helpful to understand what the limitations!
« Last Edit: July 28, 2022, 04:03:45 pm by glee »
 
The following users thanked this post: armandine2

Offline LordGeir

  • Newbie
  • Posts: 7
  • Country: no
Re: Oscilloscope Single Shot Capture?
« Reply #7 on: July 28, 2022, 04:40:56 pm »
Quote
I don't have a function generator (other than the calibration signal from the scope, which I am able to capture) but I saw this post:

https://www.eevblog.com/forum/beginners/is-my-math-wrong-my-scope-off-or-whats-going-on/

with a schematic for a square wave generator ... maybe I can duplicate that...

Hi there,
That was my post, and I thought I'd just post a quick note.
I'm using a LM324 quad op amp (to create 3 waveforms) but you could use a UA741 single op amp or LM358 dual op amp as well, if you have either of those on hand.
 
The following users thanked this post: glee

Offline armandine2

  • Frequent Contributor
  • **
  • Posts: 645
  • Country: gb
Re: Oscilloscope Single Shot Capture?
« Reply #8 on: July 28, 2022, 06:00:11 pm »
there are circuits which can de-bounce the switch - might enable you to recapture your ambition.

[ed to add an example]


« Last Edit: July 28, 2022, 09:52:19 pm by armandine2 »
Funny, the things you have the hardest time parting with are the things you need the least - Bob Dylan
 
The following users thanked this post: glee

Offline gleeTopic starter

  • Contributor
  • Posts: 36
Re: Oscilloscope Single Shot Capture?
« Reply #9 on: July 29, 2022, 01:05:53 pm »
Quote
I'm using a LM324 quad op amp (to create 3 waveforms) but you could use a UA741 single op amp or LM358 dual op amp as well, if you have either of those on hand.

@LordGeir: I looked at the LM324 and wondered if I could use the UA741 I already have... so that really does help, as I can try it this weekend :)

Haha. That debounce video is great. Wonder how many edits that took? ;D But among the few chips I have lying around there are some 555s, so I can play with that idea too. Thank you, too @armandine2.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf