RGB to YPbPr (YCbCr) conversion and bright picture issues

Thread Starter

MaarioS

Joined Nov 7, 2019
10
I'm working on a specific RGB to YPbPr (component) converter. It is supposed to connect old consoles to a modern flat 240p supportive TV. However I have an issue with luma Y output part. Here is the schematic of the current version I created:


YPbPr formula is R 0.299 + G 0.587 + B 0.114 and resistors R1-R3 are supposed to do this part

Sometimes the picture is too bright on the top, especially if the picture is black, the picture gets bright on the top and gets even brighter after time. I noticed when I put R6 75ohm resistor as pictured, the brightness decreases a little as it should, however if I lower the resistor value even more, the picture gets screwed up overall.

Right now I'm clueless on how to fix it. Does anyone have any ideas?? I can take a photo of the brightness issue if needed. Many thanks in advance

EDIT: here's the real photo of the effect (some reflection is shown but the main issue is still visible)
 

bertus

Joined Apr 5, 2008
20,230
Hello,

The opamp U1 has a very high input resistance.
Try a 10 K resistor from that input to ground and see what happens.

Bertus
 

Thread Starter

MaarioS

Joined Nov 7, 2019
10
You mean positive or negative input?? When I connect 10K from GND to positive, the picture is slightly darker overall, however the bright issue is reduced just a little, however when I connect it to negative then the picture is slightly brighter overall but the issue described is even worse... The opamp is SGM8052 by the way
 

ronsimpson

Joined Oct 7, 2019
406
Information: the sn74lvc1g3157 is a single pole double terminal switch. The signal on pin 4 is either ground pin 3 or video from the amp pin 1 as controlled by sync on pin 6.

During sync the output of this circuit is at ground. Not-sync the output is from the amp.

I think there is a real problem in that we do not know the DC level of the video going into the circuit or the DC levels of the video of the output of the amp. In video we try to keep track of where the "black level" is.

Video in could be AC coupled and center around zero volts. It could be sitting at 0V to 1V. We do not know.
\
Do you have a scope?
 

Thread Starter

MaarioS

Joined Nov 7, 2019
10
I have a very crappy portable oscilloscope that is probably not suitable for this unfortunately... I tried to measure the signal, however everything is just as jittery anyway

Also, looking back at the datasheet of the analog mux, I can see this on page 7: ON resistance (peak): Isw = 32 mA; VCC = 4.5 V to 5.5 V Typ: 6.2 Max: 15. This means the switching current is very high for a device like this and it shouldn't exceed around 1mA while LM1881 datasheet page 3 states maximum output sink current is 5mA, meaning analog mux isn't even switched sufficiently. Is this the root cause of this or am I reading it wrong?
 

Thread Starter

MaarioS

Joined Nov 7, 2019
10
Once I tried to measure the red input signal with my crappy oscilloscope:
-when I switched to AC mode, the closest measurement I got was min: -200mV and max: 600mV, however the whole waveform was moving around, up and down on the screen constantly
-when I switched to DC mode, the waveform was in fixed position and the closest measurement was like min: 1.15V and max: 2.00V

So I ASSUME the input levels are in 700mV range which makes sense for an old console like this. If my speculation puts anything new on the table anyway. Just in case please forgive my lack of advanced knowledge...
 

MisterBill2

Joined Jan 23, 2018
4,890
You are not reducing the amplitude of the three signals because you do not have a voltage divider circuit. That is the very first problem.The signals are not reduced hardly at all because of the very high input impedance of that op amp. So you need to put probably a 1000 ohm resistor from the positive input terminal of the opamp to the opamp supply common. AND, if there is no power to the opamp or any of the other ICs then nothing will work. And since the connections are not shown it is probably the case.
 

ronsimpson

Joined Oct 7, 2019
406
because you do not have a voltage divider circuit
This might solve that. R4, I chose 750 because you want the green gain to be about 0.5. With R2=R4 you get a gain of -1 which gets cut in half by the termination resistors resulting in a total gain of 0.5. You will need two inverting stages.
1573273256045.png
The voltage on the (+) input and the black level clamping needs to be worked out.
 

MisterBill2

Joined Jan 23, 2018
4,890
It is not a good idea to leave an input open, and it makes more sense to simply connect a resistor to common. That will leave the inputs to have a reasonable termination, and avoid the need to provide bias to the non-inverting input.

There are possible problems with very low value feedback resistors, which I learned the hard way many years ago.
 

Thread Starter

MaarioS

Joined Nov 7, 2019
10
Many thanks for your continued conversation regarding this topic and suggestions. Just for clarification the whole picture is perfectly fine on all systems, however the black picture or mostly black picture is completely screwed up always displaying some brightness on the top of the screen... I worked on that solution for years and this is the best thing I achieved so far and at least there are no other artifacts and the sync is 100% correct and the picture never cuts out, maybe I can tweak this to 100% functionality at last. Your suggestions of black picture having non-zero value sound about right
 

Thread Starter

MaarioS

Joined Nov 7, 2019
10
Bumping this thread

This might solve that. R4, I chose 750 because you want the green gain to be about 0.5. With R2=R4 you get a gain of -1 which gets cut in half by the termination resistors resulting in a total gain of 0.5. You will need two inverting stages.
View attachment 190908
The voltage on the (+) input and the black level clamping needs to be worked out.
I tested this double-inversion idea and so far it gave me the worst results so far. Depending on the configuration, if I connect the + side of those op-amps to 5V through a resistor I get an extremely bright picture and if I connect them to GND I get an extremely dark picture, connecting them to 5V and GND at the same time doesn't even help and I have no idea how to make this work correctly. After all this diagram is unfinished so I have no idea what to do either
 

MisterBill2

Joined Jan 23, 2018
4,890
The circuit still needs to have those resistors working as voltage dividers, so you still need a resistor to ground from the common junction of R1,2,and 3. DC offset will also matter, but that is different.
 

Thread Starter

MaarioS

Joined Nov 7, 2019
10
Hey there, here is another schematic I found:


Does it make sense and should I implement the ideas from this??
 

MisterBill2

Joined Jan 23, 2018
4,890
That design looks reasonable and you should still be able to get the 74HC00 quad 2 input NAND gate IC. But locating the opamps, or whatever they are, the EL2D45 devices may be a challenge, since that is a 19+ year old design.It will take some research to even discover what their specifications are. Video amplifier ICs are a small subset of the linear amplifier world.
 

Thread Starter

MaarioS

Joined Nov 7, 2019
10
Do I even need double NAND gates anyway?? How about that 0.03 (uF?) capacitor as well, is it needed anyway??
 

MisterBill2

Joined Jan 23, 2018
4,890
Thr NAND gates serve 2 important purposes, the first being to provide a very well defined voltage and impedance to the following circuitry, and the second one is to provide isolation from the signal source. AND that IC costs less than a dollar. That 0.03 mFD capacitor is part of a delay circuit, and correctly locating the edge of the vertical synch pulse is rather important. But you only need it if you want the circuit to work correctly. You can put to 0.015 mFd caps in parallel, that should be simpler to find.
 
Top