A few issues with generating composite PAL using logic IC's - Page 1
Forum section: electronics / projects

author: PauloConstantino
author_rank: Regular Contributor
timestamp: January 15, 2017, 10:16:35 pm
content: Hi friends,I have finished working on a simple video card that generates sync pulses for PAL/CCIR monochrome televisions. Apparently I have gotten the TV to sync to my signals, however, I was hoping to be able to control the brightness of the screen with my circuit in order to confirm that the TV was really obeying the circuit. Here's the problem! The TV only shows a white screen. I don't know how to manipulate the voltage in order to lower it and match the TV's requirements.My signals stay constant at around 4.5V, and then at sync times they go to 0V. What should I do to them to be able to fit them to the TV's requirements for composite PAL?Some sources say the sync pulses are -0.3V rather than 0V. Some say it's 0V. I tried inverting the signals to see what happens and what I see on the TV are lots of little horizontal white lines in a black screen, and a thick white line at the bottom. Since this is the inverted signal, does this mean that the original signal is correct? Since if the inverted one was correct, it wouldnt show the white lines everywhere.I appreciate your help.Paul

author: Benta
author_rank: Super Contributor
timestamp: January 15, 2017, 10:44:10 pm
content: What the absolute voltage level is, is a question of definition. Composite video signals are normally AC coupled, meaning picture content shifts the DC level.The reference point for composite PAL video is always the black level.Standard composite video has an amplitude of 1 V peak-to-peak (or white-to-sync if you like).Setting the black level as zero (your reference point), the voltages are:Peak white: 700 mVBlack: 0 VSync pulse: -300 mVAll video decoders sample and clamp the black level (due to the AC coupling), and process sync and luma/chroma from there.If you want to adjust brightness, you'll need to keep the black level constant, preserve the sync amplitude, and only attenuate the 0...700 mV part of the signal where active video is present. This is not trivial and involves timing constraints as well.

author: Ian.M
author_rank: Super Contributor
timestamp: January 15, 2017, 10:46:38 pm
content: You are after a 1V peak signal into 75 Ohms. Start with a 2V signal and put a 75R resistor in series with the video buffer's output. The analog video signal goes between 30% (black), and 100% (white) and the sync pulses go down to 0%. Your Video generator circuit must output the 30% black level during the front and back porch intervals before and after the sync pulse, as many monitors and other device with video input, AC couple the video signal and sample one or other of the porches to restore the DC level. Other cheaper devices clamp on the bottom of the sync pulse so its critical that it uses the full 30% of the voltage range.How to get there from what you have is difficult. If you explain your circuit in more detail including what output device(s) you are using, and the available supply rails, we'll try to help.

author: Brumby
author_rank: Unknown
timestamp: January 15, 2017, 11:01:27 pm
content: It seems you don't have a proper understanding of the "shape" of a composite video signal.Here's an image I found that should be helpful:(Use this in conjunction with the previous 2 posts)

author: Delta
author_rank: Super Contributor
timestamp: January 15, 2017, 11:08:46 pm
content: Have you even read the Wikipedia article on this subject? Why did you think 4.5v is a suitable level?Black = 0.3v, White = 1v, sync = 0vCool project and good work, but seriously mate, do some basic research.PS. There is no such thing as "Monochrome PAL.

author: Benta
author_rank: Super Contributor
timestamp: January 15, 2017, 11:08:55 pm
content: OK, rereading your first post, this jumped out at me:QuoteSo your black level is 4.5 V and your sync level is 0 V. Let's get this adjusted first:Reduce this amplitude to 300 mV with an output impedance of 75 ohms. This is easily done with a voltage divider that divides by 15 and where the two resistors calculated in parallel exhibit a resistance of 75 ohms.A quick 'n dirty calculation says 1.2 kohm and 82 ohm.Now you can supply your monitor with a black signal and sync pulses with the correct amplitude.Injecting active video is the next exercise

author: Benta
author_rank: Super Contributor
timestamp: January 15, 2017, 11:25:07 pm
content: QuoteNot really, it rather muddies the waters. It's a picture of NTSC/EIA, but the OP is asking about PAL/CCIR. When googling for pictures like this, it's to everyone's advantage if you have some knowledge beforehand.PAL/CCIR has no front/back porch, or rather: they are at black level.PAL/CCIR relative peak levels are +100 to -43 IRE, not -40 IRE.

author: Benta
author_rank: Super Contributor
timestamp: January 15, 2017, 11:30:02 pm
content: QuoteWhich Wikipedia article(s)?The ones I've seen are complete cr*p and I fully understand the OP's problems here.

author: PauloConstantino
author_rank: Regular Contributor
timestamp: January 15, 2017, 11:34:37 pm
content: Quote from: Benta on January 15, 2017, 11:08:55 pmBenta, I'm gonna try this right now! What I did with my circuit was to just add the sync pulse patterns and then keep the rest at a constant voltage, thinking that later on I'd be able to control this constant voltage to add video pixels. I am taking the output directly from a 74HC86 IC, which provides 4mA current at 4.5V output. My difficulty is to make this 4.5V signal into a lower voltage that can be seen as black by the TV. I want to do this just so I can adjust the brightness and see that the TV is really synchronized. Then later on I'll make a proper pixel circuit.I will try your voltage divider idea right now and get back to you.Thank you a lot!

author: Delta
author_rank: Super Contributor
timestamp: January 15, 2017, 11:37:04 pm
content: Quote from: Benta on January 15, 2017, 11:30:02 pmFair point. This one does at least show the voltage levels though.https://en.m.wikipedia.org/wiki/Composite_video

author: PauloConstantino
author_rank: Regular Contributor
timestamp: January 15, 2017, 11:38:34 pm
content: Quote from: Delta on January 15, 2017, 11:08:46 pmHow do you think I was able to make a circuit that generates the correct patterns if I hadn't done research? I have read plenty, that's why I was able to make the circuit which generates the signals. Now I just need to convert the 4.5 volts to the correct amplitude and at the right impedance, which is what I need help with.

author: PauloConstantino
author_rank: Regular Contributor
timestamp: January 15, 2017, 11:40:50 pm
content: Quote from: Benta on January 15, 2017, 11:30:02 pmYou are the nicest person I've ever met in a forum! I really appreciate that. I'll get back to you after I try the voltage divider

author: Benta
author_rank: Super Contributor
timestamp: January 15, 2017, 11:47:49 pm
content: QuoteTook a look at that one... it's one of the worst Wikipedia articles I've seen on this subject.

author: Delta
author_rank: Super Contributor
timestamp: January 15, 2017, 11:54:08 pm
content: This is a good read for generating composite video from logic circuits (an MCU in this case, but all good info)http://www.rickard.gunee.com/projects/video/pic/howto.php

author: Benta
author_rank: Super Contributor
timestamp: January 15, 2017, 11:55:51 pm
content: Error in SQL Query:

author: Benta
author_rank: Super Contributor
timestamp: January 16, 2017, 12:07:46 am
content: Paolo, sorry. My quick 'n dirty calculation wastooquick:you should aim for 600 mV pp at the voltage divider output (I forgot to include the 75 ohms at the input of your TV).Use 560 ohms and 82 ohms instead.Good luck.

author: PauloConstantino
author_rank: Regular Contributor
timestamp: January 16, 2017, 12:35:06 am
content: Quote from: Benta on January 16, 2017, 12:07:46 amI've read most articles on video generation that Ive found on the web. I tried the voltage divider but it didn't workThe strange thing was that the voltage divider added a lot of noise to the signal. Really a lot!I really have no idea what to do now. My signals timings are all correct, and the TV is working fine............Unfortunately I have no schematics because I just built it from my mind to test it real quick. I can see on the scope that the signals are correct.This is really odd

author: Benta
author_rank: Super Contributor
timestamp: January 16, 2017, 09:24:23 am
content: Strange, loading a 74HC86 should not result in noise.Is the supply line decoupled correctly ?

author: deephaven
author_rank: Frequent Contributor
timestamp: January 16, 2017, 09:38:50 am
content: What sort of input is the TV? Is it a composite input on an Phono connector or SCART connector?Do you have a means to generate a separate signal to the syncs which corresponds to the active part of the TV line? You need to mix this with your syncs so that (as described earlier) you get three levels - sync tip, black level, white level.

author: knks
author_rank: Regular Contributor
timestamp: January 22, 2017, 10:25:48 pm
content: Video Signal Measurement and Generation Fundamentalshttp://web.archive.org/web/20071220234050/http://zone.ni.com/devzone/cda/tut/p/id/4750

author: Benta
author_rank: Super Contributor
timestamp: January 22, 2017, 10:50:06 pm
content: QuoteVery nice page, and miles better that what's found on Wikipedia. Thank You.Still has problems, though, but 95% of it is OK.

author: Richard Crowley
author_rank: Super Contributor
timestamp: January 22, 2017, 11:16:28 pm
content: Note in particular Fig.6 "Video Levels" in the National Instruments web page.http://www.ni.com/white-paper/4750/en/#toc5Because the video signal is effectively AC coupled, the receiver/display samples the signal voltage level at a critical time slice of the video signal. That period after the color burst and before the start of the image area is the blanking and "Black Reference" level. The display samples (and holds) that voltage as the starting point of measuring the brightness for the entire line. And then it gets reset, sampled held and referenced again for each line.Because of backwards-compatibility with antique 70 year old CRT technology, here in NTSC-land, our black level is 7.5 IRE But you guys in the PAL/SECAM territories have blanking = black = 0 IRE. So that greatly simplifies DIY video signal construction.The peak to peak video level has been 1V for perhaps 50 years, since it was standardized back at the begining of color technology. Long, long ago, perhaps long before you were born, composite video signals were up at 4.5V PP. Creating the proper waveform should be an issue of relative voltages. You can use a simple attenuator to knock the PP voltage down to 1V at the output of your video circuit. I wouldn't worry about absolute levels until the final output attenuator. But any signal over 1V PP will almost certainly be mis-read as all-white by any video display.

author: BrianHG
author_rank: Super Contributor
timestamp: January 22, 2017, 11:29:05 pm
content: Ohhh, the good old days. I remember programming and overclocking a PIC16C54 + an analog CMOS 4053 switch as a dac to generate a full composite sync & it also had the ability to sync lock in and superimpose an incoming video signal. Also had a 16 letter font with OSD capabilities. When I switched to an altera EPM7128 combined with the pic, I had better text with color + color burst generation and locking.

author: BrianHG
author_rank: Super Contributor
timestamp: January 22, 2017, 11:41:21 pm
content: Quote from: Richard Crowley on January 22, 2017, 11:16:28 pmToday's norm, in consumer AV equipment, is with no load on your video out, there usually is a 2v p-p signal. When the TV applies a 75 ohm load, then you should have a 1v p-p on your video signal. This means you should have a series 75 ohm resistor on your output & before that 75 ohm, you should have a good 2vp-p drive. The signal should be AC coupled, but, most TV are forgiving/allow a 0v-1v signal when they load your signal with their internal 75 ohm terminator. I used to use a 470uf series cap in my circuits to remove this DC.

author: Richard Crowley
author_rank: Super Contributor
timestamp: January 23, 2017, 12:02:17 am
content: Yes, @BrianHG is absolutely correct. I neglected to mention the 75 ohm source impedance requirement which matches the 75 ohm destination impedance. So the output from your video circuit would be 2V PP behind 75 ohms. So that when it is terminated at the destination with 75 ohms, it becomes 1V PP.

author: Alex Eisenhut
author_rank: Super Contributor
timestamp: January 23, 2017, 01:25:27 am
content: Bit late here, but could Don Lancaster's TV Typewriter be of any help? I haven't read it in years, but it might be fun to look at anyways. It is for NTSC land but I don't remember color being used.