Synch Pulse generator for Composite Video. (Stibilizing video)

I am trying to make a Composite Video Synch Pulse generator with the Help o f a micro Controller STM32 ,

Short story.

I have a wireless video source that is transmitted from a VTX So there is a PAL Camera that is connected to the VTX .

From the other side i have a VRX (receiver) that is connected to a monitor.

When the video signal goes bad , Synch Loss , tearing, rolling etc , in tha t moment , i want to generate a Synch Pulse signal and push it back into th e monitor , in order to stabilize the image...

What i have done so far.

-I can generate PAL or NTSC signal pulses from my Micro Controller.

-I can get the Horizontal and VErtical synch pulses with the LM1881 from my video source.

i tried programmatically to monitor the timing for the Hsynch and Vsynch fr om the LM1881 while the video was Crystal clear, and right after that i tri ed to push back the "cloned" synch pulses with my micro controller , but i t doesnt seem to syncronise, because i cant see any deference in the image.

SO before i start digging more into the code , is there an IC that does thi s dirty job? (take a Composite video in and spit out a synched ,stable signal out?)

Reply to
George Chatzisavvidis
Loading thread data ...

George Chatzisavvidis

Is that video from a 5 GHz model airplane or drone link? If so try with better antennas.

The LM1881 will lose sync too if signal is bad. How does your software know signal is bad? What do you mean by 'push back' Before you do anything you need to stabilize black level in that video, cut the orginal sync, and then insert your sync in its place. Your micro should use a slow PLL loop, else its sync signal will be erratic too.

There is a lot more to it, but what do you know?

Reply to
<698839253X6D445TD

Exactly the signal is 5.8GHz , and yes the LM1881 will return crazy values if signal goes bad.(so i know when the signal is good and when is not good) If the signal is fine i capture the timing and i begin to fire back my own synch pulse.

"Before you do anything you need to stabilize black level in that video, cut the orginal sync, and then insert your sync in its place. "

OK , stabilize black level in that video .. i dont know how can i do that.. cut the orginal sync = i need a synch remover? i need an ic?

Reply to
Nettraptor

Use fixed font to view, if not visible I can draw something.

figure 1 / / / luminance burst /

--- - |||--- | | ^ ^ | | B A | | -- sync

point 'A' is the black level. Normally you would 'clamp' that to some fixed voltage with a transistor switch.

figure 2

--------- ----- LM1881 burst pulse | | - - | |

----------- ------ your micro's clamp pulse

figure 2 small C sync pulse from micro (few hunded nF at most) | video ---- ||--------------- 0 \ HC4053 switch | \0---------------------------------- new sync under old video c Rb 0---- +0.7V b --===---- clamp pulse at time 'A' from micro, you could use an other part of the HC4053 for that e | fixed reference voltage V1

Now you have something to work with, as now you know and fixed what the 'black' level is, always 1V. Bottom sync is then 300 mV lower than that, so .7V.

The LM1881 has a negative going burst output pulse at position in time 'B' in figure 1. At the positive edge of that pulse clamp the black level, see figure 2 So if V1 is now say at +1V, then you can slice or gate the video in 'C' at 1V. and got rid of the original sync, here I use part of a 74HC4053 switch. Now add 300 mV negative or so from 1V to 0.7V your new sync pulse.

The problem is that the burst pulse from the LM1881 will also be distorted or at the wrong place or not present at all if video is bad, so your micro needs to make that pulse too. Do not clamp at burst position 'B', then you will lose color. This is the basic priciple, assuming your micro gets the pulses right and leaving out details. View with fixed font. In these 5 GHz FM links I have seen the signal move wildly for my drone. I added these antennas to my remote:

formatting link
Needs to be pointed right.

Does this help

1) no 2) yes 3) I dunno 4) help

In fact I put the video of my drone into this heads up display:

formatting link
added some telemetry, altitude etc. Never had such a bad signal I needed to fix it like you want to do.
formatting link

Reply to
<698839253X6D445TD

Before you go through all that trouble, consider to junk the entire video chain and move on to something more modern.

(HD or 4K camera, video encoder to MPEG4, digital downlink)

It will also enable you to record the video on an SD card so you have the high-quality (unaffected by link problems) video once you have landed the drone.

Reply to
Rob

first of all , thats Amazing man! and i am happy that you are familiar with fpv. My knowlegdes into the electronics are not so good , but as i understand , ypu propose to use the lm1881 to find the Black level from original video , and with the help of 74HC4053 close the source video > inject my synch pulse > and re open the video

is that right?

Reply to
Nettraptor

yes thats a solution even an FPGA is a good solution , but there is COST and Latensy that gets in the way

Reply to
Nettraptor

Rob i am interesting 100% in analog video for various reasons

Reply to
Nettraptor

I am interesting only in Analog video for various reasons

Reply to
Nettraptor

snipped-for-privacy@nospam.org I am thinking your solution again , and i believe you are right, with this approach we need the video to be perfect all the time because we depend from the LM1881 back porch pin.

The conclusion is that First i have to remove the Synch info from the original video , Second i have to replace it with my synch info.

What tools do i have: LM1881 , i have also a switch that i can close the feed from the video source wherever i want

Reply to
Nettraptor

Nettraptor wrote

Yes, replace the sync from the video by switching it between (for example) 1V and 0.7V. Normal video levels in this area of the world are about 1V peak to peak, or sometimes 1.4V peak to peak, with 300mV for the sync,

So if you can steer the black level to 1V, then the bottom sync would be at 0.7V, and your micro can then just switch between normal sync (pass signal through) or 0.3V for the new sync from your micro.

Reply to
<698839253X6D445TD

Rob opiniated

My drone has the HD video and records on a card _in_ the drone, still the downlink is analog exactly for latency reasons. Sometimes I use an USB digitizer in my laptop for a bigger screen.

formatting link
PAL camera looks at remote video, blue USB dongle goes in laptop, laptop has big sunlight readable screen (special custom Samsung version), but latency....

Analog has many advantages for flying, you want no latency at all. I can take a HD picture or video with the drone from the remote. Most HD sucks anyways for real time and sports if it is compressed a lot, MJPEG would then be better at a high frame rate.

Not so bad hey!

formatting link

MPEG4 / H264 at normally used compression rates is useless for fast motion in MNSHO.

Reply to
<698839253X6D445TD

Ok that sound like a valid thing, I thought he was using a PAL camera and analog downlink to use the picture material.

Well, maybe he better re-engineers the downlink transmitter then.

It should not be too hard to have good quality over FM on a video downlink that is basically within short visible range. And once the quality is deteriorating, it will fall so quickly that no amount of sync restoration is going to fix that. It would only be useful to do on an AM/VSB link, and I don't think that is what he is using.

Reply to
Rob

of a micro Controller STM32 ,

s a PAL Camera that is connected to the VTX .

r.

hat moment , i want to generate a Synch Pulse signal and push it back into the monitor , in order to stabilize the image...

my video source.

from the LM1881 while the video was Crystal clear, and right after that i t ried to push back the "cloned" synch pulses with my micro controller , but it doesnt seem to syncronise, because i cant see any deference in the imag e.

his dirty job?

the traditional solution is to use a, I forget the word now, but it's an os cillator that takes in the sync pulses, using them to lock it to freqency. So the odd erratic input pulse or complete loss of input doesn't phase it - or should I say doesn't de-phase it. If you're already doing this, picture rolling means the osc naturally drifts in frequency when it loses sync inp ut, just adjust its frequency until it's about right with no sync input. Yo u'll discover more issues, but should get it to work adequately.

NT

Reply to
tabbypurr

Yea, i just tried again, i send sync pulses in the correct timing over the incoming video , and unfortunetelly doesnt seem to take over and fix the bad signal,if i close the incoming video (unplug the drone) my sync pulses immediately generates Pal . i have to find a way to remove the original sync

Reply to
Nettraptor

Something like this (not tested, but in principle):

formatting link

Your biggest problem is to detect when the sync is invalid. And that assumes there is noting else wrong with the signal. If the FM link breaks down there may be much more going on. IMNSHO your best bet is to get a better antenna.

BTW you do not need a LM1881 chip to do sync separation and H V splitting,

formatting link
but that is all basic analog TV.. For you as you already have the chip it is easier.

I have also done sync separation and video processing in a PIC 12F and a PIC 18F14K22, it depends on the programmer:

formatting link

Analog video is fun in a way.

Reply to
<698839253X6D445TD

About 40 years ago we had a sync restorer where I worked Price about 6000 dollar in current value. Worked like charm with a lousy videorecoredr. Google for "video sync restorer".

Reply to
Sjouke Burry

Hi George,

In addition what other people suggested:

Do NOT mount your video receiver on top of the remote controller. You'll always have problems with sensitivity here. The frequencies are far away from each other (usually 5.8GHz and 2.4GHz bands) but the video receivers are very often really bad designs with no input filtering at all where the 2.4GHz transmission (usually packets) from your remote clogs up the video receiver, reducing its sensitivity.

Use a tripod to mount the video receiver and the video screen 1 or 2 meters away from the remote controller and enjoy much better video quality.

HTH, Wolfgang

--
From-address is spam trap 
Use: wolfgang (dot) mahringer (at) sbg (dot) at
Reply to
Wolfgang Mahringer

Now you just have to tell us how the uC will know where the faulty sync pulse is.

Reply to
Johann Klammer

Read the thread.

Reply to
<698839253X6D445TD

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.