VGA Sync to TV Sync-On-Green: Signal trouble

SamIAm

n00b
Joined
Dec 4, 2014
Posts
40
Here's one for people who know a thing or two about electronics.

First, let me introduce you to my friend, the AV Multi port.

5566376_zpszg5wrhof.jpg


See the rectanglar input on the top middle-right? This only exists on certain Japanese Sony TVs built from the late 90s to the mid-2000s, and it is an RGB input. In fact, it is exactly the same as the AV-Out port on a Playstation console, and the only cable ever released for it has the same male head on both ends. It can even alternate between RGB and YUV - clearly to accomodate the forced YUV DVD playback of a PS2.

The cool thing is, with a hacked cable, it's perfectly possible to use this AV Multi port as a general console RGB port. I've been doing just that for years.

My current project is this: getting VGA from a laptop to work through this port. My particular set handles 480p just fine, and it should (and as you'll see, does) handle 640x480 VGA as well.

As you may know, the red, green and blue color lines in VGA are basically the same as standard TV RGB. What's different is the sync information, and it's different in three ways:
1. Horizontal and vertical sync are split into different lines, so these have to be merged.
2. The voltage is a bit higher, so there should be resistors on the line.
3. The big one - VGA sync is positive, while TV sync is negative. In other words, VGA sync pulses look like this:

___-______-______-______-______-______-___

While TV sync pulses look like this:

---_------_-----_-----_-----_-----_-----_---

So you have to invert them.

I followed the schematic on this page to do the inversion.

vga2csync_zpspcwkyzhj.gif


I think that's Spanish, and "masa" means ground. The 4070 and all of those pin numbers are one simple little IC package.

The good news is, it works. The bad news is, things get complicated from here.

First of all, as a final quirk of this AV Multi port, if you feed it sync through the composite video line, it will FORCE the video mode to 240p. Higher resolutions have to be done with sync-on-green. I found this schematic to combine the sync and the green, and used it.

syncongreen_zps1y7xsd3s.png


Again, the good news is, it works. Finally, however, here comes the problem I am hoping you can help me fix: this added sync causes a low-level hum in the co-joined signal so that all black is tinted green.

(photo pending, sorry)

Note that this does not result in a greater intensity of green at brighter levels; white is still plain white.

So, what I need to do is get that hum out of the sync signal.

The first thing I've tried, using potentiometers, is adding resistance to the 5V line going into the 4070, and to the c-sync coming out of it before it links up with the green. In the case of the latter, it does have an effect, but as soon as the black starts looking like black, the sync drops out entirely and I get no image.

The next thing I'm going to try, I suppose, is adding as much resistance as possible to the two VGA sync signals before they enter the 4070, but somehow I'm not optimistic about that one. I think the hum is the 4070's fault. It seems too consistent to be only from the sync lines.

Does anyone have any ideas how I could filter this? I know how to use a soldering iron, and there's a great little parts shop right next to where I work, but I don't really know what to try.

Thank you!
 
Last edited:

mikejmoffitt

Mickey's Coach
Joined
Feb 6, 2014
Posts
578
I'm fairly certain VGA sync signals are TTL-level digital pulses. Why not just invert the sync signals (when necessary) with an inverter (like 74HC04) and then XNOR the signals together to get C-Sync (74HC266)? Most video cards will let you specify the sync polarity as well. In Windows with an NVidia card, this is part of the custom preferences, while in Linux modelines have sync polarity specified.

EDIT: having looked at the circuit, that's more or less what's already going on in the one you posted. Try attenuating the output when mixing.

For sync-on-green, you may want to install a potentiometer and bring the CSync's amplitude as low as possible. To accomplish this, you would wire the variable resistor in a potentiometer configuration. H/CSync goes to pin 1, Ground is connected to pin 3, and the variable voltage output appears at pin 2 (the wiper). I would do this to attenuate the sync signal being mixed, rather than changing the driving voltage for the 4070 chips (not a good idea!)
 
Last edited:

SamIAm

n00b
Joined
Dec 4, 2014
Posts
40
Thanks for your reply.

Most video cards will let you specify the sync polarity as well. In Windows with an NVidia card, this is part of the custom preferences, while in Linux modelines have sync polarity specified.

I'm using an old laptop with VGA out that doesn't seem to have the option to adjust sync polarity. Also, if I can get everything working with default sync polarity, I can do what I really want: buy and connect an X68000. :D

EDIT: having looked at the circuit, that's more or less what's already going on in the one you posted. Try attenuating the output when mixing.

For sync-on-green, you may want to install a potentiometer and bring the CSync's amplitude as low as possible. To accomplish this, you would wire the variable resistor in a potentiometer configuration. H/CSync goes to pin 1, Ground is connected to pin 3, and the variable voltage output appears at pin 2 (the wiper). I would do this to attenuate the sync signal being mixed, rather than changing the driving voltage for the 4070 chips (not a good idea!)

My wording must have been unclear. That is one of the first things I tried - in fact, it was the very first.

Adding resistance to the C-SYNC output line helps, but it doesn't help enough. The more I dial up the potentiometer, the less the unwanted green shows up, but I hit the point where I lose the sync signal altogether before I get to genuine black.

Changing the driving voltage to the 4070 was just an experiment, and it didn't have any noticeable effect. Neither did changing the voltage going into pin 12. I suppose I could try a stronger pot, since I was never able to turn up the resistance high enough to make the 4070 stop working, but like you say, I wouldn't expect it to be the solution I'm looking for.

I was able to go up to 3kohms of resistance on each of the VGA sync lines without causing trouble, but that didn't help either.

At this point, I want to try an alternative to the current 4070 schematic. I'll be checking out the 74HC04 and 74HC266, so thanks for that. I also found this Japanese page with another schematic involving a 74HC86 that is designed specifically for this AV Multi port, but he says everything is tinted purple, which is a sign that his green is actually too weak.

Anyway, thanks again!
 

mikejmoffitt

Mickey's Coach
Joined
Feb 6, 2014
Posts
578
Thanks for your reply.



I'm using an old laptop with VGA out that doesn't seem to have the option to adjust sync polarity. Also, if I can get everything working with default sync polarity, I can do what I really want: buy and connect an X68000. :D



My wording must have been unclear. That is one of the first things I tried - in fact, it was the very first.

Adding resistance to the C-SYNC output line helps, but it doesn't help enough. The more I dial up the potentiometer, the less the unwanted green shows up, but I hit the point where I lose the sync signal altogether before I get to genuine black.

Changing the driving voltage to the 4070 was just an experiment, and it didn't have any noticeable effect. Neither did changing the voltage going into pin 12. I suppose I could try a stronger pot, since I was never able to turn up the resistance high enough to make the 4070 stop working, but like you say, I wouldn't expect it to be the solution I'm looking for.

I was able to go up to 3kohms of resistance on each of the VGA sync lines without causing trouble, but that didn't help either.

At this point, I want to try an alternative to the current 4070 schematic. I'll be checking out the 74HC04 and 74HC266, so thanks for that. I also found this Japanese page with another schematic involving a 74HC86 that is designed specifically for this AV Multi port, but he says everything is tinted purple, which is a sign that his green is actually too weak.

Anyway, thanks again!

Try a cap inline with the CSync signal you are mixing, see if decoupling it to AC might help?
 

SamIAm

n00b
Joined
Dec 4, 2014
Posts
40
I tried inline and decoupling caps as well, to no visible effect. I suppose I could try some more with different farad ratings, though.

This morning, I tried using a LM1881 sync stripper that I happened to have lying around, and it only made the problem worse.

I wish I had an oscilloscope.

There were some good ideas in this thread that I could try. Sadly, it will be some days before I'll really be able to.

If you have any other ideas, let me know, and thanks again. :)
 

SamIAm

n00b
Joined
Dec 4, 2014
Posts
40
In case people don't want to go poking through the thread I posted above, here is a rundown of what it says that I think is going to work in my situation.

This is an oscilloscope shot of a straight VGA H-sync signal. Notice how it rests at 0 and pulses positively.

4%20VGA%20H_zpsuillzvne.jpg



Here is an image from another website of composite 480i video. Notice how it rests and zero and the sync pulses negatively, as it it were "blacker-than-black" compared to the color information in the positive area.

F_23_9_zps3qayga5y.gif



Now, here is an oscilloscope shot of of the same VGA H-Sync put through the gates exactly like in the circuit I posted above:

6%206V%20OUT%20WO%20G_zpskzxk4gr3.jpg


Finally, here is a shot of that mixed with green, again with the same circuit above, and with the guy experiencing a result similar to mine:

7%206V%20OUT%20W%20G_zpsrkaiv8cs.jpg



There is my problem. Before I mix the signal with green, I need to shift it down somehow and make it truly negative, not just inverted positive. Another guy on that other forum suggested:

It seems to me that this active-low sync signal needs to be mixed into the green video signal using a method that produces a negative voltage. This can be done using a capacitor and two diodes. If you want to try it, here are the steps.

Disconnect pin 11 from the green video signal.
Get a capacitor of around 10 オF and connect its positive terminal to pin 11.
Connect a 1N914 diode with its anode to the negative terminal of the capacitor and its cathode to the 0V rail.
Connect a second 1N914 diode with its cathode to the negative terminal of the capacitor and its anode to the green video signal.

This may work. If it doesn't, you could try inserting a resistor of around 47 ohms in series with the green video signal connection to pin 2 of the VGA connector.


I got all the parts today, and I hope it works. I understand what a diode is, but I don't know exactly how this is going to give me a negative signal. Could anyone explain?
 
Last edited:

SamIAm

n00b
Joined
Dec 4, 2014
Posts
40
Yeah, not only did that not work, but it did exactly what I was afraid it would: pulled the green signal out to ground.

The thing that I need is a circuit that will give me true reversed polarity that can mix into the green line.

I clearly have more research to do.
 

Xian Xi

JammaNationX,
15 Year Member
Joined
Dec 1, 2005
Posts
27,750
Check if SOG works on anything higher than 240p.
 

SamIAm

n00b
Joined
Dec 4, 2014
Posts
40
It does. PS2 480p games can run directly into this thing with no trouble.

I'm going to try a new approach with an opamp to give me true negative pulses. That'll be next week, but I'll post if I have any success.
 

SamIAm

n00b
Joined
Dec 4, 2014
Posts
40
This took a turn for the unexpected.

I hadn't tried it before because I assumed it wouldn't work, but it seems that VGA sync simply spliced together as-is, put through a resistor and fed into the green line, is enough to get a picture. The only problem is, it's still got the green tint.

When I remove sync altogether, I can make out that all of the colors are what they're supposed to be. Sync is definitely adding something...or causing the TV to add something.

At least now I know it's not the 4070 (I also tried a 74S86, same result).

The frustrating thing is, without an oscilloscope, I'm shooting in the dark now.

For the record, I tried using a 741 op-amp to generate negative sync. I used a TL7660 to invert my +5V rail supply to -5V, which worked, and as much as I could tell with a multimeter, the op-amp was successfully responding to positive input by producing negative output. I can only hope that's what it actually did with the VGA sync. Sadly, it produced no visible effect on the TV picture.

On one hand, I might still be doing something wrong with the op-amp, but on the other, I don't think that this AV Multi input is looking for negative sync when using sync-on-green.

That's not all - I tried putting the VGA syncs on separate variable resistors, and something very interesting happened. If I dial up the resistance on the V-sync only, I'll reach the point where the picture is starting to destabilize, but the green tint will fully disappear. It's just barely unusable.

I'm out of time for today, but soon, I'm going to try putting both VGA sync lines on separate, properly grounded potentiometers and see what happens.

I really wish I knew what the sync pulses look like on a PS2 outputting sync-on-green compared to VGA sync. I'm so invested in making this work, I just might try to pick up a used oscilloscope...
 
Last edited:

SamIAm

n00b
Joined
Dec 4, 2014
Posts
40
Today, I got a good deal on a 480p-capable pro monitor that should accept VGA with a simple splice & resistor combo.

Aside from sinking huge amounts of time into trying to make VGA work on my current TV, I'm beginning to worry that I'm going to one day give the poor thing too much voltage and damage it.

Basically, unless someone can supply some oscilloscope shots, I think I'm done.

If anyone ever has any questions, feel free to PM me.

Thanks for reading!
 
Top