Know Your Video Waveform

When you acquired your first oscilloscope, what were the first waveforms you had a look at with it? The calibration output, and maybe your signal generator. Then if you are like me, you probably went hunting round your bench to find a more interesting waveform or two. In my case that led me to a TV tuner and IF strip, and my first glimpse of a video signal.

An analogue video signal may be something that is a little less ubiquitous in these days of LCD screens and HDMI connectors, but it remains a fascinating subject and one whose intricacies are still worthwhile knowing. Perhaps your desktop computer no longer drives a composite monitor, but a video signal is still a handy way to add a display to many low-powered microcontroller boards. When you see Arduinos and ESP8266s producing colour composite video on hardware never intended for the purpose you may begin to understand why an in-depth knowledge of a video waveform can be useful to have.

The purpose of a video signal is to both convey the picture information in the form of luminiance and chrominance (light & dark, and colour), and all the information required to keep the display in complete synchronisation with the source. It must do this with accurate and consistent timing, and because it is a technology with roots in the early 20th century all the information it contains must be retrievable with the consumer electronic components of that time.

We’ll now take a look at the waveform and in particular its timing in detail, and try to convey some of its ways. You will be aware that there are different TV systems such as PAL and NTSC which each have their own tightly-defined timings, however for most of this article we will be treating all systems as more-or-less identical because they work in a sufficiently similar manner.

Get That Syncing Feeling

A close-up on a single line of composite video from a Raspberry Pi.
A close-up on a single line of composite video from a Raspberry Pi.

Looking at the synchronisation element of a composite video signal, there are two different components that are essential to keeping the display on the same timing as the source. There is a short line sync pulse at the start of each individual picture line, and a longer frame sync pulse at the start of each frame. The line sync pulses are a short period of zero volts that fills the time between the picture line.

A frame sync period, incorporating multiple line sync pulses.
A frame sync period, incorporating multiple line sync pulses.

In the close-up of a single picture line above there are two line sync pulses, you can see them as the two rectangular pulses that protrude the lowest. Meanwhile in the close-up of a frame sync period to the right you can see the frame sync pulse as a period of several lines during which the entire signal is pulled low. Unexpectedly though it also contains inverted line pulses. This is because on an older CRT the line oscillator would still have to be able to detect them to stay in sync. This frame sync pulse is surrounded by a few empty lines during which a CRT display would turn off its electron gun while the beam traversed the screen from bottom right to top left. This is referred to as the frame blanking period, and is the place in which data services such as teletext and closed-captioning can be concealed. In the spirit of electronic television’s origins in the early 20th century, both types of sync pulses are designed to be extracted using simple RC filters.

Know Your Porches

An annotated capture of a composite video line sync pulse.
An annotated capture of a composite video line sync pulse.

The area around the line sync pulse is particularly interesting, because it contains the most obvious hint on an oscilloscope screen that a composite video signal is carrying colour information. It also has a terminology all of its own, which is both mildly amusing and useful to know when conversing on the subject.

Immediately before and after the sync pulse itself are the short time periods referred to as the front porch and back porch respectively. These are the periods during which the picture information has stopped but the line sync pulse is not in progress, and they exist to demarcate the sync pulse from its surroundings and aid its detection.

Directly after the back porch is a short period of a pure sine wave (called the colour burst) that is at the frequency of the colour subcarrier. This so-called colour burst exists to allow the reference oscillator in the colour decoder circuit to be phase-locked to the one used to encode the colour information at the source. Each and every line that is not part of the frame blanking period will carry a colour burst, ensuring that the reference oscillator never has the time to drift out of phase.

After the colour burst there follows the luminance information for that line of the picture, with higher voltages denoting more brightness. Across the whole period from front porch to the start of the luminance information, that old CRT TV would have generated a line blanking pulse to turn off the electron gun while its target moves back across the screen to start the next line — the perfect time to transmit all of this important information.

Where Do All Those Figures Come From?

We’ve avoided specific figures because the point of this article is not to discuss individual standards. But it is worth taking a moment to ask why some of those figures come into being, and the answer to that question lies in a complex web of interconnected timing and frequency relationships born of a standard that had to retain backward compatibility as it evolved.

The frame rate is easy enough to spot, being derived from the AC mains frequency of the countries developing the standards. PAL and SECAM have a 50 Hz frame rate, while NTSC has a 60Hz one. The line frequencies though are less obvious, being chosen to fit the limitations of electronic frequency dividers in the mid 20th century. When there were no handy catalogues of 74 series logic, any frequency multiples between line and frame rates for the desired number of lines had to be chosen for simplicity in the divider chains required to link them in synchronisation from a single oscillator. As an example, the PAL system has 625 lines, with each 625 line image in the form of two interlacing frames of 312 and then 313 lines. The studio would have had a 31.250 kHz master oscillator, from which it would have derived the 15.625 kHz line frequency with a single divide-by-two circuit, and the 50Hz frame frequency with a chain of four divide-by-5 circuits.

Meanwhile the frequencies of the colour and sound subcarriers require a different view of the composite signal, in the frequency domain. The video spectrum is full of harmonics of the line frequency at regular intervals, and any extra carriers would have been required to have been chosen such that they did not interfere with any of these harmonics or with other carriers already present. Thus seemingly odd figures such as the PAL 4.43361875 MHz colour subcarrier frequency start to make sense when you view them as lying between line harmonics.

That a composite video signal can contain so much information while retaining the ability for it to be extracted by mid-century technology and furthermore to be able to be explained in a single page, is a testament to the inginuity of its many designers who added to its specification over the years. There was no one person who invented composite video, instead it is the culmination of the work of many different teams from [John Logie Baird] and [Philo T Farnsworth] onwards. It is unlikely that there will be further enhancements made to it, and it is probable that over the next decade or so it will march into history. For now though there is still a benefit to having a basic understanding of its components, because you never know when you might need to hack a display onto a microcontroller that happens to have a spare I2S interface.

Source link

Leave a Reply

Your email address will not be published. Required fields are marked *