How does the oscilloscope trigger really work?
When the signal measured then hits 5V, the scope's ADC activates and it starts to sample the signal. Some amount of data points are gathered, and these are plotted on the screen.
The scope's ADC is continuously running and gathering data. The trigger controls what is displayed.
Then there is a small "dead time" after which the scope again waits for the trigger condition to be met, and the same amount of data points are gathered again. These should now line up with the previous set of samples, and therefore the scope output looks stable on the screen.
This is only the case if your signal is perfectly periodic, and your explicitly only displaying triggered data (many scopes have an "auto" trigger feature that will display data even if the scope hasn't been triggered). As mentioned by Hearth in the comments to my answer, the "dead time" you describe is called holdoff, and correctly setting this is essential when triggering on certain waveforms. For example, a periodic signal with two quick pulses followed by a long delay would require a holdoff long enough to ignore the second pulse (so the scope doesn't re-trigger on the second pulse).
The time axis is something I don't completely understand. I believe that the origin of the grid, where the highlighted dotted lines intersect, is the triggering point. At that point (at "t = 0") the voltage should be equal to the trigger level voltage. Am I correct so far?
Yes.
The thing is, this is not always the case with my oscilloscope. Sometimes the voltage at the origin is not equal to the trigger level, and the signal even drifts slowly to either direction. What causes the signal to drift even if the trigger is set?
The x-axis is movable on most oscilloscopes. If you look closely at your screenshot, there is a white arrow at the top of the screen pointing down. That is your horizontal (\$t = 0\$) reference. You'll also notice a yellow arrow towards the left pointing right that shows the currently set trigger level.
Another confusion that I have: I've seen the right side of the origin called the "post-trigger" data and the left side "pre-trigger" data. How is there data from before the trigger, if data gathering starts from the trigger? Shouldn't the trigger point actually be at the very left of the screen?
The scope continuously captures data, but only displays data when the data it captured meets the trigger conditions. Based on your horizontal position, the amount of post-trigger or pre-trigger data displayed will vary.
While basic USB oscilloscopes use continuous software\digital triggering, this is not how benchtop scopes work. There is too much analog bandwidth at high speeds to be able to monitor all the information with an ADC. Especially since modern scopes have advanced triggering options.
Modern oscilloscopes have comparators that compare the voltage coming in to a preset level, then trigger on that. At high speeds, the ADC can keep up with the data, but processing it becomes an issue, so when triggered the scope only shows the ADC data around the trigger point.
Source: Keysight
Sometimes the voltage at the origin is not equal to the trigger level, and the signal even drifts slowly to either direction. What causes the signal to drift even if the trigger is set?
The little arrow determines where the scope's trigger level is triggering at.
Another confusion that I have: I've seen the right side of the origin called the "post-trigger" data and the left side "pre-trigger" data. How is there data from before the trigger, if data gathering starts from the trigger? Shouldn't the trigger point actually be at the very left of the screen?
If you use the horizontal position button you can move the trigger point to the left and get more data to the right. Because most people are interested in what happens before the trigger, oscilloscopes show that also.
What causes the signal to drift even if the trigger is set?
The dreaded drift can have very many causes...
- You're looking at Channel 1, but the trigger is looking at the Channel 2 input, or some 'scopes have an EXTernal trigger input jack. Don't just assume that the trigger is always looking at the same wave that you're viewing.
- Many 'scopes have a trigger menu that goes something like this:
Auto, Normal, Single . If the scope doesn't get a trigger in Normal or Single, you see a blank display.
But in Auto, a 'scope often will wait a short time, looking for a trigger. If it doesn't see an input it can trigger on, it will display whatever is in its data buffer at that moment...you get a drifty display. The cause might be because your trigger level control is set too high (above the waveform top) or too low (below the waveform bottom). - Trigger circuits often require a reasonable signal level. If the waveform is too small on the screen, a trigger may not be generated.
- Trigger menus may include exotic modes where a video signal is expected for example. Works fine on a video signal, not so well on other wave shapes.
- Other trigger options might offer noise filtering, high frequency reject, low frequency reject. These can foul up the triggering process on a waveform that appears clean on your display.
- On your photo, the trigger point appears on the timescale mid-screen (where it is most commonly put). That's the tiny downward pointing arrow. But you can sometimes find that the trigger point is W-A-Y offscreen. Your 'scope says yes, I'm triggering (green Trig'd icon in your photo), yet the displayed wave is drifting or is jittery. If you use the horiz position control to get the trigger back home, you'll likely find the drift or jitter disappears.
With practice, you can learn to find the proper control to restore display sanity without resorting to Autoset. Viewing some part of a complex waveform can require proper settings on many menus...autoset wipes them all, and sometimes makes poor choices.