PaulRB
Posts: 22
Joined: Fri Apr 03, 2015 11:28 am
Location: West Yorkshire, UK

SCART RGB output to old TV set

Sun Sep 15, 2019 11:19 am

Hi all,

I want to attempt to bring an old 1980's TV set back into use. The set has a SCART socket with RGB capability, I have tested the set with a digital TV adapter box, and the picture and sound work fine connected with SCART:
IMG_20190915_115459.jpg
IMG_20190915_115459.jpg (255.48 KiB) Viewed 1078 times
The picture looks much better than the above in real life. I think that fringing is caused by my phone camera. But you can see that the SCART is working in RGB mode.

Here is my Pi connected up:
IMG_20190915_115630_2.jpg
IMG_20190915_115630_2.jpg (115.32 KiB) Viewed 1078 times
I have tested the HDMI to VGA adaptor using an LCD PC monitor and that works well, including sound.

However, with the Pi connected to the TV, I get a steady picture, but it is a grey screen with some vertical bars:
IMG_20190915_115624.jpg
IMG_20190915_115624.jpg (195.53 KiB) Viewed 1078 times
I think this means that the vertical sync signal is working OK but the horizontal sync is not... or the other way around...
Last edited by PaulRB on Sun Sep 15, 2019 3:29 pm, edited 1 time in total.

PaulRB
Posts: 22
Joined: Fri Apr 03, 2015 11:28 am
Location: West Yorkshire, UK

Re: SCART RGB output to old TV set

Sun Sep 15, 2019 11:28 am

Here are details of the SCART plug on my VGA to SCART lead:
IMG_20190915_121513_2.jpg
IMG_20190915_121513_2.jpg (109.48 KiB) Viewed 1072 times
IMG_20190915_121458_2.jpg
IMG_20190915_121458_2.jpg (115.78 KiB) Viewed 1072 times

PaulRB
Posts: 22
Joined: Fri Apr 03, 2015 11:28 am
Location: West Yorkshire, UK

Re: SCART RGB output to old TV set

Sun Sep 15, 2019 11:30 am

And here are the connections in the VGA plug:
IMG_20190915_122640.jpg
IMG_20190915_122640.jpg (124.85 KiB) Viewed 1069 times
IMG_20190915_122627.jpg
IMG_20190915_122627.jpg (106.56 KiB) Viewed 1069 times
I can make a schematic showing these connections if needed.

User avatar
DougieLawson
Posts: 36578
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: SCART RGB output to old TV set

Sun Sep 15, 2019 11:33 am

Have you seen https://www.raspberrypi.org/magpi/teefax/ which uses the analog TV out signal?
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

PaulRB
Posts: 22
Joined: Fri Apr 03, 2015 11:28 am
Location: West Yorkshire, UK

Re: SCART RGB output to old TV set

Sun Sep 15, 2019 11:39 am

Here is the config.txt I'm using on the Pi:

Code: Select all

# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
overscan_left=16
overscan_right=16
overscan_top=16
overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=1
hdmi_mode=21

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

[all]
#dtoverlay=vc4-fkms-v3d
Can anyone see anything else I need to change to get the horizontal sync working? Or do I need to modify the cable?

PaulRB
Posts: 22
Joined: Fri Apr 03, 2015 11:28 am
Location: West Yorkshire, UK

Re: SCART RGB output to old TV set

Sun Sep 15, 2019 11:42 am

DougieLawson wrote:
Sun Sep 15, 2019 11:33 am
Have you seen ...
Thanks, that's interesting. But I don't think it helps much with my sync problem (or what I currently believe to be a sync problem).

User avatar
DougieLawson
Posts: 36578
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: SCART RGB output to old TV set

Sun Sep 15, 2019 11:58 am

Have you tried wiring an RCA plug to the composite TV header on your Zero? Rather than all that palaver you've got with HDMI converters and VGA.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

PaulRB
Posts: 22
Joined: Fri Apr 03, 2015 11:28 am
Location: West Yorkshire, UK

Re: SCART RGB output to old TV set

Sun Sep 15, 2019 12:04 pm

DougieLawson wrote:
Sun Sep 15, 2019 11:58 am
Have you tried wiring an RCA plug to the composite TV header on your Zero?
I haven't tried that, it might be an interesting test.

But the reason for all the VGA palaver is to get an RGB signal working, which gives a much higher quality picture than composite.

PaulRB
Posts: 22
Joined: Fri Apr 03, 2015 11:28 am
Location: West Yorkshire, UK

Re: SCART RGB output to old TV set

Sun Sep 15, 2019 12:23 pm

Here's how the plugs are wired:
IMG_20190915_131912_2.jpg
IMG_20190915_131912_2.jpg (73.97 KiB) Viewed 1017 times
IMG_20190915_131918_2.jpg
IMG_20190915_131918_2.jpg (73.33 KiB) Viewed 1017 times

User avatar
rpdom
Posts: 15604
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: SCART RGB output to old TV set

Sun Sep 15, 2019 12:30 pm

PaulRB wrote:
Sun Sep 15, 2019 12:04 pm
DougieLawson wrote:
Sun Sep 15, 2019 11:58 am
Have you tried wiring an RCA plug to the composite TV header on your Zero?
I haven't tried that, it might be an interesting test.

But the reason for all the VGA palaver is to get an RGB signal working, which gives a much higher quality picture than composite.
Also sound, which isn't available on the TV out pin.

PaulRB
Posts: 22
Joined: Fri Apr 03, 2015 11:28 am
Location: West Yorkshire, UK

Re: SCART RGB output to old TV set

Sun Sep 15, 2019 3:24 pm

Here's the pinout for VGA:
DtrXl.gif
DtrXl.gif (8.72 KiB) Viewed 977 times
My cable sensibly uses red, green and blue wires for the obvious purpose. Purple, grey and orange are the grounds for blue, green and red. Black is also ground. Brown is horizontal sync or combined sync. There is no connection for vertical sync in my cable.

Yellow wire in my cable (pin 9) is "optional 5V from graphics card". I don't know if my VGA adaptor puts out 5V on pin 9. Must check that with DMM.

PaulRB
Posts: 22
Joined: Fri Apr 03, 2015 11:28 am
Location: West Yorkshire, UK

Re: SCART RGB output to old TV set

Sun Sep 15, 2019 3:48 pm

Here's the pinout for SCART:
scart.jpg
scart.jpg (41.2 KiB) Viewed 967 times
So red, blue, green and their respective grounds are as expected in my cable. Black is connected to composite ground. Brown is connected to "video sync in".

Yellow is connected to pin 8, "switching" which I think it's the pin that automatically switches the TV to the scart input, but needs >= 9.5V to do that. And currently it isn't doing that, I have to press the AV button on the front of the set.

Yellow is also connected via 75R to pin 16, "blanking". I guess the resistor is meant to reduce the voltage down to below 3V to indicate an RGB signal (as opposed to <0.4V indicating a composite signal). How that voltage reduction works without a second resistor between the pin and ground to form a voltage divider, I don't know.

PaulRB
Posts: 22
Joined: Fri Apr 03, 2015 11:28 am
Location: West Yorkshire, UK

Re: SCART RGB output to old TV set

Sun Sep 15, 2019 4:39 pm

I'm currently thinking that my problem is that unconnected vertical sync pin in the VGA plug.

I bought the cable years ago for use with an ATI PC graphics card. And it worked, not with this TV but with another one I no longer own. (EDIT: by which I mean I never tested the cable/ATI card with this TV, I assume it would have worked, not that I tested it with this TV and found that it did not work.) I suspect that this ATI card was able to create a combined sync signal on the horizontal sync pin. I cannot find a way to get the pi to do this.

So I may have to build a circuit to combine the h+v sync into a combined sync signal. There seem to be many circuits out there for doing this, with various levels of complexity.

This one looks reasonably simple: https://www.nexusuk.org/projects/vga2scart/circuit

Can anyone comment on my theory and the suitability of the above circuit?
Last edited by PaulRB on Sun Sep 15, 2019 5:31 pm, edited 1 time in total.

trejan
Posts: 917
Joined: Tue Jul 02, 2019 2:28 pm

Re: SCART RGB output to old TV set

Sun Sep 15, 2019 4:52 pm

I suspect the blanking input isn't making it change to RGB mode. Lack of combined sync might also be a problem but I'd expect something shown there even if it is not locked.

They use a 75 ohm resistor because there is a 75 ohm pull down inside the TV.

Use a multimeter to measure the voltage on that pin when it is plugged into the TV.

drgeoff
Posts: 9926
Joined: Wed Jan 25, 2012 6:39 pm

Re: SCART RGB output to old TV set

Sun Sep 15, 2019 5:27 pm

Your VGA to SCART cable is merely a cable and your PAL TV will only accept TV format signals ie horizontal frequency of around 15625 Hz. Your setup will only work if the HDMI to VGA converter can be made to output such a horizontal rate. VGA of 640 by 480 by 60Hz progressive has about twice that horizontal rate. That is why you see that vertical black bar in the middle of the screen.

No amount of wiring changes to your VGA to SCART cable is going to change that. Those cables did work with some PC video cards (eg Matrox G400) because the card could be put into a mode which generated RGB signals with standard TV timing.

I see nothing in the published specs of the PiSupply HDMI-VGA unit which suggests it can output 625/50 interlaced or 313/50 progressive. I don't know if the hardware is incapable of doing that or there is no driver support.

PaulRB
Posts: 22
Joined: Fri Apr 03, 2015 11:28 am
Location: West Yorkshire, UK

Re: SCART RGB output to old TV set

Sun Sep 15, 2019 6:48 pm

Thanks drgeoff, I appreciate your input and share your doubts about the adaptor.

In this post, I set parameters in config.txt that i hoped would set the appropriate timings.

Specifically:

Code: Select all

hdmi_mode=21
which I was hoping would set:
21 576i 50Hz
according to this page.

Did I get it right? Did I miss anything?

The Pi Supply page says:
The device handles display resolutions of up to 720p/1080i/1080p
but it does not say what resolutions it supports "down to". Other adapters I considered advertised [email protected] I assumed, perhaps naively, that they are all based on the same chip and had the same capabilities, which I know is a dangerous assumption, but we all swim in marketing infested waters!

PaulRB
Posts: 22
Joined: Fri Apr 03, 2015 11:28 am
Location: West Yorkshire, UK

Re: SCART RGB output to old TV set

Sun Sep 15, 2019 7:12 pm

trejan wrote:
Sun Sep 15, 2019 4:52 pm
Use a multimeter to measure the voltage on that pin when it is plugged into the TV.
Thanks. Stay tuned for the results...

PaulRB
Posts: 22
Joined: Fri Apr 03, 2015 11:28 am
Location: West Yorkshire, UK

Re: SCART RGB output to old TV set

Mon Sep 16, 2019 6:08 pm

drgeoff wrote:
Sun Sep 15, 2019 5:27 pm
VGA of 640 by 480 by 60Hz progressive has about twice that horizontal rate. That is why you see that vertical black bar in the middle of the screen.
@drgeoff I think you were correct, the vertical bar was because a progressive scan signal was being sent. The reason, I think, is because I had mistakenly uncommented this line in config.txt:

Code: Select all

# uncomment if you get no picture on HDMI for a default "safe" mode
hdmi_safe=1
It seems doing this overrides other settings and forces a "safe" set of hdmi parameters, safe for VGA monitors, that is.

I have commented the above line out again. Now, the vertical bar is gone. Unfortunately I still get a grey picture, but at least it is a stable, uniform grey picture.

Now to measure that blanking pin voltage...
Last edited by PaulRB on Mon Sep 16, 2019 6:28 pm, edited 2 times in total.

drgeoff
Posts: 9926
Joined: Wed Jan 25, 2012 6:39 pm

Re: SCART RGB output to old TV set

Mon Sep 16, 2019 6:24 pm

Yes, you need between 1 and 3 volts on pin 16 to tell the TV to use the RGB inputs instead of composite from 20.

PaulRB
Posts: 22
Joined: Fri Apr 03, 2015 11:28 am
Location: West Yorkshire, UK

Re: SCART RGB output to old TV set

Mon Sep 16, 2019 6:28 pm

Its zero! So pin 9 on my vga adaptor is not putting out a 5V signal.

I temporarily connected a wire from the 3.3V pad on the Pi's GPIO header to the blanking pin on the SCART plug. Yes! I get a picture! It looks really good. Only problem is the vertical hold. I can adjust it using the control on the set so that the picture is almost steady, but it still creeps up or down slowly.

So I still have vertical sync problem to fix. But great progress this evening!

My VGA adaptor does in fact support 576i @ 50 Hz.

drgeoff
Posts: 9926
Joined: Wed Jan 25, 2012 6:39 pm

Re: SCART RGB output to old TV set

Mon Sep 16, 2019 6:59 pm

You could try the really simple method. Connect both HYSNC and VSYNC of the adaptor to pin 20 of the SCART.

PaulRB
Posts: 22
Joined: Fri Apr 03, 2015 11:28 am
Location: West Yorkshire, UK

Re: SCART RGB output to old TV set

Mon Sep 16, 2019 8:11 pm

I've unsoldered the yellow wire from the VGA plug and extended it so I can connect it to the 5V pin on the Pi's GPIO pins.
IMG_20190916_205838.jpg
IMG_20190916_205838.jpg (130.76 KiB) Viewed 794 times
IMG_20190916_205220.jpg
IMG_20190916_205220.jpg (70.82 KiB) Viewed 794 times
IMG_20190916_205754.jpg
IMG_20190916_205754.jpg (83.9 KiB) Viewed 794 times
As I said at the top of the thread, it looks better than any of these suggest. My phone camera is on low resolution to give a file small enough to upload to the forum, and is probably capturing only one of the interlace frames.

PaulRB
Posts: 22
Joined: Fri Apr 03, 2015 11:28 am
Location: West Yorkshire, UK

Re: SCART RGB output to old TV set

Mon Sep 16, 2019 8:44 pm

drgeoff wrote:
Mon Sep 16, 2019 6:59 pm
You could try the really simple method. Connect both HYSNC and VSYNC of the adaptor to pin 20 of the SCART.
Yup, that fixed it. Vertical sync achieved.

Are there any disadvantages to connecting these two pins together? Should I at least put a couple of resistors in there to limit any current? As shown here, for example:
vga2euro.gif
vga2euro.gif (16.4 KiB) Viewed 751 times

PaulRB
Posts: 22
Joined: Fri Apr 03, 2015 11:28 am
Location: West Yorkshire, UK

Re: SCART RGB output to old TV set

Mon Sep 16, 2019 9:43 pm

I managed to get a couple of 820R (didn't have any 1K) into the VGA plug. Works fine and picture looks good.
IMG_20190916_222209.jpg
IMG_20190916_222209.jpg (105.08 KiB) Viewed 737 times

Return to “Media centres”