Jump to content
IGNORED

Conditioning 5V TTL CSYNC signal to ~1V for SCART


morelenmir

Recommended Posts

Hey guys!!! Been a while, etc...

 

After about six months of threatening myself I have finally put down "Elite Dangerous" and got back down to some Atari electronics! In an attempt to once and for all sort out the flaky display on my 130XE I have put together a simple LM1881-based sync-stripper to clean up the Composite Video output and extract its CSYNC signal. This I will then feed--along with the other outputs from my VBXE--to the CSYNC pin of a SCART socket and thence my monitor. Hopefully this should cure my (very!) long term video issues. However the LM1881 produces a 5V CSYNC level which is much too high for SCART--in the past I suspect this voltage has also been the cause of some of my problems.

 

My own research on the matter has suggested a simple potential divider to reduce the voltage, taking advantage of the resisters which are present inside all SCART interfaces. This basically amounts to adding a 330ohm resister in series with the CSYNC, which combined with the 75Kohm already within the SCART socket will give me about 0.9V. While ideal voltage-wise, this very basic approach introduces new timing errors to the signal. As I am attempting to escape from SYNC problems this is not my first choice!

 

Another suggestion I read was to use an Arduino 5v to 3.3v logic-level shifter. This apparently does not interfere with the timing, but obviously only reduces the voltage to 3.3V which is still too high.

 

I wonder therefore if any of the more technically minded chaps can suggest a way to bridge this gap. Is there some kind of level-shifting chip that will not re-scramble the CSYNC and produce a crisp output signal around 1V?

Edited by morelenmir
  • Like 1
Link to comment
Share on other sites

Can you not pick sync directly from pin 15 of CD4050 for a start instead of deriving it from composite video? Applying a voltage divider to that produced good results when I tried it.

 

Hey John!!!

 

You certainly can tap pin 15 and this is how I had mine set in the past.

 

However, doing some wider reading--mainly on retro NES and MegaDrive forums--has persuaded me that all the artefacts I have seen from day 1 with this motherboard are down to a very-barely compliant SYNC signal. The LM1881 was recommended as a cure for all woes by those guys and so I thought I would give it a bash. At the time I was under the impression this chip would output its corrected signal at the voltage level of its Composite Video input. Sadly this is not the case.

 

You can use a 2N7000 FET apparently to do a step-down as shown here:

 

post-31546-0-78056500-1531953266.gif

 

However, all the circuits I have seen show that method as producing 3.3volts and I don't know if that works were I to feed it 1volt instead.

 

This blog was where I got the circuit and it does seem as if the chap was describing exactly the problems one would encounter when using SCART with A8-era electronics:

 

https://ianstedman.wordpress.com/tag/synchronisation/

Link to comment
Share on other sites

I dont follow how a passive resistor introduces timing issues, but a active fet wont as it has to get a signal and then switch from one state to another

 

I'm just going from what that 'Ian Steadman' fellow wrote in his blog post that I linked above:

 

One disadvantage of this circuit is that the RC time delay does affect the rising/falling edge of the sync pulse slightly. In most circumstances, this will not matter but some systems may have issues if the time delay extends past a 100ns rise/fall time. For a cleaner, faster signal, use logic devices.

 

It sounds like you and him are thinking along the same lines though as he also suggests the 2N7000 above, but it looks like that circuit wouldn't work from 1-volt and therefore wouldn't produce 1-volt output...

 

Basically I am hoping the wizardry inside the LM1881 will be able to 'massage' the flaky SYNC signal back in to compliance. In the past I have followed FJC's route--which works excellently, so long as the raw CSYNC signal from CD4050 Pin15 is itself compliant. However I suspect mine is at least somewhat off-whack somewhere. I don't think the LM1881 would take a raw CSYNC straight from the CD4050.

Link to comment
Share on other sites

Sounds like this would only bother if you use some Framemeister or other digital converter. I can't see a CRT having issues with the resistor solution...maybe you'd need to shift the picture a bit through the set-up menu or your pots (if you're really old school CRT) ?

 

The key question is do you _see_ any issues :)

 

SCART is a wonderful yet weird thing...it ended up with so many "band-aids" attached to make everything work...

 

The 16:9/4:3 levels of the pin 8 f.i...... weird voltages.

 

In that area: I just measured the "blanking" output of SOPHIA (RGB) and it's at 5Volts...but SCART says 3V is the max. My TV doesn't seem to bother...but will it in the long run ? I guess I'll simply add a 180Ohms resistor but it would be nice to have this on the Sophia from the start.

Edited by Level42
Link to comment
Share on other sites

A resistor divider would only introduce timing errors if a capacitance were placed across it's output, which shouldn't be the case. So if we assume that 75 ohms is the load resistance you are feeding into, a 300 ohm resistance in series will give you exactly 1 V from a 5 V source signal.

 

Here's a nice little calculator for figuring that out: Voltage Divider Calculator

  • Like 3
Link to comment
Share on other sites

A purely resistive divider should not alter sync timing.

 

You can filter the v-sync from the h-sync with an R/C network alone. Try 1K and 1ufd at first. Tweak it for best results.

 

You mean 75 ohms in SCART, not 75K, right?

 

What are you trying to fix?

 

Bob

  • Like 1
Link to comment
Share on other sites

 

 

In that area: I just measured the "blanking" output of SOPHIA (RGB) and it's at 5Volts...but SCART says 3V is the max. My TV doesn't seem to bother...but will it in the long run ? I guess I'll simply add a 180Ohms resistor but it would be nice to have this on the Sophia from the start.

 

 

I was rightfully corrected by Simius on this....the 5Volts is required for the 75 input impedance of SCART.....actually WITH the 180 Ohms resistor my TV stated acting weird...just wanted to prevent any misinformation here ....sorry :)

Link to comment
Share on other sites

no reason to be sorry, you got it working and you came back to share which is always helpful for anyone else searching

 

I personally thought as much myself, but I have about jack squat experience with SCART input's, I know on computer monitors 5 volt TTL level sync's are common, all the way up to the current incarnation of VGA (though its typically inverted pre-vga) , but as we all know TV's are not monitors

Edited by Osgeld
  • Like 1
Link to comment
Share on other sites

Thanks Osgeld !

Well (good) SCART TV's are monitors in my book :)

 

I felt silly because I keep forgetting the sometimes weird configuration of SCART. They had to go through all kinds of bends because of "standards" kept being added...good thing yes, but they had to do some tricks. Also input impedance of 75 Ohms is something from the areal era....you don't really expect that for a sync input...but here we are :)

 

To morelenmir: If you're able to hook up your A8 to SCART, why not go for the best possible picture: buy a RGB Sophia from Simius....man you will not regret it....razor sharp, crisp colors....simply amazing.

Link to comment
Share on other sites

Sounds like this would only bother if you use some Framemeister or other digital converter. I can't see a CRT having issues with the resistor solution...maybe you'd need to shift the picture a bit through the set-up menu or your pots (if you're really old school CRT) ?

 

The key question is do you _see_ any issues :)

 

SCART is a wonderful yet weird thing...it ended up with so many "band-aids" attached to make everything work...

 

The 16:9/4:3 levels of the pin 8 f.i...... weird voltages.

 

In that area: I just measured the "blanking" output of SOPHIA (RGB) and it's at 5Volts...but SCART says 3V is the max. My TV doesn't seem to bother...but will it in the long run ? I guess I'll simply add a 180Ohms resistor but it would be nice to have this on the Sophia from the start.

 

Unfortunately the only monitor I have is a SCART LCD television... Its good in that it accepts the low frequency the VBXE produces unlike all my CRT VGA screens, but it is super sensitive to problems with the signal.

 

That article I linked was very interesting but also quite frustrating as I found he did not cover all the potential solutions to the over-voltage problem in sufficient depth. However, going from what you say its sounds like the HD version of the LM1881--the LMH1980--that outputs a stripped CSYNC at 3.3V might do the job perfectly. The LMH1980 itself needs a 3.3v input, but that is easy to provide via an LD1117 linear regulator connected to the 5V of the XE motherboard. I was already thinking of running up a stripboard version of the circuit supplied in this chip's datasheet (http://www.ti.com/lit/an/snla097a/snla097a.pdf) since I found I really enjoyed laying out the LM1881 circuit. This is another excuse to do so!

 

A resistor divider would only introduce timing errors if a capacitance were placed across it's output, which shouldn't be the case. So if we assume that 75 ohms is the load resistance you are feeding into, a 300 ohm resistance in series will give you exactly 1 V from a 5 V source signal.

 

Here's a nice little calculator for figuring that out: Voltage Divider Calculator

 

An excellent tool to keep handy. Many thanks mytek!!!

 

A purely resistive divider should not alter sync timing.

 

You can filter the v-sync from the h-sync with an R/C network alone. Try 1K and 1ufd at first. Tweak it for best results.

 

You mean 75 ohms in SCART, not 75K, right?

 

What are you trying to fix?

 

Bob

 

I am reluctant to bore everyone yet again with my endless tales of display-woe! Briefly... Since I got a new (to me) 130XE I have had problems with the video output. I tried everything from replacing just about every capacitor on the motherboard to fitting a UAV and finally a VBXE. Nothing cured it entirely, although the VBXE has produced the best results. Sadly there are still niggling problems and the VBXE itself introduced an annoying flicker to black now and then. This last was improved considerably by adding a resister to the CSYNC signal so I think that at least was down to the over-voltage problem.

 

I'll attach a few pictures just to show the problem, the names of the images are descriptive of what they show but I don't know if these labels will appear properly as forum attachments.

 

The first shows what the screen looks like with a VBXE and CSYNC provided simply by patching in the composite video signal.

 

post-31546-0-71524800-1532295198_thumb.jpg

 

The rest of the pictures are how various different backgrounds, colours and graphics make the problem more and less apparent.

 

post-31546-0-84453700-1532295250.jpg

 

post-31546-0-69027400-1532295261.jpg

 

post-31546-0-01801700-1532295270.jpg

 

post-31546-0-95947000-1532295283.jpg

 

post-31546-0-95185900-1532295298_thumb.jpg

 

As I say, on reading several posts made to retro NES and MegaDrive forums I suspect these are caused by a flaky CSYNC signal which supposed the LM1881 will correct when it processes the raw composite video output. Hopefully... I post again when I have tried it.

Edited by morelenmir
  • Like 1
Link to comment
Share on other sites

You should scope the video output on this guy. It looks like lots of noise on the ground buss and ringing on the signal.

 

See the garbage where the video changes level? That is ringing. See the trash out in the middle of background? That is ground bounce - you can't pull current from the ground plane fast enough.

 

The last picture looks pretty good - what is that?

 

Bob

  • Like 2
Link to comment
Share on other sites

One quick and dirty solution to reduce a 5v logic signal to 1.2v is to make a voltage divider out of a series resistor with diodes. A resistor is connected to the 5v output and placed in series with two forward bias .6v silicon diodes to ground. The diodes should conduct immediately when the 5v signal is applied, regulating the output signal at constant 1.2v which should be a safe level for 1v logic.

 

If the output device has input capacitance, either in the line or at the device, choosing a lower value for the resistor will reduce the rise/fall time. With the diodes regulating the output, the rise time from 0v to 5v will be faster than the fall time, because the full resistance will be used to discharge the 1.2v output to ground. When a 5v signal is appled to the resistance, it would normally rise quickly before levelling off near 5v. But because the diodes begin conducting at 1.2v, this curve will be truncated early, making the rc time constant on the rising edge extremely fast, but a slower fall at low logic when the diode stops conducting.

 

Assuming the sync pulse is read on the rising edge of the pulse, diode regulation will provide faster clock performance and a more stable signal voltage level than a traditional resistor based passive voltage divider.

  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...

You should scope the video output on this guy. It looks like lots of noise on the ground buss and ringing on the signal.

 

See the garbage where the video changes level? That is ringing. See the trash out in the middle of background? That is ground bounce - you can't pull current from the ground plane fast enough.

 

The last picture looks pretty good - what is that?

 

Bob

 

That is fascinating to know Bob!!! I have been trying to at least work out what is wrong with the motherboard for so long, even if I couldn't actually fix it. Many thanks indeed for the insight. Do you know off-hand where these problems are coming from and what to do about them? Somehow I doubt it will be a single smoking-gun though like: 'swap capacitor 50 for a 100nf unit instead' or whatever!

 

I wish I did have an oscilloscope for just this kind of thing. However the EEVBlog suggests not buying one at all unless you can afford £5000+. Which I can't... I have to say while I really enjoy watching that channel the guy who produces it has an frequently infuriating opinion about 'Only a couple of hundred bucks' and 'nah, don't even bother...' Which maybe if you are a crackerjack electrical engineer--with matching salary--is okay advice, but for the rest of us it gets old fast and is more than a little discouraging.

 

That last image is from a type-in BASIC game from the January 1987 issue of 'Page 6' called 'Bowl Trap'. It is a fun little game and I use it as a diagnostic tool because the combination of lots of colour and many sharp edges does highlight the artefacting problem very well.

 

One quick and dirty solution to reduce a 5v logic signal to 1.2v is to make a voltage divider out of a series resistor with diodes. A resistor is connected to the 5v output and placed in series with two forward bias .6v silicon diodes to ground. The diodes should conduct immediately when the 5v signal is applied, regulating the output signal at constant 1.2v which should be a safe level for 1v logic.

 

If the output device has input capacitance, either in the line or at the device, choosing a lower value for the resistor will reduce the rise/fall time. With the diodes regulating the output, the rise time from 0v to 5v will be faster than the fall time, because the full resistance will be used to discharge the 1.2v output to ground. When a 5v signal is appled to the resistance, it would normally rise quickly before levelling off near 5v. But because the diodes begin conducting at 1.2v, this curve will be truncated early, making the rc time constant on the rising edge extremely fast, but a slower fall at low logic when the diode stops conducting.

 

Assuming the sync pulse is read on the rising edge of the pulse, diode regulation will provide faster clock performance and a more stable signal voltage level than a traditional resistor based passive voltage divider.

 

I will absolutely give that circuit a try! I have forgotten so much of what once I knew about electronics, but diode voltage drop should have occurred to me regardless! Jean-Luc Picard face-palm moment (the second in two days as well...!!!) The inline resistor method does work, but I'll bet this would be even better.

 

In regards the LM1881 project... I can report it has been on the whole very successful indeed. It does exactly what it claims and gives me a totally stable CSYNC from the Composite Video signal. The picture this produces in tandem with the VBXE is not far from being where I want it to be. I would certainly advise anyone who is fitting a VBXE to also make one of these little devices to provide the CSYNC rather than tapping the CD4060 Pin 15 directly. It does seem to get rid of a lot of interference and artefacts. Maybe if I could sort out the ringing and ground-buzz that Bob mentions then it would be a done deal.

 

As I mentioned above there is an HD version of the LM1881--the LMH1980-- which provides several more signals and supposedly dopes an even better job of producing a repaired CSYNC signal from a dodgy source. The basic circuit is not quite so simple as this one, but given how much fun I had with the LM1881 I think I will give it a shot before long.

Edited by morelenmir
  • Like 1
Link to comment
Share on other sites

my scope was free but not everyone has that luck

 

if you are going to be tinkering with circuits any scope is better than no scope, even one of those 30$ kits ... if you can tolerate the microscopic screen will show you quite a bit

 

That is very welcome advice Osgeld! I have no doubt the £10000 Siglent-whatever's are fantastic to use, but I've never bought a car that cost more than £1500 in my life, let alone a diagnostic tool!

 

I will check out those kits. I have wondered about the ones that attach to a laptop via USB as well.

Link to comment
Share on other sites

mine is a old school CRT scope, analog / digital hybrid Kenwood so it takes a chunk of desk space, I have considered the USB scopes many times, especially since one can get a 20mhz model for like 60 bucks (and my bench scope is only 20mhz ... though it has analog so doing things like tweaking lasers on cd game systems is easier to do)

Edited by Osgeld
Link to comment
Share on other sites

mine is a old school CRT scope, analog / digital hybrid Kenwood so it takes a chunk of desk space, I have considered the USB scopes many times, especially since one can get a 20mhz model for like 60 bucks (and my bench scope is only 20mhz ... though it has analog so doing things like tweaking lasers on cd game systems is easier to do)

I always thought it would be a fun conversion project to gut one of those vintage black and white 5" crt tvs (they normally run on 12v adapter or 8 dcell batteries) into a working oscilliscope. But a conversion kit would require the same tube model, and there's likely dozens of varieties out there. Hscan (frequency) is an adjustable ramp, and vscan is also adjustable and proportional to voltage level.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...