Generating vertical blanking pulses for both ntsc and pal

i havnt been posting a whole lot lately about my projects - had a bit of a hiatus from circuit design earlier this year - but back onit now, with more time and energy than ever lol so watch this space

anyway, two circuits i am currently working on require vertical blanking pulses that can be configured to fit either NTSC or PAL standards, so figured it was finally time to dive into how best to achieve this.

(the two circuits btw are my pcb_adaption of @schaferob chroma_luma_invert - discussed here , and the latest revision of @Gael and my sync_ope - discussed here )

the idea

Given that we already have the V_SYNC pulse (generated either from lm1881/similar sync extractor or from comparator circuit as in Robs design) we want to extend this V_SYNC pulse in both directions to cover the entire vertical blanking region

in this picture you can see the vertical blanking (in blue) over raw video signal (in yellow) - the V_SYNC is the smaller low yellow pulse partially visible about two fifths into blanking.

the idea is to use two monostable stages to extend the V_SYNC pulse - first from start of V_SYNC to end of BLANKING, and then from end of BLANKING to start of BLANKING

some more discussion about using monostables to generate blanking can be found in this thread - in short the values of the capacitor and resistor between Cx and RxCx set the length of the pulse. by using a variable resistor we can change this pulse length

i want to find some values for x1, x2 (capacitor C7 & C6) y1, y2 (resistor R26 & R25) and z1, z2 (varible resistor RV4 & RV3) that allow this same circuit to work with either NTSC or PAL

small technical aside

in Robs ntsc design he uses a 4040 counter to help extend the pulse over 256 lines so the monostable only needs to fine tune over the last few lines. this makes setting accurately a bit easier for ntsc, but doesnt really help that much for pal (due to different line numbers etc). after some discussions with @BastienL i decided to try generate blanking without the counter.

the setup

i tried to calculate values that might work best but in the end found it was easier to just break it out to a breadboard and try a few things. I was using v4_mixer as a source so it was easy to switch between pal and ntsc while testing

the process i used was to set a ballpark range with the capacitor value, and try find a resistor value offset that is close to the smaller of the two signal lengths required. the variable resistor should cover as small a range as possible so that both pal and ntsc lengths are covered, but are spaced out enough that it is not too difficult to set them correctly… this required some trial and error as i narrowed in on a selection

the results

stage cap (x) resistor (y) variable resistor (z)
stage_1 0.1uf 12k 10K_pot
stage_2 1uf 22k 10k_pot

these were the values i settled on (although there will be other combinations that also work) i even tried to make a note as to where exactly the trimpots were set on my circuit for each video format. i imagine that you will need an oscilloscope to set correctly these trims but it could be nice if it was possible for users to set it without needing one - maybe i will try marking these spots on the pcb silkscreen for next revision

aftermath

proto_board looking a little worse for wear after all these changes - i soldered back in the values i chose.

it is less critical for C_BLANKING (since difference between pal and ntsc is smaller here) but i also made a note of what values i will use for that stage:

stage cap (x) resistor (y) variable resistor (z)
stage_1 1nf 10k 5K_pot
stage_2 1nf 75k 10k_pot (although 5K_pot should work here too)

special thanks to @BastienL and @schaferob for your help with this and in general :slight_smile:

4 Likes