I have a dual CCD camera module that outputs 2 NTSC composite video
signls. The two signals are in sync.

In order that I can view this stereo video feed on a head mounted
dual-display device, I need to take the two signals and FRAME interlace
them into one NTSC composite signal.

The plan goes something like this:

By using a national semi. LM1881, pull the ODD/EVEN field sync signal off
of one of the composite signals. Use this information to switch between
the two video signals during the vblank period, thus getting a FRAME
interlaced composite output.

The problem goes something like this:

To start with I have only a basic EE background, so I don't necessarily
understand what happens to video signals as they go through wires, traces,
capacitors and resistors, etc. I'm a software type, so if you find
yourself thinking "Man, this guy doesn't know what he's doing", you are
probably right.

So, I start by trying to get the LM1881 to give me a nice steady odd/even
field signal. I connect the various components to and let it rip.

First problem: Nothing happens. So, I add the optional lowpass filter on
the signal input, and still nothign happens. I pick up the camera board,
and inadvertantly touch the RCA connector; my finger bridges the two
leads. The circuit starts working. So, I add a 1 meg resistor between
the signal and ground leads on the incoming composite feed. I get a
somewhat consistent odd/even signal.

Second problem: If I expose the camera to more or less light, it tends to
cause the odd/even output to stop working (for instance if I cover the
lens of the camera, the odd/even line stays high or low until I uncover
it) I'm sure this is related to #1 and my 1 meg resistor hack.

Third problem: When I have the two capacitors and resistor on the input
signal, it drastically changes when viewed on my [very crappy] scope.
(as compared to measuring the signal not connected to anything)
Since I want to use that signal as an output, I am concerned that it
doesn't look the same as it used to (I'm not even sure if it contains much
video information at all any more). Do I need to run the initial signal
through some sort of amplifier, or something first?

Note: I first put this on a breadboard, and when I ran in to trouble I
moved it to a Rad Shack style prototype board. Haven't been able to make
it do much on the proto board yet. :(

> I have a dual CCD camera module that outputs 2 NTSC composite video
> signls. The two signals are in sync.
>
> In order that I can view this stereo video feed on a head mounted
> dual-display device, I need to take the two signals and FRAME interlace
> them into one NTSC composite signal.

This doesn't make any sense to me. You have two separate cameras producing
two separate video signals. You want to display these two signals on two
separate monitors.

Tell me again why you want to throw out half the information you have to
convert it to a single stream, only to then convert it back to two separate
streams again?

> > I have a dual CCD camera module that outputs 2 NTSC composite video
> > signls. The two signals are in sync.
> >
> > In order that I can view this stereo video feed on a head mounted
> > dual-display device, I need to take the two signals and FRAME interlace
> > them into one NTSC composite signal.
>
> This doesn't make any sense to me. You have two separate cameras
producing
> two separate video signals. You want to display these two signals on two
> separate monitors.
>
> Tell me again why you want to throw out half the information you have to
> convert it to a single stream, only to then convert it back to two
separate
> streams again?

The two monitors are not really separate. They are both in one pair of
glasses, and have a common video input. There is a logic signal input to the
glasses that steers each frame to the correct eye.

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
software)

> > I have a dual CCD camera module that outputs 2 NTSC composite video
> > signls. The two signals are in sync.
> >
> > In order that I can view this stereo video feed on a head mounted
> > dual-display device, I need to take the two signals and FRAME interlace
> > them into one NTSC composite signal.
>
> This doesn't make any sense to me. You have two separate cameras producing
> two separate video signals. You want to display these two signals on two
> separate monitors.
>
> Tell me again why you want to throw out half the information you have to
> convert it to a single stream, only to then convert it back to two separate
> streams again?

I don't manufacture the headmount display. It takes a single composite
input and frame deinterlaces it, displaying half of the frames on one
display, and half on the other. So that's the input spec I am left to
deal with.

As far as concerns with the display "knowing" which eye to start
displaying on, it doesn't. You can simply toggle between "left first" and
"right first", if that makes sense.

> The two monitors are not really separate. They are both in one pair of
> glasses, and have a common video input. There is a logic signal input to
the
> glasses that steers each frame to the correct eye.

Ah, so the problem is that the HMD is an integrated unit that only accepts
one video signal. Somewhere inside it has two separate monitors, though.
Sounds like this is the wrong HMD for the available signal. Why not get the
right one or perform a little surgury to remove the internal splitter?

The composite approach is reasonable for the single monitor case with
separate shutters for each eye. In that case, though, the frame rate is
usually much higher than NTSC video, so you've got more room to play with.
Doing this with an HMD sounds like you are creating a headache generator.

> one video signal. Somewhere inside it has two separate monitors, though.

yes.

> Sounds like this is the wrong HMD for the available signal. Why not get the
> right one or perform a little surgury to remove the internal splitter?

The HMD is used for other things, and cannot be modified. As far as
"getting the right one", keep in mind this is just a little side project,
and there isn't funding for "getting the right one".

> The composite approach is reasonable for the single monitor case with
> separate shutters for each eye. In that case, though, the frame rate is
> usually much higher than NTSC video, so you've got more room to play with.
> Doing this with an HMD sounds like you are creating a headache generator.

The displays are LCD-type, and I believe they hold the signal for two
frames (ie you don't get terrible flicker).

So, for a minute lets assume that I have sound reasons for choosing my HMD
and my dual camera circuit.

My questions are:

1. I was having trouble getting the LM1881 to give a consistent sync
signal when configured as per national semiconductors datasheet. Any
thoughts on this?

2. When the signal is fed in to the 1881, the properties seem to change
quite a bit. Since I was planning on using this signal as an output (ie
before it hits the resistor/capacitor filter stuff), I am wondering if I
need to do something different. (ie run it through an amplifier /
something first, and get two signals, one to drive the 1881, and one to
use as my output)

> As you have an oscilloscope first check the signal from the camera is to
> specification i.e. 1 volt peak to peak comprising 0.3 volt sync pulses and 0
> to 0.7 volt video.

I will do this, but first...

> Have you terminated the video camera ?

Since I don't know what you mean, I'd have to answer no. :)

I will tell you what I have done:

1. The camera I am using works (ie displays a good picture when hooked to
a TV)

2. When I conect it to the 1881 I hook it up as follows:

The outside ring of the RCA connector gets grounded to the power supply
ground (is this correct?)

The inside pin part of the RCA connector is hooked to a 0.1 microfarad
cap, which is then connected to pin 2 of the 1881. Additionally a
low-pass filter (as per datasheet) that consists of a 660 ohm resistor (?)
in in series with the signal, and an additional 550 picoF (?) cap to
ground.

> > As you have an oscilloscope first check the signal from the camera is to
> > specification i.e. 1 volt peak to peak comprising 0.3 volt sync pulses
and 0
> > to 0.7 volt video.
>
> I will do this, but first...
>
> > Have you terminated the video camera ?
>
> Since I don't know what you mean, I'd have to answer no. :)

Analogue Video Sources consist of a 2 volt peak to peak generator with a 75
ohm source impedance to match the 75 ohm coaxial cable used to interconnect
equipment. The end of the cable must be terminated in 75 ohm for correct
operation. Domestic equipment capable of accepting video such as a TV or
Video Recorder have these 75 ohm terminations inbuilt. Professional and
Semiprofessional equipment have an input and output socket which are
connected together internally allowing equipment to be daisy-chained with
the last piece of equipment being terminated in 75 ohm. This type of
equipment usually has an input impedance of around 10k ohm or more although
I have met equipment with less.
>
> I will tell you what I have done:
>
> 1. The camera I am using works (ie displays a good picture when hooked to
> a TV)

>
> 2. When I conect it to the 1881 I hook it up as follows:
>
> The outside ring of the RCA connector gets grounded to the power supply
> ground (is this correct?)
>
> The inside pin part of the RCA connector is hooked to a 0.1 microfarad
> cap, which is then connected to pin 2 of the 1881. Additionally a
> low-pass filter (as per datasheet) that consists of a 660 ohm resistor (?)
> in in series with the signal, and an additional 550 picoF (?) cap to
> ground.
>
> Does this qualify as terminating the video camera?

No it qualifies as High Impedance (sort of)
>

This two camera module you have, presumably it has a synchronising pulse
generator which keeps the two cameras in sync. Why cannot you access these
signals to provide the switching ?

I don't have a 1881 application in front of me, but did you make sure
that:

1. It is coupled to the video signal using a capacitor. 2. That the input
pin is connected to Vcc or Gnd through an appropriate resistor (or not at
all) at the chip as required by the application note. 3. That the video
signal line is terminated into 75 ohms at all times.

#3 means that you put a seventy-five ohms resistor between the signal line
and gnd near your project, *unless* the video signal continues to another
device that is specifically designed to receive a video signal (and has
the 75 ohms load inside). Better professional grade units have a
feedthrough style video hookup with two BNC connectors and a switch that
turns on the 75 ohms at will.

In my experience the even/odd signal out of a 1881 is fairly reliable, but
do not expect miracles. I once had trouble with cameras that were
occasionally exposed to very strong light. This made the 1881 go
temporarily crazy and miss a few frames. The problem was really the cheap
analog processing (and clamping) in the cameras.

If you have this sort of trouble you can divide the video signal going
into the 1881 using a resistive divider to about 70%. The 1881 will still
work right but major camera overloads will be ridden out better (however
this reduces the tolerance for lower sync levels).

If you do terminate it with a 75 ohm resistor, be sure to put it BEFORE the
DC block capacitor (that is, on the camera side of the cap). The LM1881
performs DC restoration as a part of its processing, and if you try to tie
its input to ground through a low impedance, I don't think it will be able
to restore properly.

>I don't have a 1881 application in front of me, but did you make sure
>that:
>
>1. It is coupled to the video signal using a capacitor. 2. That the input
>pin is connected to Vcc or Gnd through an appropriate resistor (or not at
>all) at the chip as required by the application note. 3. That the video
>signal line is terminated into 75 ohms at all times.
>
>#3 means that you put a seventy-five ohms resistor between the signal line
>and gnd near your project, *unless* the video signal continues to another
>device that is specifically designed to receive a video signal (and has
>the 75 ohms load inside). Better professional grade units have a
>feedthrough style video hookup with two BNC connectors and a switch that
>turns on the 75 ohms at will.
>
>In my experience the even/odd signal out of a 1881 is fairly reliable, but
>do not expect miracles. I once had trouble with cameras that were
>occasionally exposed to very strong light. This made the 1881 go
>temporarily crazy and miss a few frames. The problem was really the cheap
>analog processing (and clamping) in the cameras.
>
>If you have this sort of trouble you can divide the video signal going
>into the 1881 using a resistive divider to about 70%. The 1881 will still
>work right but major camera overloads will be ridden out better (however
>this reduces the tolerance for lower sync levels).
>
>Peter
>
>--
>http://www.piclist.com hint: PICList Posts must start with ONE topic:
>[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

>The two monitors are not really separate. They are both in one pair of
>glasses, and have a common video input. There is a logic signal input to the
>glasses that steers each frame to the correct eye.

> #3 means that you put a seventy-five ohms resistor between the signal line
> and gnd near your project, *unless* the video signal continues to another
> device that is specifically designed to receive a video signal (and has

> >The two monitors are not really separate. They are both in one pair of
> >glasses, and have a common video input. There is a logic signal input to the
> >glasses that steers each frame to the correct eye.
>
> H O W ? ? ?

I'm not sure what you are asking exactly, but here is my understanding of
the system:

It is a head-mounted display which has two displays. One display is
completely visible by the left eye (and only the left eye) and the other
display is completely visibleby the right eye (and only the right eye).

The input signal is an NTSC composite video signal. Internal to the HMD
this signal is processed -- "odd" frames are displayed on the right eye,
and "even" frames are dislayed on the left eye (NOTE: frames, not fields).
There is a "problem" with "bootstrapping" the system, that is making sure
that the correct frames are displayed on the right / left display. To get
around this a toggle button is used (on the headmount) to switch between
the two possible frame -> display mappings.

As far as how it all works, I am guessing it does something along the
lines of looking for the vertical sync signal, and switches the current
display for each new frame. Sort of the inverse of what I am trying to
do.

> > This two camera module you have, presumably it has a synchronising pulse
> > generator which keeps the two cameras in sync. Why cannot you access
these
> > signals to provide the switching ?
> >
> > Chris
>
> I'd prefer not to modify them -- we will continue to use them in other
> capacities as well, and I would like to leave them as is for this reason.
>
> I guess I had figured that this wasn't going to be so hard, too :)
>
I am intrigued. Who makes these dual camera modules ? Sounds like they might
be ideal for some applications I have in the pipeline.

> >Doing this with an HMD sounds like you are creating a headache generator.
>
> It really won't be bad at all if the displays have an appropriate (2
frame)
> peristance.

Pesistance isn't the only issue. You can get headaches if the virtual 3D
scene does not update to head movement fast enough. Apparently even 60Hz is
too slow for this. By splitting feilds of a frame he will only get 30Hz
updates, and then only at half the full vertical resolution.

> > Actually, in this application termination will probably be supplied by
the
> > glasses. He wants his sync sep circuit to be rather high impedance so as
not{Quote hidden}

> > to load the signal 'on its way by'.
>
> Yes, but this got me thinking:
>
> Since I will be running the video signal (and the second video signal) in
> to a multiplexer, it will only see the termination impedence from the
> glasses half of the time, it would seem.
>
> Is there an easy way to feed in one video signal to some IC, and get out
> two, independent video signals?
>
> ie I end up with two signals, the first one can be terminated, and run in
> to the 1881, etc, without affecting the second signal, which I can then
> feed through the mux.
>
>

Without wishing to teach my granny to suck eggs, I would respectfully
suggest that you break the overall system down into sections. The first
problem that you need to solve is getting the LM1881 to produce a reliable
stream of odd/even frame pulses. Once you have solved that problem then you
can apply yourself to the problem of switching signals.

If you wish to continue attempting to resolve several problems at the same
time then Figs 4 & 5 on the data sheet should give you a clue. What are you
to do with the 3 unused gates on the CD4066 ?

You may also care to look at the Elantec Data sheet for the EL1881 which
gives information on the reason for the input filtering and the EL4581
which is a pin compatible enhanced version. Their data sheets also have more
detailed timing diagrams.

> > >Doing this with an HMD sounds like you are creating a headache
generator.
> >
> > It really won't be bad at all if the displays have an appropriate (2
> frame)
> > peristance.
>
> Pesistance isn't the only issue. You can get headaches if the virtual 3D
> scene does not update to head movement fast enough. Apparently even 60Hz
is
> too slow for this. By splitting feilds of a frame he will only get 30Hz
> updates, and then only at half the full vertical resolution.

That's if this application is even supposed to follow head movement.

Also, his resolution is limited by the LCD displays. I'd be surprised if
they were more than about 240 pixels high. Besides, I think he said that
the glasses switched after every frame, not field.

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
software)

The general outline of the system you are trying to build should imho
follow the following topology:

Camera outputs are noted Ca and Cb. Z0 are 75 ohm terminators to GND. Z1
is a series resistor of 75 ohms. Ccoupl are coupling capacitors (abt.
470uF 6V should be enough, minus to resistors in this topology):

> I am intrigued. Who makes these dual camera modules ? Sounds like they might
> be ideal for some applications I have in the pipeline.

The original system was made by (I believe) Kurt Konolige for his PhD
thesis work. He went on to SRI (Sarnoff Research Institute) where the
system was further developed and commercially marketed, I believe.

> > I am intrigued. Who makes these dual camera modules ? Sounds like they
might
> > be ideal for some applications I have in the pipeline.
>
> The original system was made by (I believe) Kurt Konolige for his PhD
> thesis work. He went on to SRI (Sarnoff Research Institute) where the
> system was further developed and commercially marketed, I believe.
>
> You can learn more about it at:
>
> http://www.ai.sri.com/~konolige/svs/
>
> I hope it's useful to you
>
Interesting but not anything particularly groundbreaking. From your reply I
would infer that you are using two "standard" camera modules. If I am
correct then I have to ask, How are you Genlocking them ?

> > too slow for this. By splitting feilds of a frame he will only get 30Hz
> > updates, and then only at half the full vertical resolution.
>
> That's if this application is even supposed to follow head movement.

No, it doesn't. It simply pipes stereo video data into a stereo display.

> Interesting but not anything particularly groundbreaking. From your reply I
> would infer that you are using two "standard" camera modules. If I am
> correct then I have to ask, How are you Genlocking them ?

Well, the module that I am woring with takes cares of that itself, I
guess.

1. It supports an output mode where the two cameras are field interlaced
on one output, that is even fields come from camera 1, and odd fields from
camera 2. This in itself suggests to me that it's genlocked internally.

2. I put both signals on my [very crappy] scope, and found the sync on
both of them. They were synced pretty darned well (ie I couldn't visually
tell a time skew between the two on my [very crappy] scope)

The CRO signal may be missleading, you need to check if the is set to ALTernate or CHOP. You need CHOP to check that the video is in phase, ALT will always show the two signals in sync as it triggers for each chanel. Some CRO's chose between these modes depending on the trace sweep speed.
What other connections are visable between the cameras ? ie SYNC, power, GEN. etc, or are the two cameras boxed together? What are the connectors on the camera labeled as, please include the ones that don't have anything attached.
If they are studio or scientific cameras then there may be one thick cable leading to the camera from a power/ signal management box where signals like Genlock or Sync may be accesable.

From what has been said you will need to terminate both camera video outputs at your switcher box (75 ohms),
using 2 4066 gates & an inverter gate build an A/B analoug switch,
the output of the analoug switch should go into a buffer amplifier with a Gain of 2.
The output of the Buffer Amp goes to the video input of your display via a 75 ohm resistor then 75 ohm coax.
The buffer amp can be made from an opamp with minimum of 4mA output and min of 10MHz band width.
The video input to the + input on the opamp, two 400 ohm resistors one between 0 volts and -input on opamp, the other between -input of opamp and opamp output (this sets up a gain of 2).

>>> RemoveMEsbwebb0EraseMEEraseMESAC.UKY.EDU 01/29 3:18 PM >>>
> Interesting but not anything particularly groundbreaking. From your reply I
> would infer that you are using two "standard" camera modules. If I am
> correct then I have to ask, How are you Genlocking them ?

Well, the module that I am woring with takes cares of that itself, I
guess.

1. It supports an output mode where the two cameras are field interlaced
on one output, that is even fields come from camera 1, and odd fields from
camera 2. This in itself suggests to me that it's genlocked internally.

2. I put both signals on my [very crappy] scope, and found the sync on
both of them. They were synced pretty darned well (ie I couldn't visually
tell a time skew between the two on my [very crappy] scope)

>The CRO signal may be missleading, you need to check if the is set to
ALTernate or CHOP. You need >CHOP to check that the video is in phase, ALT
will always show the two signals in sync as it triggers for >each chanel.
Some CRO's chose between these modes depending on the trace sweep speed.

Only if the scope is set to 'NORM' trigger. My scope lets me trigger on a
single channel and then display both channels on that timebase (using either
ALT or CHOP)

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
software)

> > I have a dual CCD camera module that outputs 2 NTSC composite video
> > signls. The two signals are in sync.
> >
> > In order that I can view this stereo video feed on a head mounted
> > dual-display device, I need to take the two signals and FRAME interlace
> > them into one NTSC composite signal.
>
> This doesn't make any sense to me. You have two separate cameras
> producing
> two separate video signals. You want to display these two signals on two
> separate monitors.
>
> Tell me again why you want to throw out half the information you have to
> convert it to a single stream, only to then convert it back to
> two separate
> streams again?

The unit the two monitors are part of must remain in it's current form,
and it is designed for only one video stream. TTYL