VGA display switching with debouncer/multiplexer/buffer circuitry? - Page 1
Forum section: electronics / beginners

author: analogix
author_rank: Frequent Contributor
timestamp: August 25, 2024, 07:58:43 pm
content: I've designed a video display output which attaches to a vintage Atari ST computer and allows (passive/mechanical) switching between VGA colour, VGA monochrome and Atari monitor connectors/modes using a 8P3T slide switch.Although it should work fine in theory I've been told that ideally I should add debouncing circuitry to the switch or replace it (the mechanical switch) altogether with a multiplexer IC for solid state switching.I've also read about similar circuits that include video buffering for the H-sync/V-sync signals and a sync separator in order to improve and stabilize the signal.My question: which specific components are we talking about, and how do I incorporate it into my existing schematic?

author: BrianHG
author_rank: Super Contributor
timestamp: August 25, 2024, 09:36:52 pm
content: https://www.analog.com/media/en/technical-documentation/data-sheets/MAX4885.pdf

author: Benta
author_rank: Super Contributor
timestamp: August 25, 2024, 11:18:57 pm
content: I don't see any problem in your design. The "debouncing" hooey might be relevant when dynamically switching between channels, but frankly: static switching with a slide switch is no issue at all.

author: BrianHG
author_rank: Super Contributor
timestamp: August 25, 2024, 11:59:32 pm
content: Quote from: Benta on August 25, 2024, 11:18:57 pmSo long as you do not break all the GND connections, and you are using a low video bandwidth such as 15khz to ~31khz video, a quality mechanical switch should work fine.For the opposite of what you are doing:In some old VGA switch-boxes, I've measured cross-talk when having 2 different sources to 1 monitor, however, you could not see it on the monitor most likely due to the 2 video sources weren't synced at all.

author: analogix
author_rank: Frequent Contributor
timestamp: August 26, 2024, 11:08:28 am
content: Quote from: BrianHG on August 25, 2024, 09:36:52 pmThat MAX4885 looks nice for the job, but as far as I can see it only switches between two outputs (I need three).I suppose cascading two of these chips would do the job, but if the circuit already works fine I'd rather skip the complications of redesigning things unless there's a compelling reason to add it.Quote from: Benta on August 25, 2024, 11:18:57 pmWhat do you mean by "dynamically switching" and "static switching"?Would I need to power down the computer when switching video output modes?I've been told that if I go for my passive/mechanical switch solution as in my schematic, (and/or buffering -sorry, can't remember which) I will cause stress to the computer's video circuitry.Is there any truth to this? What does buffering the video signals actually do, and is it required?Will there be any downsides to my schematic?QuoteYes, they're around that range, more specifically:"High" resolution mode (monochrome, 640x400):V-sync 71.2 Hz, H-sync 15.75 KHz"Low/medium" mode (colour, 320x200 or 640x200):V-sync 50 Hz, H-sync 35.7 KHzAs for GND connections: they should be permanently attached (except for a "mono detect" pin which forces the computer to reboot into hires monochrome mode when pulled to GND).

author: Nominal Animal
author_rank: Super Contributor
timestamp: August 26, 2024, 02:21:01 pm
content: I wonder if aVishay DG4052Eper pair of signals (in TSSOP-16) would work. It is a 4:1 analog multiplexer with 300MHz+ 3dB bandwidth at 50Ω load, and Mouser sells them in singles for1.43€apiece. You would need four of them (for eight signals). You'd also need a 5V supply, but I believe it should yield superior signal quality compared to a mechanical switch.However, I found myself looking at the very cheapTI TS5V522CVGA multiplexer, which Mouser sells for0.81€ apiece in singles. With two, you'd have your three inputs. With three, you'd have three inputs and three outputs, and the ability to choose any combination of the inputs on the outputs: ABC, ACB, BAC, BCA, CAB, or CBA. That excludes the composite output, though. Of course, with just one more TS5V522C, you could do two composite outputs.As I like to use microcontrollers even in designs that don't need them, I'd be tempted to use a cheap 5V microcontroller like CH552G to control the switching, and maybe use a small 0.91" (128×16) OLED module to display the configuration (turning the display off after say ten seconds).

author: Benta
author_rank: Super Contributor
timestamp: August 26, 2024, 05:01:06 pm
content: Quote from: analogix on August 26, 2024, 11:08:28 amI was told by someone...Jokes aside, by dynamic I mean that the monitors are synched up all the time so you can switch between them on a frame-to-frame basis.I don't expect you to move the slide switch at VSYNC speed, so your switching is static, eg, once a minute or hour or second or whatever.As for "stressing" the video outputs: you can short-circuit them if you like, they'll be OK with that.

author: BrianHG
author_rank: Super Contributor
timestamp: August 26, 2024, 05:17:09 pm
content: Quote from: analogix on August 26, 2024, 11:08:28 amNot cascade, parallel and you get 4:1, or X 2x2.Remember, you have a disable on each chip which isolates each side from each other, IE an open circuit...Cascading means 1 video source will go through 2 chips in series, in effect doubling the ON state resistance. IE: 1 video port will be a bit brighter than the other 2.

author: BrianHG
author_rank: Super Contributor
timestamp: August 26, 2024, 05:22:33 pm
content: Quote from: analogix on August 26, 2024, 11:08:28 amYou got your 2 H-scan rates backwards and I am not sure about the 50hz Vsync...

author: analogix
author_rank: Frequent Contributor
timestamp: August 26, 2024, 08:12:11 pm
content: Quote from: BrianHG on August 26, 2024, 05:22:33 pmOops! You're right about mixing the two Hsync rates.I looked them up again (service/user manuals) and the correct specs should be:High resolution monochrome mode:71.2 Hz (Vsync), 35.7 KHz (Hsync)Low/medium resolution colour modes:50 Hz (Vsync), 15.7 KHz (Hsync)The 50Hz Vsync in colour mode is correct (or rather it's 50 or 60 Hz depending on which country the computer was sold in).

author: Roehrenonkel
author_rank: Frequent Contributor
timestamp: August 26, 2024, 08:45:36 pm
content: Hi analogix,the MAX499 worked just well for us (best KVM-switch) 25 years ago.It's an amp and mux with disable, so it can be cascaded to 8-->1.Good luck

author: analogix
author_rank: Frequent Contributor
timestamp: August 31, 2024, 08:34:35 pm
content: The big question is if I actuallyneedmultiplexing circuitry for my application.It would make construction a lot easier if I could skip them altogether, unless there's a compelling reason to use them here.On the other hand I see that finding an 8-pole, 3-way (8P3T) slide switch proves to be challenging.I've been reading a bit up on MUX chips -how they work and so on, and I understand that for this particular circuit I basically need one with a single input and 3 outputs, which I believe are referred to as "1:3". In other words the solid state equivalent of a 1P3T switch.And for all 7 separate signal lines I would need 7 of those; either in a single chip or multiple chips, all controlled by the same switching signals (which I understand are logic high/low voltage levels (+5V or 0V) going to several control inputs with their combinations determining the switch positions, right?And they would have to be able to handle Vsync rates between approx 50-73Hz and Hsync rates between approx 15-36 KHz.

author: BrianHG
author_rank: Super Contributor
timestamp: August 31, 2024, 11:48:31 pm
content: Quote from: analogix on August 31, 2024, 08:34:35 pm1P:4T, 2 in sets in 1 chip exist like the 74HC4052.However, unlike the MAX4885 chip I mentioned where you would use 2 of them, the MAX4885 has an ON resistance of 4 ohms and only requires a single 5v supply while a 74HC4052 has 60ohm on resistance with a +/- 5v supply. (MAX4885 has a built in negative power supply generator...)

author: analogix
author_rank: Frequent Contributor
timestamp: September 05, 2024, 06:02:07 am
content: Quote from: BrianHG on August 31, 2024, 11:48:31 pmI see what you mean.Unfortunately I don't have any experience/tools for mounting SMD type components, so if possible I'd like to stick with DIL chips.And to answer a previous question of mine myself, regarding the need for a MUX-solution or not: I haven't been able so far to find a mechanical 7-pole (or 8 pole), 3-way slide switch. Rotary switches with that many poles may prove a different matter, but isn't what I want for this application, so I suppose going that route (although simpler to incrorporate into my schematic) isn't possible.I must admit this (multiplexers) is a bit over my head, but I've tried to study the datasheets.So, looking at the 74HC4052 for starters I understand this much:It's got 8 in/out channels, like you said: 2 switches in one chip. Since they are labelled "In/out", does that mean they're all freely assignable to be used as either in or outs? How is that done? I couldn't find anything in the datasheet.As for the actual switching, I understand this is done with a combination of logic high and low voltages to the pins marked S0 and S1, but the actual results make no sense to me. I just want one input and a choice of routing it to one of 3 outputs. And 7 of those (7 signal lines).I suppose a 2-pole, 3-way slide switch could be wired up for the correct combination of high/low signals to the chip, and with multiple 74HC4052 chips (4 chips meaning 8 separate switches) I'd connect each chip's S0 and S1 lines to the same places on the switch (hence 8 switches being synchronized with one another).

author: BrianHG
author_rank: Super Contributor
timestamp: September 05, 2024, 07:33:54 pm
content: Yes, the connection between the 'com a/b' and 'a# / b#' when turned on is equivalent to being a 60 ohm resistor. Like your mechanical switch with a series 60 ohm resistor in series on the common wiper. The signal can move both ways like it would through a 60 ohm resistor. For the unconnected channels, they are like a gigaohm resistor, so, basically an open circuit.You appear to understand how to use the 74HC4052.There exist equivalents which have a superior 'on' resistance.Here is a SOP-10 package 4:1 analog mux with 2.35 ohm on resistance: MAX4634EUBhttps://www.mouser.com/ProductDetail/Analog-Devices-Maxim-Integrated/MAX4634EUB%2b?qs=sGAEpiMZZMutXGli8Ay4kAk%2FWsVShuMFVwY8YeI%2FTgA%3DCheaper TI equivalent: TMUX1104 (Same specs as the Maxim part)https://www.mouser.com/ProductDetail/Texas-Instruments/TMUX1104DGSR?qs=PqoDHHvF64%2FGMPQ%252BUVRygg%3D%3DHowever, the allowable analog switch IO voltage range is between 0 and 5v. If the AtariST video is like the Amiga video output, then it will be fine. (The other ICs allow for -5v through +5v)There also exist a 0.8ohm on resistance part, but, the max IO voltage is 4v, not 5v.

author: analogix
author_rank: Frequent Contributor
timestamp: September 06, 2024, 07:19:47 pm
content: Quote from: BrianHG on September 05, 2024, 07:33:54 pmAh! I totally missed the "COM" pinsI think I understand it a little better now.So the MUX chip (74HC4052 in this case) basically works as a two-pole, 4-way switch, like this?As for the actual switching I see that I also missed the EE pin. I understand this is for disabling the two switches altogether, right?Since I won't be doing that I think I can just connect EE to GND permanently (logic low).If I'm not mistaken I understand the rest of the logic as follows:In the first option (red highlight) with low/low switch A connects between COM-A and A0, and likewise COM-B connects to B0.So for my use I need a 3-way switch and therefore only need 3 of 4 possible switching-options (and can skip the "none" option at the end which doesn't connect either COM pin to anywhere).But another question arises. Looking at my schematic I have unconnected pins to my 7 switches. Is it OK to leave them unconnected? I've learnt that logic signals should never "float", but have a definite +5V or 0V connection. But perhaps this doesn't apply here?QuoteYes, I think I understand the basic concept a little better now. Do other MUX chips work much in the same way?QuoteI think they're similar. I believe its output level is 1V peak-to-peak.But I'm not sure about the "Mono detect" line which is pulled to GND in order to enable that mode (monochrome hires output), while having it disconnected the computer goes to colour low/medium resolution mode. I imagine it being +5V or less, but I need to do some research to be sure.QuoteWow! Hugely better than the 60 Ohms of the 74HC4052. Still, will there be noticeable signal degradation with 60 Ohms?

author: BrianHG
author_rank: Super Contributor
timestamp: September 06, 2024, 09:09:32 pm
content: Quote from: analogix on September 06, 2024, 07:19:47 pmYes, it is a 4 position switch with 2 control input pins.Remember, the device operates exactly like a mechanical 4:1 switch. (Actually 5:1 if you count the EE as a switch position with nothing connected...)The signals travel in both directions just like a mechanical switch.You may have unconnected IO pins just like a mechanical switch.The 2 most important points is that:1. For the 74HC4052, the electricity on any of the switches IO pins cannot go below the Vee voltage, or go above the VCC voltage, otherwise, you will blow the chip.2. The quality of the contacts of these switches are their on resistance, in the case of the 74HC4052, it is 60ohms. It is like your switch is a really long resistive wire in circuit.Quote from: analogix on September 06, 2024, 07:19:47 pmRemember, for the analog video mode, the monitor's analog input has a resistor of 75ohm to GND.This means, if your analog switch when on has a 75 ohm series resistance, then the signal the monitor would get would be half bright because of the monitor's 75ohm load. (This is an example, there is actually already another 75ohm series resistor in your Atari ST's video DAC output as well, so the loss is actually less...) Since the 74HC4052 has a 60ohm series resistance, the final picture would be a little brighter than 50%. If the analog switch has a perfect 0 ohm short when on, then the monitor's brightness would be perfect.So, for my recommended TI part#, TMUX1104, it has a <2ohm short when turned on if you powered it with 5v. At 2 ohm, you will not see the ~1.3% drop in overall contrast (Assuming the Atari ST analog output has the standard 75ohm series resistor) in the image for analog picture modes (digital would have 0 effect). If you powered the TMUX1104 at the absolute max 6v, it will approach ~1 ohm.This is my PCB recommendation for a hand-wired switch-box solution:Make a tiny 10x10cm 2 layer board with 1x TMUX1104, 1 or 2 decoupling caps, and a common through-hole connector on 1 side with GND, 5v, S0, S1, ENA. All of your 8 PCBs for the 8 poles will have these ports all wired in parallel. Use something like long gold standoff pins or thick single strand copper wire through all 5 pins of the 8 boards in parallel. Actually, add a second GND pin.On the other side of the PCB, make a 4 pin connector, COMMON (IE: Switch wiper), Position 1, Position 2, Position 3, Position 4. Space these guys out for wiring. Actually, add 2 additional GND pins so you may solder the 8 boards with the standoffs on both sides just to make it more sturdy.10cmX10cm boards for first time buyers from a Chinese costs around 5$ for 10pcs delivery next day.It is a cheap as you will get. (You may be able to fit 2 or 4 TMUX1104 on a 10x10cm pcb.)You will need to supply the MUXs with 5v. A 78L05 and 2 caps and 9-24v adapter will do, or a quality USB 5v supply.QuoteFor analog capable MUXs, yes they all work in a similar fashion.For digital MUXs, they only discern between digital high and digital low, plus, they only transfer the signal in 1 direction. Most digital MUXs go from the multiple input channels to a 1 common output.

author: analogix
author_rank: Frequent Contributor
timestamp: September 10, 2024, 11:31:57 am
content: Quote from: BrianHG on September 06, 2024, 09:09:32 pmGood to know!And thanks for all the other explanations.So basically I need to check any MUX's switch resistance, and compensate (if possible) for that in my specific application?In this specific example: the Atari ST video output is 1V P-P while the official VGA specs say 0.7V P-P, so regardless of MUX or not I have to add resistors to the R, G and B output lines to make it more compatible with the 0.7V standard.So with the MUX switch resistance I'll have to subtract that (60 Ohms for the 74HC4052) from the proposed resistor value I guess.Of course, if there's no resistor to be added to the circuit to begin with there's a problem with a MUX switch's high resistance.Is this an issue only with MUX chips made to handleanalogsignals?QuoteI understand. Seems like a better choice (according to some videos it appears that hand-soldering SMD chips with basic gear isn't as difficult as I first thought, so maybe I shouldn't put DIL chips in the criteria for which MUX to go for, but rather specs and costLooking into the datasheets I found another one from TI calledTMUX1109which more or less appears to be more or less the same as the 1104, but with two switches instead of one! This would effectively halve the amount of MUX chips I need for this project.OK, I've looked some further into all of this, so let me see if I understand the basic principles, here shown with the TMUX1109.First, here's how I understand how one MUX's internal switches work, and how they're controlled with a 3-position slide switch:The slide-switch connections are based on the datasheet's truth table:Finally, for my specific application, here's how I propose setting up four TMUX1109 chips for a total of 8 individual switches (I'll be using 7), all controlled simultaneously with the 3-position slide switch:QuoteGood suggestion! And I didin't know that about cheap PCBs when ordering for the first time -will come in handy when I do get this and my other projects ready for orderingFor this project I will be mounting it inside a new enclosure for the computer, so I don't need to worry about the size (within reason) of the PCB/PCBs.I'm aiming for a single PCB which mounts on the rear panel of the enclosure with cutouts for the connectors and slide-switch. There will be a single cable that connects internally between the original Atari ST video output to this board (which includes a +12V line). I haven't looked that much into the power part yet, but if the +12V line doesn't suffice I could just connect it to the computer's power supply.QuoteAnother project for this computer (Atari ST) is to switch between multiple peripherals attached to the serial (RS-232) port and likewise for the cartridge port.I believe these ports both carry digital signals, and lots of them (40 pins for the cartridge port (around 37 unique signals) and 25 pins for the serial port (around 9 unique signals if I'm not mistaken) ).What should I look for in order to find MUX chips suitable for switching 37 or 9 digital signal-lines at once?

author: analogix
author_rank: Frequent Contributor
timestamp: September 15, 2024, 11:37:46 am
content: By the way, theUbeSwitchis a similar project as mine except itreplacesthe Atari ST video output connector (DIN13) with a VGA multisync output connector (HD15), and onboard logic which uses a momentary pushbutton to select the mode (monochrome or colour) and memorize it. It uses aTI TS5V330MUX.With the schematics freely available I've studied its design: the MUX contains 4x two-way switches, but the fundamental difference to mine is that it has a VGA output (HD15 connector) whichreplacesthe original Atari video output while in my design I amaddinga VGA outputin addition tothe original Atari video output.So, wanting a "fool-proof" design I believe I need to isolate the common signals from each of the two connectors (i.e. a given signal is only available at one connector at a time), so that in case both an Atari monitor and a VGA monitor is attached they won't mess anything up.Out of the 13 pins of the Atari video output, these are the ones which I need for the VGA connector (and thus need to switch):RedGreenBlueHsyncVsyncMonochrome detect(sets the computer to 'monochrome mode' when pulled low (GND), when disconnected the computer boots into 'colour mode')Monochrome(output signal in 'monochrome mode' instead of the R, G and B lines)The rest of the 13 signals will go directly to the new DIN13 connector as they're not shared with the VGA connector.GND signals will all be tied together though.So in summary I probably need 7 signals to be switched for this particular setup (correct me if I'm wrong -if any of the signals above can go to two display outputs without messing things up), and it appears hard to find a MUX which has 7 (or more) channels and 3 (or more) switch positions, and also with very low switch resistance. They're (according to my findings) either with many channels (i.e. 8 channels) but with fewer switch positions (i.e. 2), or... less channels (i.e. 2) but with more switch positions (i.e. 4).Unless someone can point me to a MUX which 'can do it all' I likely need to use several of them.I see two possibilies with combinations of multiple chips:1)MUX chips with many switch positions (i.e. 3 or 4):8 pcs. TMUX1104 (1 switch in each chips), or 4 pcs. TMUX 1109, all connected to the same logic switching.2)MUX chips with many switch channels (i.e. 8 ):2 MUX chips which switch the signals into two 'groups' each, like here:

author: BrianHG
author_rank: Super Contributor
timestamp: September 15, 2024, 11:56:39 am
content: Like this:This way, you only get 3 ohm impedance instead of using 2 switches in series where you get 6 ohm impedance.

author: BrianHG
author_rank: Super Contributor
timestamp: September 16, 2024, 08:52:04 pm
content: Remember when wiring it my way, use the Enable pin on each IC, and on the second IC with the switch it will be enabled with the switch selection going high or low.

author: analogix
author_rank: Frequent Contributor
timestamp: September 17, 2024, 06:13:03 pm
content: Quote from: BrianHG on September 15, 2024, 11:56:39 amOops! I missed that one. And it makes perfect sense of courseThanks for pointing it out.QuoteI had completely set aside the "enable" feature, thinking it had no use for my design, but having re-read the whole thread again plus your comments here I think I get it: namely to disable one of the the MUX chips in order to isolate it from the other!That, along with selecting the switch groups of each MUX appears to do the trick.Let me see if I've got it right here....In the following illustrations the thick yellow arrows represent the 7 signal lines which need switching and isolating between the two video outputs.There's a mechanical switch (green) at the bottom where the user selects the video mode.The MAX4885 which you initially suggested seems to be an appropriate choice (8 signal channels, 2-way switching, low switch resistance and currently available).OK, so for the 3 mechanical slide-switch modes:'ATARI' mode:Here, MUX2 is disabled (to disconnect it completely from MUX1).The original Atari video output is passed on to the new Atari DIN13 output. MUX1 is only needed to isolate the signals from the rest of the circuit (i.e. enable/disable the MUX), so I'm hard-wiring the switch selection logic as I only ever need one switch setting and thus can save on input pins for the mechanical switch.'VGA-mono' mode:Now MUX1 is disabled, and MUX2's 'group A' switches are chosen for the VGA connector's monochrome mode'VGA-colour' mode:As in the previous VGA mode, MUX1 is disabled, but here the MUX2 'group B' switches are chosen for the VGA colour mode.Have I understood it correctly?If my aim is to save room on the PCB I think the above solution (two MAX4885 chips) might be a good way to do it, right?But I could also do it with MUX chips having 3 or more switch positions, (and do away with the two "groups" of MUXes and the need for disabling one or the other), but that would probably mean using more PCB space (eight TMUX1104 or four TMUX1109).theMAX4885appears to have good specs (though a little higher switch resistance than the TMUX1104/1109 chips), but I see it has Hsync/Vsync buffering (which I understand is basically "signal conditioning) which must be a good thing. Also, I suppose having less chips to deal with probably demands less PCB design knowledge to route the traces correctly in order to avoid interference, signal degredation etc. as opposed to having many signals taken care of inside the chips themselves.One question which the datasheet doesn't explain very well: what are DDC signals?Two of the switches handle those, and I'm hoping these aren't dedicated switches for some specific signal, but can be used for anything?I hope they can be used for the MONO DETECT and MONOCHROME signal lines from the Atari video output.

author: BrianHG
author_rank: Super Contributor
timestamp: September 17, 2024, 06:36:47 pm
content: OK, so long as your switches are wired correctly, and those mono/color resistors are correct, you should be good to go.For MUX1, you do not need the A/B wiring, just the enable and hard-wire the switch into position B unless you want an extra position #4.As for controlling the muxes with a switch, this is OK. If you are worried about MUX1 and MUX2 being on at the same time for an instant, use a pull-up resistor to default disable them and use the switch contacts to pull them down to the GND.Use a 3 position switch with 2 poles, 1 pole for the 2 different enables and the other for the A/B on MUX2.The other method to insure that both MUXs wont get confused is to use a 74HC00 quad nand gate, 1 as an inverter an the other gates to select A/B for mus 2 where you may now has 2 wire control if you like it that way. (Simple logic AND/NAND selection)I assume you will use a 78L05 to convert the atari +12v to 5v for the MUXs.

author: analogix
author_rank: Frequent Contributor
timestamp: September 19, 2024, 09:13:07 pm
content: Quote from: BrianHG on September 17, 2024, 06:36:47 pmThanks for checkingYes, I need to go through the rest of the wiring again to be sure.QuoteYes, this is what I figured out after you reminded me of the "disable" option, and included that in my diagrams.I could probably use a 8-channel, 1-way MUX, but there don't seem to be many 8 channel ones to choose between, so I'll just go for the 2-way chip (MAX4885). Maybe add small traces and through-holes on the PCB for the unused switches in case I find a need for them.QuoteI'm not sure what you mean, but something like this, and likewise for the other MUX?QuoteThis sounds like a more streamlined method, but I will have to study this a bit more as it's a little over my head.QuoteGood point! It might be safer if I don't touch the +12V pin of the DIN13 connector (Atari video output) and connect this board directly to the power supply's +5V line. Possibly adding a resistor to limit the current?That way I won't risk messing things up if an attached Atari monitor needs this +12V line for something, leaving the "new" DIN13 connector to be more or less identical to the original DIN13 output.

author: BrianHG
author_rank: Super Contributor
timestamp: September 19, 2024, 09:58:58 pm
content: Yup, you are AOK with the pull-up resistor and a switch shorting the enable to GND.Dont worry about the 74HC00, just keep it simple.Yes, do use a 78L05 or equivalent.A 78L05 will take in anywhere from 7.5v to 28v on it's Vin pin.Tie it's GND pin to GND.It's Vout pin will be a 5v supply.Add 2x 0.1uf caps to the Vin and Vout pins to GND.A 78L05 has a built in current limiter of 100ma, so you will be safe.It's available in TO-92 3 pin transistor looking type through-hole package, or in an SO-8 pin ic package.7805 can be used as well, just that they can deliver up to 1amp.

author: analogix
author_rank: Frequent Contributor
timestamp: September 29, 2024, 12:17:21 pm
content: Quote from: BrianHG on September 19, 2024, 09:58:58 pmThanks for confirmingQuoteYou got me curious though, and I'm open for learningI may be way off here, but I'm guessing the purpose of the 74HC00 is to enable MUX1 while disabling MUX2 (and likewise the opposite)just by using a single logic HIGH or LOW to one of its (74HC00) pins?In other words, the 74HC00 controls two MUX chips at once, and the mechanical switch controls the 74HC00.... in contrary to a pure mechanical switch solution (to enable and disable the MUX chips) which would be a more complicated wiring setup.Is that it?I'd personally prefer using a logic chip to control the 'EN' (enable) pins of the two MUX chips if that means a single high/low signal from the mechanical switch. I haven't looked in detail into how many poles might be needed, but my initial thought is that it would require less poles and be less complicated.If I could simply send a HIGH (+5V) or LOW (GND) voltage to the 74HC00 to set it into two modes as follows, that would be great!QuoteSounds like a good solution (having everything on a self-contained PCB instead of relying on additional connections), but in case I do run into problems if the +12V from the Atari video output connector is used for something that drains more power than is available after the MUX chips/78L05 takes what it needs (I recently learnt that the +12V was probably used for whenever the Atari video output was attached to a television SCART connector where the +12V connects to a certain pin on the TV's SCART automatically switches over to the AV input)... then maybe I should add the option of a jumper and power connector on the PCB so that I could easy take power directly from the computer's power supply.By the way, I found there's aMAX4885 evaluation boardavailable, which I understand takes one VGA input (from a computer's VGA output connector) and switches between one of the two available VGA output connectors (for selecting one of two screens). Though close but not exactly what I'm designing here, I took a peek at itsdatasheetout of curiosity and found it very insightful as it both explains how it works and has a schematic, so I'm going to study that in more detail to understand this better.A practical question: the MUX appears to come in a 24 or 32 pin package (I haven't quite understood the differences, but something I'll need to look into), and they're both 'TQFN' packages which I looked up and they seem to be a challenge to hand-solder. Can this be done, or are they meant to be soldered professionaly?I plan to buy a soldering-station (ESD-safe)to replace my cheap & simple soldering irons, but will that be enough to make this possible to do myself, or would it be better to order the PCB with the MUX chips pre-soldered? I believe there are some companies out there that both manufacture the PCB and solder components on them, but don't know which companies do that and the costs.(image source:MadPCB.com)

author: Nominal Animal
author_rank: Super Contributor
timestamp: September 29, 2024, 05:20:12 pm
content: Quote from: analogix on September 29, 2024, 12:17:21 pmIf you get a small hot plate and hot air, definitely yes. Others have described using a custom footprint, with a large plated through hole on the bottom, so they can use a fine tipped iron to solder first the IC pads (one at a time, tip in the corner between the PCB pad and the tiny bit of exposed IC pad), and finally the large center pad from the other side of the board.I myself am exactly at that stage (and after that, onwards to BGA), having a cheap hot air station (see discussions in theOther Equipment & Productssubforum here for which one and what to look for), a tiny (for smaller than 2"×2" or 50mm×50mm boards) USB-C PD hot plate you can get off Banggood for a flash deal for under 15€ right now, and aPinecilUSB-C PD soldering iron with full set of tips.The existing soldering practice kits and DIY kits I've seen don't have interesting enough components – do get a few SMD LED projects or similar for a couple of USD/EUR each, if you haven't soldered any SMD components yet –, so I'll design my own, based on cheap microcontrollers easily programmed with open source tools (my workstations all use Linux). (I'm specifically looking at a CH32V305-based isolated UART/SPI adapter, designed to be partially populated for programming and testing as soon as the MCU and a couple of capacitors are soldered.)You can find a lot of videos about the various soldering methods on Youtube, but be careful: there are a lot of garbage videos, so do check the comments, and skim a lot of videos, to see what works. I can tell that good flux, isopropyl alcohol (IPA), occasionally acetone, and an old toothbrush makes for a much nicer soldering job and results, for example!Quote from: analogix on September 29, 2024, 12:17:21 pmI useEasyEDAor KiCAD to design my own PCBs. EasyEDA directly interfaces toJLCPCBfor PCB manufacturing and optionally SMD assembly, but for assembly you need to use theirparts catalog(which is very easy from EasyEDA, as it even shows the per-component price from JLCPCB or LCSC when selecting components). You can pick any such EasyEDA design and easily check the price by starting the ordering process, the price calculation is online and instant.Unfortunately, JLCPCB does not seem to have anymax4885 in stockright now.PCBWayis another, often used by for PCB manufacturing and optionally SMD assembly by us hobbyists, but I haven't personally used them yet (only because JLCPCB is so darned easy to use with EasyEDA).The assembly is usually limited to components on one side of the board, and I do suggest soldering any through hole components yourself. I do plan to have components on both sides (just because!), but solder everything on at least one side myself.As to the prices, you can get a set of ten PCBs up to 10cm×10cm/4"×4" for a few USD/EUR plus shipping costs. For SMD assembly, there are additional costs that vary, but as a rough idea, the setup etc. fees seem to be on the order of 25 USD/EUR for two/five/ten boards at JLCPCB and PCBWay, plus the part costs of course.

author: analogix
author_rank: Frequent Contributor
timestamp: September 29, 2024, 08:59:06 pm
content: Quote from: Nominal Animal on September 29, 2024, 05:20:12 pmGood to hear it can be done, although (to me) it sounds very risky.I was also hoping not to buy any more gear than strictly necessaryMaybe worth looking into the other option (discussed further down) since this is probably one of the few projects I need to use these kind of components.QuoteThat's a good suggestion actually -SMD soldering practice kits!Judging from several Youtube videos it appears that soldering standard SMD components (ICs with normal legs etc.) is doable with normal equipment. I understand that the key is to add a lot of flux to the areas to be soldered (I've never used flux before, so this will be a new experience).Probably a good idea for me to practice on a few non-critical practice kits before attempting the project I'm discussing in this threadQuoteThat's the usual problem with Youtube etc. -to distinguish the trash from the proper information. I'll see if I can locate some good ones, then move on to the practice kits. Maybe I can even find one seller with several different SMD practice kits (so as to save on shipping costs, import duties etc). If someone can suggest one, and specific kits I'm all earsQuoteCool!I still consider myself a novice, but I've spent so much time learning Eagle and built up a small library of additional parts that it would be like starting from scratch to learn another CAD package. Do you know if the above can be done with Eagle too, or if there's a way to order the assembly of certain components from the Gerber file from them (or other PCB manufacturers)?QuoteOhDo you know if the MAX4885 is a common component which is usually easy to order along with PCBs?Deciding between 24- and 32-pin versions of this MUX is probably something I should be flexible with depending on what's available.QuoteThat's OK. I enjoy soldering through hole components, so that's no problem. And I can probably design the board to have any SMD components to be soldered by them on just one side.Good to know about this -thanks!QuoteAre you referring to ten ofthe same PCBswhen ordering at those prices? I probably only need one (but a spare or two won't hurt, being unexperienced at this).With a setup fee it's probably a good idea to order a few PCBs though, in case I mess things up, or in case someone else might want one.

author: Nominal Animal
author_rank: Super Contributor
timestamp: September 29, 2024, 10:38:55 pm
content: Quote from: analogix on September 29, 2024, 08:59:06 pmSure.JLCPCB takes a ZIP file with Gerbers for manufacturing PCBs. For SMD assembly, you also supply a CSV file (from Excel, LibreOffice, etc. spreadsheet), and a CPL or Pick and Place file.EasyEDA is supposed to be able to open Eagle (v6 or later) and KiCAD and Altium Designer files in the online Standard editor, but I haven't tested that myself.It really is a very hobbyist-friendly schematic and PCB editor, probably more suited to hobbyists than actual EEs. It's what I've used to learn practical PCB design with for the last few years, marking my designs CC0-1.0 aka Public Domain, so it being cloud-only is no issue for me. Only now, as KiCAD is getting better, I'm switching slowly to KiCAD.Quote from: analogix on September 29, 2024, 08:59:06 pmWell, LCSC/JLCPCB did supply EasyEDA with the footprints, so it isn'trare.However, I would reconsider the choice, and look atTI TS5V522CPWR+74CBT3257Cas a replacement for each MAX4885. If I've understood your needs correctly, it should be similar (but with two chips; one for analog signals and I2C, and the other for H and V sync signals), with slightly lower typical resistance (3Ω vs. 5Ω typical) and slightly higher typical capacitance (8pF vs. 5.5pF), but is available at both LCSC/JLCPCB and Mouser, and for only a fraction of the price of MAX4885.Most importantly, TS5V522CPWR and SN74CBT3257CPWR are a 0.65mm pitch TSSOP packages (dense, but with SMD legs), which are drag-solderable using a standard iron (using e.g. chisel-like K-tip). I suspect even the signal routing might be easier, because HSync and VSync are in a separate chip. These have an active-low Output Enable, so you can put several in parallel to the same input signals or to the same output signals to get N:1 or 1:N selection, without chaining the chips, by only enabling the output on one chip at the time. Both are in EasyEDA component libraries, too.The main difference is that the TS5V522CPWR analog bandwidth is "only" 380 MHz –– so suffices for up to Full HD (1080p, 1920×1080 50Hz) and 1920×1080 70Hz ––, whereas MAX4885 is 900 MHz. For what you are doing, there should be basically zero difference in the signal quality. And, of course, as I already mentioned, H and V sync signals are routed through a separate chip, SN74CBT3257C.Quote from: analogix on September 29, 2024, 08:59:06 pmYep, the same PCB. JLCPCB does offer e.g. assembling only 2 boards and sending you the rest unpopulated, but it doesn't shrink the setup fees. Its when you have ten or more of the same boards made and assembled, that amortizes the fees to an easily acceptable level (to a minimal-budget hobbyist like myself).It really makes more sense to use components you know you can solder yourself for one-offs. And do note that making bare 4-layer PCBs costs about the same (for 2-10 PCBs) as for two-layer boards, just a few USD/EUR plus shipping; no need to limit oneself to 2-layer PCBs.

author: analogix
author_rank: Frequent Contributor
timestamp: October 08, 2024, 06:56:36 pm
content: Quote from: Nominal Animal on September 29, 2024, 10:38:55 pmDo they (or other low-cost PCB manufacturers suitable for hobbyists) have a search function for which components they can supply?I tried to find out, but from the looks of it you have to upload a Gerber file first (which I don't have as I haven't even completed designing my PCB).QuoteThanks for your suggestion! Yes, although i've personally never done it before, it seems drag-soldering is something that can be done with good tools and some practice.Too bad about the MAX4885, because it has the 7 channels I need all in one and I almost had it all figured out, but with the practical soldering issues I'm open for looking into other solutions like your suggestions here.You mentioned 'I2C': are these digital signals? If i've got it right all the video signals are analog (R, G, B, Hsync, Vsync), right?Likewise I think the "Monochrome" signal is analog as well as it just outputs an analog video signal.But I'm more unsure about the "Monochrome detect" signal -if it's analog or digital. Its purpose is to change the computer's video mode to low/medium resolution colour ("Monochrome detect" untouched), or high resolution monochrome ("Monchrome detect" connected to GND).As far as I've understood an "analog switch" type MUX can be used for either analog or digital signals while there are MUX chips that only work with digital signals, correct?I've spent some time thinking all this through, studying how the various MUXes work as well as how other VGA output adapters for the Atari ST (Ubeswitchanda variation of that one by Edoardo Kinmami)They both use theTS5V330(4-channel 2:1 multiplexer) which I see is sufficient for only switching between 2 display modes (colour and monochrome) on a single VGA connector as only these signals are switched:RedGreenBlueMonochrome detectIn addition, the 'Monochrome' signal is connected to one of the switched outputs, so 5 signals altogether.Building upon this I think the key is to isolate the shared signals so they don't interfere with each other. Thanks to what I've learned here about the ability to switch off an entire MUX in one go, and experiencing that it's hard to find a single MUX chip with several channels (i.e. 7 or 8 ) along with multiple positions (i.e. 3 or 4) I got the idea that I can probably go for a single position (1:1) MUX with 7 (or more) channels for the new Atari DIN13 output side, and if I recall correctly there are several MUX chips like that to choose from with low resistance and in a solderable package.For the VGA connector side I probably need similar amount of channels (in order to isolate the signals from the Atari DIN13 new output side) which is a little more complex as it has to be a 1:2 MUX (or is it 2:1?), so perhaps your solution with multiple chips is the way to go. Here's a diagram of my suggestion:QuoteHow can I find the bandwidth requirement for the Atari ST video output? Is it simply a matter of the Hsync and Vsync frequencies, which is course is much much lower than that. And the resolution is at most 640x400 pixels, so maybe I can even look at lower spec MUX chips and find one which has the 7 channels I need.Also, do I need to look for a "Videoswitch" type MUX, or can any analog switch MUX (with a low on-resistance) be used?

author: Nominal Animal
author_rank: Super Contributor
timestamp: October 08, 2024, 09:10:29 pm
content: Quote from: analogix on October 08, 2024, 06:56:36 pmYes, but it is a bit wonky:jlcpcb.com/parts. The part numbers (Cnnn...) are the same as LCSC, so you might wish to use the LCSC catalog, note the part number, and then search on that at JLCPCB.I've found it easiest to do from within EasyEDA. Just openthe editor, selectFile>New>Schematic, to start a new schematic. Clicking on theLibrarybutton on the left brings up the parts selector. I useSearch engine: EasyEDA,Types: Symbol,Classes: JLCPCB Assembledto find out what JLCPCB have in their catalog. Type something in the search bar center top, for exampleTS5V330, press Enter, and you see the list of seven JLCPCB might have in their catalog. Clicking on one lists parts price (not taking minimum quantities into account!), LCSC stock, and JLCPCB stock for assembly. If you don't find what you want, clickCancelat bottom right; otherwise clickPlaceand click on the schematic to drop the part there.Quote from: analogix on October 08, 2024, 06:56:36 pmExactly. I'm playing with a cheap USB to isolated UART-and/or-SPI gadget, and using something very similar to route the signals via the unidirectional isolators (cheaper and more robust).Also note that there are cheap, tiny "configurable" logic gates like 74LVC1G57 (in SC-74/SOT23-6/SOT457, the 0.95mm pitch size that is still hand-solderable), that you can use to generate the three selector signals based on the three position signals. Each one has three inputs and one output. The idea is that to get the logic you want, you tie one or two of the inputs to VCC or GND, so that you get the desired pattern on the output, for enabling the desired muxes/buffers/switches.Quote from: analogix on October 08, 2024, 06:56:36 pmTI AN-944explains this.Basically, the maximum video frequency isH×V×f/2, wherefis the refresh rate (frames per second),Vthe number of rows per frame, including blanking and retrace intervals, andHis the number of pixels per row, including blanking and retrace intervals.For the industry standard VESA 640×480 60Hz non-interlaced mode, it is about 12.6 MHz. I'd say any analog switch with 3db bandwidth wider than 30 MHz or so should work for you.What I would do if I were you, right now, is a table (spreadsheet, I use LibreOffice Calc). Allocate one column for each output connectorpin. Allocate one row for each possible mode. Label each cell with the input connector pin name. This gives you the states of the muxes/switches in each mode, and the needed switch/mux topology can (often easily) be derived from that.To post a nice table here, quote this message, and examine the code for the table below. Each table row is defined on a single row of text.Quote from: analogix on October 08, 2024, 06:56:36 pmJust think of it as a bigger MUX/switch IC split into physically separate parts. Each part gets the same selector/mode signals, and just provides additional channels; like those rotary switches where you can stack additional modules to the same axle, to get more poles.Consider this example:$$\begin{array}{l|ccc}~ & X & Y & Z \\\hline1 & A & B & ~ \\\hline2 & A & ~ & B \\\hline3 & ~ & A & B \\\end{array}$$In mode 1, we have X=A, Y=B, Z=not connected.In mode 2, we have X=A, Y=not connected, Z=B.In mode 3, we have X=not connected, Y=A, Z=B.It turns out that we only need four single-pole, single-throw (1:1) switches to implement the above. All I need to do, is expand the mode to four separate signals. 1 becomes 1010, 2 becomes 1100, and 3 becomes 0101. First signal controls X:A, second Y:A, third Y:B, and fourth Z:B switch/mux. The switches/muxes are in parallel, with A going to the first two switches, B to last two switches; X to first switch, Y to middle two switches, and Z to last switch.Given a three-pole slide switch (SP3T) with a single wiper and three or four pins, I'd need two pull-down resistors and two 74LVC1G45 chips to expand the slide state to those four signal lines. The wiper I'd connect to VCC, and the two outer non-wiper pins toUandVwith pull-down resistors to ground. Then, in the first state,U=1 andV=0; in the second,U=0 andV=0; and in the third,U=0 andV=1.The first of the four signals is 1, 1, 0 in the three states. That's justVinverted; one '1G45 chip.The second of the four signals is 0, 1, 1 in the three states. That's justUinverted; one '1G45 chip.The third of the four signals is 1, 0, 0 in the three states. That's justU. No chip needed.The fourth of the four signals is 0, 0, 1 in the three states. That's justV. No chip needed.So, this scheme I could implement with the slide switch, two pull-down resistors, two 74LVC1G45 chips (or one 74LVC2G14 dual inverter chip), and fourTI TS5A3167chips, for about 150 MHz bandwidth and 1Ω on-state resistance, assuming all signals are within 0V and VCC, with VCC between 1.7V and 5.5V (for LVC).Hopefully you can see how I worked it all out starting from the connection table.However,personallyI'd just use one of the cheap microcontrollers to do the mapping. That way you can ensure all switches are turned off before new ones are turned on; break-before-make, to ensure no shorts occur. (If above the two first switches are on at the same time, we end up shorting X and Y together.) You can get Padauk PFS154 in SOP-8 (1.27mm pitch) which costs less than ten cents in singles at LCSC, and is programmable in C using theFree PDKSDCC-based toolchain. Or, you could use a more powerful RISC-V CH32V203 MCU (GNU RISC-V toolchain) for 0.30€-0.40€, and maybe add indicator LEDs and other niceties. (Seethis onefor how simple they are to use.)

author: analogix
author_rank: Frequent Contributor
timestamp: October 09, 2024, 02:10:46 pm
content: Quote from: Nominal Animal on October 08, 2024, 09:10:29 pmYou're referring to the logiccontrolof the MUX chips here, right?I think that's an excellent idea because it'll likely mean that I can use a simpler (less poles) 3-way mechanical switch to set the video output modeThanks for taking the time to look into all of this and explaining it.I'll have to take some time to re-read it all to get a better understanding of many of these concepts which are new to me, but I'm slowly getting there I thinkRegarding the abundance of 8-channel 1:1 MUX options (I mentioned earlier) for the Atari DIN13 output; I did some more searching and it appears they're either very expensive, have a high switch resistance (Ron) or come in packages which are hard to hand-solderBut I've downloaded several datasheets, and can get back here with my findings when I'm done comparing.EDIT: it seems that Texas Instruments appears to have some suitable chips,such as these four 8-channel 1:1 MUXes.Anyway, I'll take some time to re-read what you've written, compare some datasheets and try to get the table you suggested writing done, then get back here with my findings.

author: analogix
author_rank: Frequent Contributor
timestamp: October 09, 2024, 09:11:07 pm
content: Quote from: Nominal Animal on October 08, 2024, 09:10:29 pmHoping I understood you correctly, here's a table I've made which shows which signal pin connects to where for each of the 3 modes:The blue row shows the Atari ST video signal pins (DIN13 connector).The green column shows the 3 modes.The signal names in all the other cell-boxes shows what connects to the Atari DIN13 video connector (empty cell-boxes means that nothing is connected in that mode).

author: Nominal Animal
author_rank: Super Contributor
timestamp: October 10, 2024, 04:00:56 am
content: Quote from: analogix on October 09, 2024, 02:10:46 pmYes, exactly.Quote from: analogix on October 09, 2024, 09:11:07 pmThat's for the Atari DIN13 outputs; please add the VGA outputs as additional columns too. Columns where the value is always the same aren't needed.(To be honest, I could've done it for you using the schematic you posted in the first message; but I'm sneaky, and want you tolearninstead of having an answer handed to you. I'm evil that way, sorry.)We do need to do the RGB-to-mono combination after the switch, so instead of a single mono, we'll need to treat it as MONO-R, MONO-G, and MONO-B.There are lots of suitable analog switches at Mouser, Digikey, LCSC, and JLCPCB assembly, and the prices aren't too bad either, something like 3€-4€ for thereallygood ones (with sub-ohm on-state resistance, hundreds of megahertz of bandwidth, and so on). I wouldn't bother looking at any specific ones before the needed configurations are known. Specifically, I do not think you need 8PST switches at all, more like 3P or 4P in ST, and DT with output enable/disable. Of course, having extra poles in a switch is okay, just connect their inputs to GND or VCC (depending on what the datasheet suggests); having multiples of the same IC is usually better than having different ICs, as long as the price difference isn't huge.

author: analogix
author_rank: Frequent Contributor
timestamp: October 10, 2024, 05:18:21 am
content: Quote from: Nominal Animal on October 10, 2024, 04:00:56 amHehe, no problemAlthough harder, I do appreciate actually learning this instead of just getting an answer, so just continue being sneakyBut I don't understand about the additional VGA outputs column you ask for, because that's already in the "VGA mono mode" and "VGA colour mode" sections.What I've done is create a table which shows all the connections of all three modes, but maybe that's not it?And why should I leave values that are the same out? Surely that's different from signal-pins thataren'tconnected, but again I have a feeling you're asking me to create a table which shows something slightly different from what I've done here.QuoteYou mean, something like this?

author: Nominal Animal
author_rank: Super Contributor
timestamp: October 10, 2024, 01:45:25 pm
content: Have you checked outubeswitch mk6?Quote from: analogix on October 10, 2024, 05:18:21 amHere's what I was hoping to see, based on your initial schematic:Code:║ Atari DIN13 Output ║ VGA Output │ (Mono) ║Mode ║ M │ D │ H │ V │ R │ G │ B ║ H │ V │ R │ G │ B │ r │ g │ b ║ Inputs:════════╬═══╪═══╪═══╪═══╪═══╪═══╪═══╬═══╪═══╪═══╪═══╪═══╪═══╪═══╪═══╣ M = DIN13 pin 11Atari ║ M │ D │ H │ V │ R │ G │ B ║ │ │ │ │ │ │ │ ║ D = DIN13 pin 4────────╫───┼───┼───┼───┼───┼───┼───╫───┼───┼───┼───┼───┼───┼───┼───╣ H = DIN13 pin 9VGAMono ║ │ │ │ │ │ │ ║ H │ V │ │ │ │ R │ G │ B ║ V = DIN13 pin 12────────╫───┼───┼───┼───┼───┼───┼───╫───┼───┼───┼───┼───┼───┼───┼───╣ R = DIN13 pin 7VGA ║ │ │ │ │ │ │ ║ H │ V │ R │ G │ B │ │ │ ║ G = DIN13 pin 6────────╨───┴───┴───┴───┴───┴───┴───╨───┴───┴───┴───┴───┴───┴───┴───╜ B = DIN13 pin 10This assumes that in Atari mode, VGA outputs are disabled; that in VGA modes, Atari output is disabled; and that Atari outputs RGB even in mono mode.According tothis post, Atari outputs only Mono signal in mono mode (not R, G, B signals), and theinputDIN13 pin 4 needs to grounded to enable Mono mode (floating otherwise):Code:Input D ║ Atari DIN13 Output ║ VGA Output ║Mode ║ ║ M │ D │ H │ V │ R │ G │ B ║ H │ V │ R │ G │ B ║ Inputs:════════╬═══╬═══╪═══╪═══╪═══╪═══╪═══╪═══╬═══╪═══╪═══╪═══╪═══╣ M = DIN13 pin 11Atari ║ ║ M │ D │ H │ V │ R │ G │ B ║ │ │ │ │ ║ D = DIN13 pin 4────────╫───╫───┼───┼───┼───┼───┼───┼───╫───┼───┼───┼───┼───╣ H = DIN13 pin 9VGAMono ║Gnd║ │ │ │ │ │ │ ║ H │ V │ M │ M │ M ║ V = DIN13 pin 12────────╫───╫───┼───┼───┼───┼───┼───┼───╫───┼───┼───┼───┼───╣ R = DIN13 pin 7VGA ║ ║ │ │ │ │ │ │ ║ H │ V │ R │ G │ B ║ G = DIN13 pin 6────────╨───╨───┴───┴───┴───┴───┴───┴───╨───┴───┴───┴───┴───╜ B = DIN13 pin 10instead, preferably with voltage divisors between M input and each of the VGA R, B, G outputs. (As there is already a 75Ω resistor in the STe on these, it is just a matter of adding suitable resistance, for example a 100Ω trimpot, to ground.)In order for those voltage divisors to not affect the signal when used, they need to be isolated on both sides, so the RGB selection needs three 3PST switches. The VGA sync signals only need a DPST. I'd use one of the SOT23 SPST or SPDT switches for grounding the input D pin in VGA mono mode.For the Atari mode, a 7PST (or say two 4PST) analog switch is needed.Also, consider whether you'd prefer to use two switches, selecting between Atari and VGA outputs; with a second one selecting between Mono and Color for the VGA only. Changing it while in Atari mode would not affect the input D pin; it would only be grounded in the VGA mode.You could also support both Atari and VGA outputs simultaneously. Attached is a rough sketch on how I might try to do it, using very cheap components from Mouser in TSSOP-14/16, omitting the logic (switch enable logic) and H/V sync signals, and assuming no adjustment is needed between the Atari and VGA RGB signal levels; if adjustment is needed, then the two sets of three 75Ω resistors must be adjusted as needed. U1 buffers the signals to the Atari output connector. U2 buffers the RGB signals for the VGA connector. U3 buffers the mono signal to RGB on the VGA connector. U4 selects between mono and color VGA output. All video signals are DC-coupled. The input impedance of THS7374 is about 800kΩ, and the on-state resistance of the TMUX1574 is typically 2Ω, maximum is 4.5Ω. And yes, one could replace one of the THS7374s with a TMUX1574, but the former are much cheaper than the latter. Gah, I had to edit this attachmentfourfive times!Mouser sells THS7374IPWR for about 0.35€ apiece in singles, and TMUX1574PWR for about 0.57€ in singles, so the BOM cost for U1-U4 is just 1.62€.Edited to add: For sync signals, two TS5A22364DGSR would do, which Mouser sells for about 0.78€ in singles. The rest is capacitors, resistors, and the digital logic to enable the desired ICs in different modes. If you used three SPDT switches – one to enable/disable the Atari output, one to enable/disable the VGA output, and one to select between mono and RGB for VGA output –, and a SP3T switch to control the Mono Detect the STe sees (per Atari output, Color, Mono), no logic chips would be needed.

author: Nominal Animal
author_rank: Super Contributor
timestamp: October 10, 2024, 05:24:07 pm
content: Attached is a more complete schematic. Still lacks the 5V supply, and the supply bypass capacitors for the ICs, plus the connectors. Suggested bypass capacitors are mentioned in the datasheets. IN_ refers to input Atari pins, ATARI_ to output Atari pins, and VGA_ to VGA connector pins. Blue net ports are analog signals, green ones are digital signals.Two SN74LVC1G97 multifunction logic gates are used to disable the video amplifiers when not needed, to save power.As the THS7374 input impedance is around 800kΩ, enabling/disabling an output should not visibly affect the other outputs.One NX138AKR N-channel MOSFET is used to detect the MONO_DETECT state on the Atariinputconnector, and invert it for use as VGA_MONO in autodetect mode. This is a cheap MOSFET, similar to BSS138, but slightly faster (lower gate capacitance). Any logic-level N-channel MOSFET will do, especially BSS138.At the bottom, you have two three-way toggle switches (SP3T), and two two-way toggle switches (SPDT).The first three-way toggle switch controls the Atari STe video mode.The next three-way toggle switch controls the VGA color/mono mode.The next two-way toggle switch controls the Atari output.The final two-way toggle switch controls the VGA output.If you want LEDs to indicate if an output is enabled, you connect the LED cathode to ATARI_DIS or VGA_DIS.To indicate Mono mode, use another NX138AKR with gate on IN_SELECT, source to GND, and drain to the LED cathode.To indicate Color mode, use another NX138AKR with gate on the top input pin of SW2, source to GND, and drain to the LED cathode.In both cases, connect the LED anode to a current-limiting resistor, and the resistor to +5V. Each LED needs their own current-limiting resistor.If you want LED currentI, and its voltage drop isVf, use a resistor value ofR=(5V -Vf) /I.Adjusting the 75Ω resistors (4+3+3) in the center of the schematic adjusts the corresponding signal voltage levels. I'm not sure if 75Ω is correct, because the video amplifiers do have a 3db amplification.If FILTER_ENA is connected to GND, the video signals are filtered by the amplifiers with a 9 MHz low-pass filter.If FILTER_ENA is connected to +5V, the amplifiers have about 150 MHz of bandwidth. I *think* FILTER_ENA should always be connected to +5V with these amplifiers. And yes, I should have named it FILTER_BYPASS or FILTER_DIS(able).Do not trust this schematic as-is, since even I wouldn't. But it should show you an interesting approach to solving your problem, I hope.

author: analogix
author_rank: Frequent Contributor
timestamp: October 13, 2024, 09:06:50 pm
content: Quote from: Nominal Animal on October 10, 2024, 01:45:25 pmAbsolutely!In the Atari online community (which is still active) there's for a long time been DIY solutions for VGA adapter cables (one type for each video mode) and "multisync" switchboxes. I built and used such a switchbox back when I had an NEC Multisync II (which was capable of displaying both video modes) connected to my Atari STe.The Ubeswitch is (as far as I can tell from the schematics) the same thing as the multisync switchbox, but with a MUX instead of the large switch along with a more practical design (it plugs directly into the DIN13 output and has an HD15 plug on the same PCB -someone has also designed a 3D-printable plastic enclosure for it).Version 6 (which you linked to above) has some built in logic/memory (ATtiny25) which is a little outside my understanding, but as far as I can tell it relies on a single momentary pushbutton which is used to change the video mode, controlling the MUX and has the ability to store the last used setting in its flash memory. Basically a VGA multisync adapter with memory for the switch setting.So.... after having learnt a lot of new things from you, BrianHG and others in this thread along with studying many schematics and datasheets I believe I have a general idea on how to work out a solution:Explanation of the above:Basically I'm thinking of twoseparate"zones" (VGA output and the new Atari output) isolated from each other by switching off the opposite zone's MUX (using the EN pin) so they don't interfere with each other."Atari zone" just passes all the 13 signals along to the new DIN13 connector. The job of its MUX is only to pass through or stop all signals at once."VGA zone" will basically be the same thing as a Ubeswitch, but with some minor (but important) differences.The actual Ubeswitch has a 2-way MUX but with only 4 channels. But with the added Atari DIN13 output I need to separate all the shared signals, so I'm counting 7 signals which both zones use, but that I don't want to be active in both zones at once.Therefore, as I see it, the VGA zone also needs a 7-channel MUX in order to break those signals from reaching the new Atari DIN13.Moving on to a more detailed explanation....As posted before, here's a diagram showing my proposal with two 7-channel MUXes (the "VGA zone" one having two-way switches and the "Atari zone" MUX just needing one-way switches).As for switching modes, I'm thinking back to what you suggested about using one/several logic chips and that this could let me get away with perhaps just asingle pole3-way switch. Obviously I need to know how many different logic outputs are needed for the MUXes, and if they're high or low, and that's something I intend to do in a table, but after we've decided on which MUXes to use as the don't appear to have a common standard.Finally, here's the same principle as above but with multiple 4-channel MUXes (as you suggested earlier, based on the difficulty in finding larger MUXes). I believe the following parallel connections to the SEL (select) and EN (enable) pins will work to control several MUXes at once in the same way (i.e. two 4-channel muxes will behave like 8-channels).QuoteThat sounds right, though I don't know about the last part(Atari outputs RGB even in mono mode).Even so, those R,G and B signals are disconnected from the HD-15 connector in mono mode.QuoteYes, pin 4 (monochrome detect) determines the video mode which the computer boots/reboots into.When an Atari monochrome monitor (typically Atari SM-124, SM-125 or SM-144) is attached, then pin 4 and pin 13 (GND) are connected together (internally, inside the monitor), making the computer boot (or reboot if the monitor's cable is attached after the computer has already been powered on) into monochrome high resolution (640x400) mode.With a VGA monitor on the other hand there's no such 'automatic' action, so we have to force pin 4 to GND in order to set it to monochrome mode. I admit I don't know much more about how this all works in detail, but suffice to be able to choose between Atari ST colour and mono modes then pin 4 is the key to this.QuoteI prefer a single 3-way slide switch for this (Atari/VGA mono/VGA colour).QuoteThanks for taking the time create those! I've taken a look and read through what you've written but need a little more time to process and understand it all.Please excuse my ignorance, but is this a just a different way to do it compared to the diagrams I've enclosed in this posting, or will the ones in my diagrams not work properly and I need to look into another way, such as your idea in the schematics?

author: Nominal Animal
author_rank: Super Contributor
timestamp: October 14, 2024, 07:40:28 am
content: It would be easier to read your diagrams if you used the actual signals instead of broad strokes –– it's annoyingly vague, really! ––, and perhaps SPDT switches for illustration; similar to the schematic in the first image.See attached, with switching units just marked with the switch type, and numbered on top left corner for reference. Switch 2, the SPST, should probably be an amplifier, and/or followed by an amplifier (so splitting switch 1 into 3PST and a video amplifier with enable/disable). I've omitted the logic control, grounds and VCCs, for simplicity too.Quote from: analogix on October 13, 2024, 09:06:50 pmIn essence, THS7374IPWR can be used as a 3PST or 4PST switch, but as it is an amplifier with high (800kΩ) input impedance, you need to terminate the incoming RGB and Mono signals via 75Ω resistors to ground, and use 75Ω resistors on the outputs. If one or more of the channels is unused, both the input and the output of that channel are connected to ground.If we ensure at most one of the two THS7374IPWR's connected to the VGA output is enabled at any given time, then we can omit the TMUX1574, and just join the respective channels of the two THS7374IPWR's before the 75Ω resistors, and the resistors connected in series to the VGA RGB pins.As Mouser sells THS7374IPWR for 0.34€ in singles, those are an easy way of handling the video part of the multiplexing. You just need some careful logic control of the DISABLE pins on them.Edited to add: As THS73741IPWRs are amplifiers and not just switches, it means the "downstream" stuff won't affect the signal source. That is why one could use both the Atari and the VGA output at the same time, as long as one uses non-inverting buffers for Hsync and Vsync also; say, a pair of 74AHC2G241 (one pair suffices for both the Atari and the VGA output, because one half of the chip uses active-low and the other half active-high enable).The three THS7374IPWR take care of switches 1, 2, 5, 6 in the attached diagram.Switches 3 and 7 are two digital DPST switches or buffers for the horizontal and vertical sync, one for VGA output and the other for Atari output. The maximum frequency is less than 20 kHz, so both are within audio range. Easiest would be one TC7WB66CFK and one TC7WB67CFK, as they are the same chip except one uses enable low and the other enable high, so a single signal would choose between the two. I think I'd prefer 74AHC2G241 buffers, though.Switch 4 is also digital (forgot to mark it, darnit!), and one or two 74LVC1G66 or 74LVC1G384 should work well for it. One connects the input Select to output Select, and the other connects the input Select to Ground. In Atari output mode, the first is enabled. In VGA mono mode, the second is enabled. In VGA color mode, neither is enabled.Now, as to how this correlates to your diagrams: I can't parse your diagrams well enough to say; sorry. I'm sure to you they are obvious, but I just cannot tell exactly what I'm seeing.As to the three-position slider switch: Doable, sure. It will only need to pass enough current for enable signals (less than a milliamp), and you'll need some logic chips to implement the three states. Only needs a couple of the multifunction logic gates. I haven't worked out the logic map for a three-position slider switch, but it won't be more than two or three of the little buggers.All in all, I'd say you should easily get the IC cost down to 5€ or so. The connectors will be the most expensive part, I reckon.Acompletely differentapproach would be connect a fast MCU directly to the video shifter (R0-3, G0-3, B0-3, Mono) plus Hsync and Vsync via two SN74LVC8T245 level shifters (from 5V to 3.3V or lower that the MCU needs), and generate pixel-perfect VGA or DVI/HDMI video in standard resolutions.This Github repoindicates an RP2040 should be able to do it; perhaps usingAdafruit Feather RP2040 with DVI(details). Note that you can use a DVI-D to HDMI cable to connect this to any HDMI monitor or TV.

author: analogix
author_rank: Frequent Contributor
timestamp: October 14, 2024, 06:12:26 pm
content: Quote from: Nominal Animal on October 14, 2024, 07:40:28 amYes, I understand what you mean. Sorry about that.I'll make a more detailed diagram to illustrate what I'm thinking, then take it from there.

author: Nominal Animal
author_rank: Super Contributor
timestamp: October 15, 2024, 10:50:57 am
content: Thanks! And don't take it as negative; I'm just blunt with no social skills, that's all.And others, please don't let me hog the thread. I'm just a hobbyist myself, with some interest in generating video with microcontrollers (albeit mostly to small IPS panels fromEastRising/BuyDisplay): I'd like to find out a way to add small status displays to gadgets like routers and NASes that describe their status intuitively to non-technical users without having any way of said users accidentally disabling the device via that UI.

author: analogix
author_rank: Frequent Contributor
timestamp: October 15, 2024, 04:23:19 pm
content: No problemI'm currently busy drawing a proper schematic and will post here when done.EDIT: OK, done! Here it is (attached)In the schematic I've used four TS5V330PWR MUX chips, as used in the Ubeswitch. The VGA part is based on the Ubeswitch version 5.I have ideas for other, better MUX chips including the ones you've suggested earlier, but for the schematic it illustrates my general idea.I haven't included the resistors (as I have some undecided thoughts/ideas on that), and likewise there are some improvements to the signal which I'm thinking might be useful to add, but this schematic is the general idea.Each "zone" (VGA zone, Atari zone) contains two MUX chips, giving a total of 8 channels. The logic control pins (EN and SEL) for each pair are connected together for the same behaviour, so in essence each pair should act like a single 8-channel, 2-way MUX.I haven't drawn the actual logic controls, but we've discussed that earlier and it will be based on a physical/mechanical 3-way slide-switch which in turn controls some logic chips (which is a bit over my head at the moment, so I don't have that part worked out yet), but as I understand it can be set up to give the correct combination of logic signals for both zones' MUX chips.As for the actual logic signals needed: I don't have that worked out yet as different MUX chips appear to use different combinations of those, but to summarize, this is what I want those signals to do in each mode:Atari mode:enable Atari-MUX (U1 and U11) while disabling the VGA-MUX (U2 and U22)VGA mono mode:disable Atari-MUX (U1 and U11) while enabling the VGA-MUX (U2 and U22). SEL (select) for the VGA-MUX is set for group 2 switchesVGA colour mode:disable Atari-MUX (U1 and U11) while enabling the VGA-MUX (U2 and U22) -same as for VGA-mono mode. SEL (select) for the VGA-MUX is set for group 1 switches

author: Nominal Animal
author_rank: Super Contributor
timestamp: October 17, 2024, 02:20:56 pm
content: Thanks! Yes, I do believe we are in full agreement.I do believe your schematic can be implemented using THS7374IPWR amplifiers (Mouser 0.34€ apiece, JLCPCB/LCSC part C2652746, at JLCPCB for assembly at 0.38€ apiece), some 75Ω resistors (since amplifiers need inputs to be terminated for good signal quality; and as these have gain 2, they also need an outgoing 75Ω resistor to limit the signal level; adjusting these resistors adjusts also the signal voltage levels), and two '2G241 switches for the sync signals, say TI SN74LVC2G241DCUR (Mouser 0.47€ apiece, LCSC part C10430, at JLCPCB for assembly at 0.31€ apiece).The amplifiers take logic low (GND) for enable, high for disable, and the '2G241 have one of both, so the slide switch can connect the wiper to ground, with some very weak pull-ups, say 10kΩ or more, since the enable signals only draw microamps.I do believe (but have not verified) that the attached schematic would work. The BOM cost is around 6€ or so, including the connectors, so not expensive at all. No BGA or QFN packages; the trickiest to solder are the 0.65mm pitch U1-U5, but everything should be hand-solderable with flux (and braid to suck up any solder bridges if you use too much solder). I would definitely use a four-layer board, and solder the components myself.(By the way, I looked at the Atari STe video timings, and noticed that for NTSC, the medium and low modes fit pretty neatly within standard VGA 640×480 60Hz mode if scanline-doubled. Essentially, you need a tiny FPGA that has 24000 bits or more of embedded RAM, and can run at 24+ MHz (25,196,800 Hz would be optimal), connected to 12 of the shifter RGB pins plus Hsync and Vsync pins, and the same for outputs, with resistor dividers and a THS7374 amplifier for the video output, and a '2G241 for the sync signals). In very real sense, it would be a simple double-buffered shift register, and only add one or two scan line latency, or about 0.1ms to 0.2ms, to the video output.)

author: BrianHG
author_rank: Super Contributor
timestamp: October 17, 2024, 04:45:35 pm
content: Warning on the VGA HD15 video output plug. Some modern monitors look for the 5v signal as a key to sense if they should be in sleep mode, or when to auto power up...See pin 9 in attached image.I would just feed 5v through a 100 ohm resistor into this pin. The 100ohm resistor is to prevent shorting out your circuit in case of a problem.Also pay attention to all the other GNDs.

author: Nominal Animal
author_rank: Super Contributor
timestamp: October 18, 2024, 07:44:51 am
content: Thanks, BrianHG!In case anyone is interested, the above schematic I cobbled together –– I even used net flags instead of wires–– is available athttps://oshwlab.com/nominalanimal/atari-ste-video-switch, and is dedicated toPublic Domain per CC0 1.0 Universal. I added the 5V supply through a 100Ω resistor to VGA pin 9 as BrianHG suggested, and included three LEDs (about 3mA at 2.0V forward voltage, when using 1kΩ current-limiting resistors) to indicate the currently selected mode.You can open the schematic in EasyEDA online editor using theOpen in Editorlink on the right edge under the schematic itself, making it easy to create a PCB design, and order it from JLCPCB. Although JLCPCB should have the important components available for assembly –– check the capacitors and resistors, and pick the size and model you prefer ––, I would recommend creating a four-layer board, and soldering the components to it yourself. Don't forget to add 2.5mm (M2.5 or #2-56) or 3mm (M3 or #4-40) mounting holes for your PCB, with good clearance for the screw heads, for ease of mounting.Beware: It is not tested, nor verified! The schematic was created to illustrate the idea of using cheap video amplifiers as analog switches and digital buffers/switches for sync signals, all controlled by a SP3T switch. (I'd use a toggle switch instead of a slide switch myself; maybe even use a four-pin connector on the PCB for the switch, because it is the most likely thing one may wish to change.) Because the amplifiers have active-low enable signals, and the buffers both active-low and active-high enable signals, having the enabled output low and all others high suffice; we do not even need any logic gates here!Although I'm pretty sure the logic is correct, I haven't really verified it, and I do not really trust it is correct. So use at your own risk, please! Or, best of all, take the ideas in it, and create your own, an even better one!

author: analogix
author_rank: Frequent Contributor
timestamp: October 18, 2024, 12:17:44 pm
content: Quote from: Nominal Animal on October 17, 2024, 02:20:56 pmExcellent!And thanks for taking the time to create your schematic and making it available at OSHWlabI'd like to study and understand it better (I've had a few quick looks already), but for now, to simplify things, I prefer sorting out the details of my own schematic which I already understand the basics of and am more familiar with. Hope you don't mindFirst, choosing suitable MUX chips.The MAX4885 is now out of the questions because of it's physical design (hard to hand-solder).There's theTS5V330(4-channel, 2-way) which is proven to work with the Atari ST video signal as it's the one used in the Ubeswitch.On the other hand, theTS5V522C(5-channel, 2-way MUX) seems very similar, but has an additional channel and built in H-sync and V-sync buffering. Like the TS5V330 it also runs on 5V and has a switch resistance of 3 Ohms. Both are marketed for video applications.So, regardless of either I'd need two of these for each output (7 channels need to be switched), totalling 4 chips.For the Atari output I only need 1-way switches (which will be permanently on) and using the SEL input to shut on or off the entire chip, so I've looked at 8-channel chips for this:MAX4781(8-channel, 1-way) has a very low switch resistance (0.7 Ohms), is available in TSSOP but is expensive (almost US$ 7), runs at 3V instead of 5V and the datasheet doesn't say anything about video applications, so I'm not sure if it's suitable.Will a switch resistance of 0.7 vs. 3 Ohms make a visible difference, justifying the much higher cost of this MUX, or is it just a waste of money as it'll be just the same in real life use?Other 8-channel, 1-way MUXes, but that are much cheaper (similar to TS5V522C or TS5V330C) are:SN74CBT3244CPW,SN74CBT3245CPWRandSN74CBT6845CPWR.They all have 3 Ohm switch resistances, can be hand-soldered and run at 5V, but perhaps there's no advantage of using a single one of these over two of the ones I suggested first?PS: I know you've suggested the THS7374IPWR, but this isn't a MUX, is it? The datasheet says "video amplifier", but at the same time it appears to have the ability to shut off the signal flow (with the DISABLE and/or BYPASS pins), so in essence it'll work in the same way as I want to set up my Atari-side MUX where I just "let all 7 signals through" or "stop all 7 signals"? I couldn't find the switch resistance other than perhaps "Output impedance: 0.7 Ohms" -is this it?I have some other questions about the resistors, grounding etc. but this for now.

author: analogix
author_rank: Frequent Contributor
timestamp: October 18, 2024, 12:36:23 pm
content: Quote from: BrianHG on October 17, 2024, 04:45:35 pmThanks. I wasn't aware of this signal and have added it to my schematic as you suggested.Will a modern monitor possibly fall into sleep if +5V isn't supplied to that pin?I tried to find out more and came acrossthis threadwhere several people warn against using it.And if I understand correctly, someone also pointed out that pins 12 and 15 (data and clock) are needed for Plug 'n play, which I suspect is part of this. Since this isn't even a PC, and with the risks involved, would it be just as good to leave it out altogether? Alternatively I could make provisions for it, but leave out the 100 Ohm resistor when assembling the board (effectively disconnecting pin 9 from +5V), but allowing the possibility if someone else wants to use my design and finds out they need it.QuoteI was wondering about the grounding -if I should connect all GND together or not. And if I'm going to rely on external power (+5V directly from the computer's power supply) and not a 12V to 5V regulator (fed from the +12V pin from the Atari video output connector) I'm wondering if I should leave out the GND wire between the power supply's GND and this VGA output PCB (because there's already a GND connection from the video output connector to my VGA board, and I'm thinking it might cause a ground-loop).Thoughts on that?

author: Nominal Animal
author_rank: Super Contributor
timestamp: October 18, 2024, 03:06:06 pm
content: Quote from: analogix on October 18, 2024, 12:17:44 pmThe one issue I see is the impedance on the monochrome video signal when converting to VGA.On the display end, these should have a transmission line with 75Ω impedance. If we look at e.g.this STe video schematic, it looks to be closer to 27Ω (Q403, a 2N3904 NPN transistor is used as the signal driver in emitter follower configuration, with R438 setting the source impedance). It is pretty close, though, so it might just work, but personally I'd prefer using a video amplifier to ensure good signal drive. (The THS7374 are designed to be able to drive two parallel outputs, so they have ample strength.)Without the monochrome signal or mixing, the 5-channel switches (for RGB signals only) would be perfect.A secondary issue is that the sync signals are not really split into three, but only into two; and the Mode Select is a digital open collector signal that is connected to either the Atari connector, to ground, or left floating. They are TTL digital signals between 0V and 5V. (The high-frequency video signals should be between 0V and 0.7V or so.)So, counting "7 per output" is pessimistic, doing it the hard way; using separate switches to do the exact same thing. If you count my schematic, I have 12 analog switches (10 video amplifier channels, 2 one-channel TS5A3159 for Select signal), and four digital switches (for hsync and vsync signals), or 16 in total. It's only three quarters of 3×7=21.Quote from: analogix on October 18, 2024, 12:17:44 pmWhy do you believe using a single IC for switching the entire set of signals is better than two or more ICs?Even routing is more difficult with just one single IC, because the signal order is all different in the VGA vs. the 13-pin DIN connectors. If you have the switches in separate ICs, routing the signals is easier. Plus, you can then route the analog video signals separately, perhaps even using width and distance to surrounding ground traces to get an input impedance close to 75/27 ohms on the RGBM signals, for best video quality.Really, I see only downsides in stuffing both the analog and the digital signals into the same IC. For one, the analog video signals are just 0-1V or so, while the sync signals are 0V-5V TTL.Quote from: analogix on October 18, 2024, 12:17:44 pmI believe any analog switch will have worse visual quality than the THS7374 video amplifiers.Will it be actually discernible, visible, in real life use? I don't know; I don't have enough practical experience. I did have a Commodore C128 way back in the day, and even a NEC Multisync 2a 14" (my first Intel compatible was a '286 with an ATi EGA Wonder), so I know what you worry about. It is also why I'd be more interested in picking up the video signal digitally at the video shifter, and producing a genuine VGA-compatible video signal in all modes.. one could experiment with it using e.g. OlimexiCE40HX1K-EVB,iCE40-DIOfor interfacing to the shifter 5V logic, andiCE40-IOfor the VGA output. NTSC or 60 Hz Atari STe is much easier, because scan doubling the color modes will bring it within a fraction of a percent of standard VGA timings (although video aspect ratio might be wonky). PAL 50 Hz color modes will need every second frame doubled, to get to 75 Hz that most displays accept. For NTSC/60 Hz Atari STe, DVI/HDMI output should be possible with justAdafruit Feather RP2040 DVIand level shifters (two '8T245 or one 16T245); if the video shifter can be desoldered and put on a socket, one could do a removable interposer PCB with pixel-perfect TFT-compatible DVI/HDMI output.)Quote from: analogix on October 18, 2024, 12:17:44 pmNo. Consider it as something that takes the original signal, and then retransmits it. You set the output impedance via series resistors; R5-R8, R9-R11, R12-R14 in my schematic. Its input impedance is very high (800kOhm for THS7374), which is why the input signals must be terminated to ground. (In fact, I need to adjust R4 in my schematic, because the proper termination for the monochrome signal is about 27 ohms and not 75.)Analog muxes and switches act like a load on the signal, whereas these video amplifiers, well, buffer it. For amplifiers, what matters is their frequency response. The worst case Atari video signal is monochrome with every other pixel black, every other white. The fundamental frequency of that is about 14.3 MHz, but "perfect" reproduction would be a rectangular signal; something like 10 times the fundamental frequency in signal bandwidth is generally considered sufficient to represent even non-sinusoidal signals. Thus, to reproduce your video signal "perfectly", we might need up to 143 MHz of analog signal bandwidth. The THS7374, in bypass mode as in my schematic, have 150 MHz of bandwidth, so they should be able to reproduce the video signals the Atari generates. As no amplifier is perfect, we also need to look at distortion, crosstalk, signal to noise ratio, power supply rejection ratio, which are all comfortably low for THS7374; considering that 42dB corresponds to 8-bit dynamic range.(When the THS7374 is "off", it has about 20kOhm input impedance. Since the input has those 75 Ohm resistors to ground, that added 20k in parallel decreases the termination by 0.28 Ohms, or by about 0.37%. When you use three THS7374's in parallel as in my schematic, there are always two off in parallel, so the effective termination resistance (assuming no resistance in PCB traces and perfectly accurate resistors) is about 74.44 Ohms. This varies only by the amount of variation between different THS7374 IC's, and is neglible in my opinion.)I wish I could explain this better... or that some of the more experienced members would step in and explain it better than I can!

author: BrianHG
author_rank: Super Contributor
timestamp: October 18, 2024, 08:18:08 pm
content: Quote from: analogix on October 18, 2024, 12:36:23 pmWith a current limiting 100ohm series resistor, it is safe even if you accidentally short the pin to GND on the other side. (A short would draw 50ma)Don't worry about the DDC pins. Ignore them. If you were making a PC graphics card, you would read these to see which video modes/scan rates the monitor can support. The 5v was originally intended to power a small I2C prom inside the monitor. However, during the more modern LCD days, sometimes a few monitor brands have also used it as a sense for a 'deep sleep' power down mode. Other monitors still rely on having some of their circuitry powered up to sense activity on the sync lines.

author: analogix
author_rank: Frequent Contributor
timestamp: October 18, 2024, 08:50:48 pm
content: Quote from: Nominal Animal on October 18, 2024, 03:06:06 pmWill the TS5V522 behave differently on this than the TS5V330?Looking at the Uberswitch schematics, all signals except H-sync and V-sync pass through the TS5V330 switches, and from what I've read in various Atari forums people seem very happy with the Uberswitch VGA adapter:QuoteHow about using the TS5V522 (or TS5V330) for those signals, and a different model MUX for the rest?QuoteStuck in old thinking I guess, and looking into all possibilities, but also considering the physical size as Eagle (free version) has board size limitations.Then again I'm probably making a bigger issue of this than needed since these parts are quite small already, and there aren't really that many components in all.QuoteAh! I hadn't thought of that. Good point!QuoteAha! This was something I was wondering about (but afraid to ask)...So R,G,B and monochrome are analog while the two sync lines are digital?How about mono-detect?QuoteNothing wrong with your explanations. In fact they're very detailed and well worded!But I have to plea ignorance on a lot of these concepts, struggling to follow and trying to learn as we go along. I admit not having a fundemental understanding of how your schematic works -if it's similar to mine, or does things a totally different way.I do understand bits and pieces, but not the overall circuit idea, so please bear with my newbie questions.But one step at a time and I'll get there eventually

author: analogix
author_rank: Frequent Contributor
timestamp: October 18, 2024, 10:28:48 pm
content: Quote from: BrianHG on October 18, 2024, 08:18:08 pmSo nothing to worry about, and every reason to keep it attached (through a 100 Ohm resistor)?(unlike the poster in that forum who wrote"There's no known benefit for the presence of pin 9". He blew up several GND traces in his expensive computer due to +5V coming from pin 9 in the monitor and pin 9 in the computer connected to GND, and there was no current limiting resistor for some reason.By the way, here's an update to my schematic.It now contains 75 Ohm resistors for the R,G, B lines as well as trimmers for the monochrome R, G and B lines so that a colour tint can be adjusted (the normal Atari ST high resolution monochrome output is a paper-white background, but here it can adjusted to old-school green or whatever). I'm unsure of the trimmer values because like with the colour signals I assume the levels should be lowered here as well.I've also added a power connector and jumper for choosing the +12V power pin from the video output connector to power up the 78L05 regulator, or +5V directly from the computer's power supply. There's also a jumper for disconnecting the +12V line to the regulator so it doesn't draw any power at all.Finally there's a power connector for outputting audio and composite video.Any obvious mistakes so far?

author: Nominal Animal
author_rank: Super Contributor
timestamp: October 19, 2024, 11:15:57 am
content: Quote from: analogix on October 18, 2024, 08:50:48 pmNo, you're right, and my worry misplaced: it will work. I forgot about the Ubeswitch!Quote from: analogix on October 18, 2024, 08:50:48 pmThat's why I asked. If you make a four-layer board so that you can do signal-GND-signal-GND stack for the analog video signals, with track width and spacing calculated to give about 75Ω impedance for R, G, B and about 27Ω for monochrome –– track width and spacing then being the same on the two signal layers ––, the needed crossings won't be a problem, and I think I'd target the 100mm × 80mm PCB size, although a much smaller one should definitely suffice. With separate SMD muxes/switches/amplifiers, the layer pair opposite the switch can be used to "jump" the signal order nicely, which makes it so much easier to route these signals with separate switches than single large switches. Try it, and you'll see what I mean. (If the track width and spacing to surrounding GND is suitable, then having the track "extra long" is not an issue at all. At 140 MHz, the wavelength in copper is about 1.4 meters, so a few centimeters difference in track lengths will not affect the video signals at all.(KiCad calculator says: If you use 0.203mm or 10mil wide traces, with 0.708mm or about 28mil distance to a ground guard trace on the same plane, with ground plane under both on the next plane –– on planes 1,2 or 3,4, but on planes 2 and 3 because the core is in between and is thicker), you get a coplanar wave guide with pretty much exactly 75Ω impedance. For the monochrome video signal, 0.914mm or about 36mil wide trace with 0.6mm or about 24mil distance to ground guard trace will give you pretty much exactly 27Ω impedance. While these do depend on the stackup, and you should check these values against the PCB stackup you do, they are a good starting point.)I particularly like Hammond cast-aluminium enclosures, and would target1590BBfor this. The maximum inner volume is 110mm × 84mm × 34mm, but with 5mm × 5mm cut-outs at each of the four corners. (Basically, 100mm × 84mm × 34mm maximum inner volume.) I like the plain cast aluminium ones, and sanding the surface with 400 grit for a very nice brushed effect, but these are also available in various colors. The connectors I would put on one long edge, first drilling round holes, and then filing them to right shape by hand. For cast aluminium, you can use woodworking files, but metal files give you a better finish. Needle files are good for finishing touches, but not for shaping the holes; it'd take too long. A rotary hand tool like Dremel with burr bits do short work of the hole shaping, but do wear eye protection. For me, the preferred shape would have the switch (a lever one) on the opposite long edge, with the indicator LEDs poking through. That way I could stack it.I believe I would connect the enclosure to the ground, but would verify with other members here first. My thinking is that since the ground is common to all connectors, and we do not have any external power sources, it is the best option wrt. shielding and ESD. I suspect sprinkling ESD diodes for the signal lines for all four connectors might be a good idea, too, but it is not something I'm at all familiar with.Quote from: analogix on October 18, 2024, 08:50:48 pmRight!R, G, B and monochrome are analog, with signal voltage varying between 0V and 1V (1 Vpp, or one volt peak-to-peak). The impedance to ground of these signals is 75Ω for R, G, B, and 27Ω for monochrome.Hsync and Vsync are 5V TTL digital signals, maximum frequency only about 36 kHz (Hsync at mono). When the voltage is between 0V and 0.8V, it is logic low; anything above 2V is logic high. Sync polarity does not refer to voltage polarity, but to whether the signal idles low and pulses high (positive polarity), or idles high and pulses low (negative polarity). Basically, any TTL logic ICs can handle these.Mono detect, or Select, is an open collector input, pulled to 5V using a 4.7k resistor (R472) within the Atari STe. It controls the74S257Ndigital selector (U405), with 5V TTL logic. It is basically DC, as any edge on it causes the STe to reset. You only need to connect it to the Atari STe output, let it flap in the wind for VGA color, and connect it to ground (directly) for VGA mono. Again, any 5V TTL logic mux/switch/buffer will work for this. If you use an analog or digital switch for this, something like 60Ω to 100Ω on-state resistance is not a problem, because it will simply be in series with the 4.7k pull-up resistor.I selected the components for my schematic by looking at Mouser catalog, sorting options cheapest first, and then rejecting any that I wouldn't want to hand-solder. (I avoid QFN and don't do BGA yet, myself, even though I have a tiny hot plate and hot air; need to do some practice boards first.)Quote from: analogix on October 18, 2024, 08:50:48 pmNo, all this stuff could be explained much more concisely by other members here. I read and write fast, but spend quite a lot of effort in trying to find a good wording, so it oftenappearsI'm more knowledgeable than I am. Plus, I'm overly verbose: my posts are too long for many to read.Quote from: analogix on October 18, 2024, 08:50:48 pmEven though it makes this post yet another wall of text, let me walk you through. Here is the schematic in scalable vector form, so you can open it in another browser window, and zoom in without it becoming blurry:(Click to embiggen; CC0-1.0 / Public Domain)Note: Blue indicates analog video signals (0V - 1V); green digital 5V TTL signals; and cyan analog/digital signals connected directly between the two 13-pin DIN connectors (and composite video female RCA connector).On the left, CN1 is the input Atari 13-pin DIN connector. Because this uses amplifiers with high input impedance, we need to terminate the input signals with resistors to ground. The exact reasons for this go intotransmission linemodel, but as hobbyists, all we need to know is that this way any signal distortion and such is minimised. In general terms, this schematic is a retransmitter between two different transmission lines.If we used only multiplexers and switches, our circuit would be part of a single transmission line, and minimizing its impedance would minimize the effect on the transmitted signals. In the displays, there are 75Ω resistors to ground (for R, G, B; 27Ω to ground for the monochrome video signal), and any added resistance on the analog video signals acts like a voltage divider, reducing the voltage amplitude at the display end. For example, a 3Ω switch will cause a gain of 75Ω/(75Ω+3Ω) ≃ 0.96, or voltage swing reduction by 4%. It might slightly reduce the default brightness, but should still be well within normal adjustment range.Similarly, the resistors R5-R8, R9-R11, R12-R14 are the transmitter series resistors that need to match the expected transmission line impedance. I'm not exactly sure about monochrome video (R8, ATARI_MONO); Ithinkit should be 27Ω, since that is what Atari STe video output circuit has too.U1, U2, U3 are the video amplifiers. They have high input impedance, and low output impedance, like most amplifiers. Essentially, whatever happens downstream from the amplifier (to the right of the amplifier), will not affect upstream (to the left of the amplifier). The BYPASS pins are connected to the 5V supply voltage to use the full 150 MHz signal bandwidth, and the 100nF supply bypass capacitor makes sure the amplifier has local "charge reservoir". As Dave showed in one EEVblog video, these supply bypass capacitors may not be always needed, but having them there ensures ICs work better; even the pros tend to experiment and measure in practice to see what they can get away with, so for us hobbyists, it makes sense to just use them even if not strictly necessary.Considering the input terminator resistors and the transmitter series resistors, each video amplifier works like an analog switch, except with minimal load or effect on the input signal. When enabled, the amplifier looks like a 800kΩ resistor to ground to the source for its inputs, as if it was in parallel with the input terminator resistors –– thus affecting that termination by 0.008Ω or so. When disabled, the amplifier looks like a 20kΩ resistor to ground to the source of its inputs, thus affecting the 75Ω input termination by about 0.28Ω or so. Note that this is on the "ground leg" of the effective voltage divisor, and soincreasesrather than decreases the voltage swing.(Amplifiers aren't perfect, and they add noise and have limited bandwidth. In this case, we know we need less than 140 MHz of bandwidth. THS7374 with bypass enabled have 150 MHz, and less noise and better supply noise rejection than can be resolved using 8 bits, according to the datasheet. Without testing them with the actual video source, to me those numbers are sufficient –– if one trusts them! –– toassumeit should work well, because I know I've been very happy with 8-bit analog VGA signals using 17" multisync monitor at 1024×768 85Hz using #9 GXE and Matrox G200 video cards, doing actual paid Adobe Photoshop work just before the turn of the millenium. Mac would have been more suitable, but I was mostly running Linux (with the G200), and only used Windows for paid Photoshop and Macromedia Director work.)U6 and U7, TS5A3159 analog switches, were just a cheap option to connect the Mono detect AKA Select line to the DIN-13 output, ground, or not connect it to anywhere at all. (Again, this is an open collector output, pulled to +5V through a 4.7kΩ resistor.) I picked these only because Mouser sells them for 0.33€ apiece in lots of ten, and as SPDT switch in SOT23-6, they are easy to use here. There are literally hundreds of options here, and I just picked a cheap and easy way! Well, I was also swayed because I think those switches could come in handy for other circuits as well.U4 and U5 are the buffer/selector/mux chips for the sync signals. Note that because we only have two connectors, two pairs of sync signals, we only need two of these. In fact, we only need a single DPDT (two signals) switch, if we use /ATARI as the selector. That way, the sync signals are connected to the output DIN-13 when Atari output is selected, and to the VGA connector in the other two modes.Why 74LVC2G241? I admit, I was lazy.A 74AHCT2G125 and a 74AHCT2G126 would be a better choice here (74AHCT2G125DP,125and74AHCT2G126DC,125from Mouser): a TTL-level dual SPST switch with active-low/active-high enable. As these are digital buffers/drivers, they act like amplifiers in that the input is not affected by whatever happens on the outputs; just for digital signals. Could we use say TS5A3159 instead? Yes, we could.The slide switch connects one of /ATARI, /VGACOLOR, and /VGAMONO to ground. (The / at the beginning, the overline over the name, and a hash mark at the end, are all different ways to note the same thing: that this signal is active-low.) The 10k resistors R15, R16, R17 pull them to +5V when not selected. (When selected, there will be about 5V/10000Ω = 0.0005A = 0.5mA "wasted" in the resistor, turning 2.5mW or 1/400th of a watt into waste heat.)The indicator LED current will flow through the current-limiting resistor, and the switch, to ground. I wondered whether to use the other side of the two-pole three-throw switch, but this way, if the active-low enable line loses connection to ground, the LED won't light either; and 3-4mA at 5V should not be a problem even for a lightweight or small switch. The ICs only draw a small fraction of a milliamp each.The extra 100nF capacitor before the 100Ω resistor between 5V and pin 9 of the VGA connector just stabilizes the pin 9 voltage a bit; it forms a basic 16 kHz low-pass RC filter here, and would make sure the voltage the display sees on that pin is stable. It is utterly "gilding the lily", as Dave would say; feel free to omit it. As BrianHG explained, even if pin 9 is connected to ground in the cable or display, it will only draw 5V/100Ω = 50mA, and generate 0.25W = 250mW = 1/4 watt of waste heat. So, I would suggest making this a through-hole resistor. And crap, I actually put the capacitor on the wrong side of the resistor, too; it needs to beafterthe resistor... I better just delete the capacitor, to be honest.So, to recap:The incoming red, green, and blue analog video signals are terminated to ground through 75Ω resistors R1-R3, as close as possible to the incoming 13-pin DIN connector. The monochrome video is terminated similarly using a 27Ω resistor R4. This is because the input is an end of a transmission line, unlike if we used just analog switches (which would then form part of the transmission line).Analog video signals go to the inputs of the three video amplifiers U1, U2, U3. As they start a new transmission line, there are 75Ω resistors R5-R7 and R9-R11 in series with the red, green, and blue signals; and a 27Ω resistor R8 (shown as 75Ω in the schematic) on the monochrome video signal.Amplifier U2 and U3 outputs are commoned to the VGA connector, so only one of them should be "on" at the same time. I added the resistors before the commoning, so that in the case both amplifiers get enabled at the same time, they'll fight through 75Ω+75Ω = 150Ω series resistance –– think of one trying to drive the output low while the other drives it high) –– which should allow them both to survive without damage. If I used only one set of resistors, only the amplifiers internal circuits would limit the current; I don't think they'd survive that. So, I am using extra three resistors to deal with the case where both /VGAMONO and /VGACOLOR manage to be low at the same time. Shouldn't happen, but hey, it's just three extra resistors.Note how amplifier U2 takes the monochrome video signal for each of the three inputs, and amplifies them separately into VGA red, green, and blue. This way, the monochrome video input is not at all affected by the "copying" into red, green, and blue. Indeed, if your Atari and VGA displays share a common ground (so there is no voltage difference between their grounds, and they can be connected at the same time to this circuit), there is no reason why you couldn't enable both Atari and VGA outputs at the same time. There is no signal degradation, due to the amplifiers used.For the sync signals, U4 and U5 buffer them, and output (only) to the currently selected connector, using /ATARI to decide. When /ATARI is low, the DIN-13 output is used, otherwise the VGA output is used.If I missed anything, just say so, and I'll try to explain better. (I write these posts in the hopes that they help others learn –– not just you, but anyone who discovers this thread say via a web search. I'm not interested in giving answers on a platter, which is why my suggested schematics typically require modifications to suit the use case. Plus, I err/fail often.)(Technically, we could use a 12V isolated DC-DC converter to supply 7-12V regulated down to 5V to the isolated VGA side, a TI ISO7720 for the sync signals and a 74HCT2G125 for output buffer/driver, three NJM2505A isolated video amplifiers and a THS7373/7374 video amplifier, to provide a completely isolated VGA output. The added BOM cost is less than 10€ from Mouser in singles. It would allow connecting both VGA and DIN-13 outputs at the same time, safely, even if the two do not have a common ground or their GND potentials differ by a couple of hundred volts. They could also be enabled at the same time without affecting each other –– except for the Select on the DIN-13, of course. Note that other members here have "berated" me for over-use of isolators, though. It's just that I often encounter ground loops, in the form of GND/0V on different devices having different potentials, because they use non-grounded power supplies; often cheap wall warts.)

author: Nominal Animal
author_rank: Super Contributor
timestamp: October 19, 2024, 11:36:00 am
content: Quote from: analogix on October 18, 2024, 10:28:48 pmYou don't use resistors when you use analog switches; they are only used to terminate one transmission line (input to ground via resistors), and in series with the signal after an amplifier to start a new transmission line.With analog switches, your switching circuit is part of the transmission line, and should not have any resistors in series nor to ground.Quote from: analogix on October 18, 2024, 10:28:48 pmIf you use a diode (with anode to the +12V supply, and cathode to the regulator input) for each +12V supply, it will automatically draw current from whichever supply has the highest voltage.There are also "ideal diode" circuits like LM66100 (single), LM66200 (dual), MAX40200 (single), that are limited to 5.5V maximum, but have very small voltage drop (something like less than 0.09V drop at 5V even at 100mA currents), that you can use with the 5V similar to ordinary diodes.

author: analogix
author_rank: Frequent Contributor
timestamp: October 19, 2024, 01:34:54 pm
content: Quote from: Nominal Animal on October 19, 2024, 11:15:57 amThat's great news!QuoteThat's a good suggestion, and certainly something I can keep in mind for other projects.But here I'm placing the entire Atari STe inside a 19" metal rack enclosure. The VGA output board will be one of many hardware enhancements to this computer.I'm envision the VGA output PCB placed on the rear panel with holes drilled for the two output connectors (HD-15 and DIN-13) as well as the 3-way slide switch. The HD-15 connector already has two screws for mounting through such an opening, but something like a few small 90 degree metal brackets for fastening the PCB to the rear panel will help make it stable and handle whenever a DIN-13 plug is inserted and the switch used.On the opposite end of the PCB will be internal connectors: for attaching to the Atari video output, power connector option, composite/audio output etc.QuoteHehe..... I can only say the same for myself, though I try to get to the point with fewer wordsDon't sell yourself short -I can see that you are very knowledgable, and I've learnt a lot from you've postedQuoteSuper! I appreciate this. And having a scaleable image of the schematic is a great idea I wouldn't have thought of.Give me a little time and I'll get back here with hopefully a better understanding of it.

author: analogix
author_rank: Frequent Contributor
timestamp: October 29, 2024, 09:17:27 pm
content: OK, I'm backI've studied your schematic and comments as well as looked more into the details of my existing schematic and Ubeswitch.There's a lot of new things to take in, and a lot is over my head, so I'd like to keep it simple if I can.Ubeswitch already works for other Atari users, isn't too complicated, so I want to see if I can get my existing schematic to do the job.So.... in theory at least it looks like my schematic will work. I'm trying to catch up on the 75 Ohm impedance thing, which is kind of confusing as different sources say different things. Like, in the Ubeswitch there aren't any resistors at all to balance out the impedance, likewise in thisBuilding a KVMarticle, which is based upon two TS5V330 chips (like in the Ubeswitch), while other sources say it's something that can be done to improve the signal, but in many cases it doesn't make any practical difference.On another note: I'd like to work out how to generate the needed high/low signals so I can get away with using a simple 3-way slide switch (not needing one with many poles). Is this what the 74LVC2G241 (U4 and U5) in your circuit does?Here are the signals I need for each of the 3 modes:Note: for the U1 and U11 "SEL" (select) signals, these will be permanently connected to GND (logic LOW), so these two pins will just be hard-wired to GND.

author: Nominal Animal
author_rank: Super Contributor
timestamp: October 30, 2024, 05:03:32 pm
content: Oo boy, another wall of text incoming. Sincire apologies to everyone annoyed by this!Quote from: analogix on October 29, 2024, 09:17:27 pmRight; I fully trust you regarding your needs, definitely over my own suggestions!Quote from: analogix on October 29, 2024, 09:17:27 pmIf you omitted the series resistors R1, R2, R3, and possibly the tint pots R4, R5, R6, I definitely agree it should work.Quote from: analogix on October 29, 2024, 09:17:27 pmThe key is that when you use switches, you onlyconveythe signal like a plain cable would, so no series or terminating resistors are used; and you want to keep the switch/multiplexer on-state resistances as low as possible.When you use amplifiers, you terminate the incoming signal with suitable resistors to ground, so that the signal input to the amplifiers will have no artefacts like signal reflections. The video amplifiers I showed have a fixed gain of 2, so they need series resistance equivalent to the terminating resistance (at the display device), to get the correct voltage amplitude.You can even see this in the Atari STe schematic: it itself uses 2N3904 transistors (Q400, Q401, Q402, Q403) with series resistors as video amplifiers!Mathematically, as the simplest possible approximation, the signal input in the display device after an amplifier isG·V·Rt/(Rs+Rc+Rt), whereG=2 is the gain in the amplifier,Vis the instantaneous voltage on the amplifier inputs,Rt=75Ω is the termination resistance in the display device,Rsis the series resistance immediately after the amplifier, andRcare the losses in the cable (including any switches). Because ofG=2 with these video amplifiers (with most video amplifiers you can find!), we want the ratio of the resistances to be 0.5, so that the signal level in the receiver is the same as the signal level on the input to the amplifier. The losses in the cabling are so low that we can basically ignore them (Rc≃ 0), and in real life we cannot really estimate them because it varies from cable to cable anyway and the condition of the connectors. So, we're left with 75Ω/(Rs+ 75Ω) = 0.5, which gives us the series resistance we need,Rs=75Ω.(The proper mathematical model for this is thetransmission line(whereGis conductance instead of gain), however. It turns out that if we assume short typical video cables, we get basically the same answer as above to within 10% or so, which was the precision used above anyway.)My own reasoning from going from switches/muxes into amplifiers is simple: the amplifiers are cheaper (yes!) at Mouser, it is easier to get best possible fidelity with video amplifiers compared to passive switches and muxes, and the series resistors can be replaced with variable resistors for signal amplitude and monochrome tint adjustment – even though I left them out for simplicity. That's it; no magic involved.Quote from: analogix on October 29, 2024, 09:17:27 pmThat is because it uses switches/multiplexers instead of amplifiers, and thus needs to minimize the on-state resistance.Quote from: analogix on October 29, 2024, 09:17:27 pmYes. This is because small attenuation in the video signals is not a problem; the 0.7V peak-to-peak is not exact, and only affects the default brightness in the display device. Some even have automatic gain control, normalizing the brightness before any adjustments, in which case say 10% voltage "error" is utterly invisible to us humans.Atari STe video bandwidth is also narrow compared to current analog video (like 720p and 1080p HD) that currently available video amplifiers and switches/muxes target. This means neither switches/muxes or amplifiers will "soften" crisp edges.The noise added to the video signals by these switches/muxes and amplifiers is tiny, well below 42dB (that corresponds to 8 bits per component, or 256 levels of intensity), so neither will add any human-visible noise/speckling/degradation to the image either.Thus, for us humans, there should be no difference in the displayed video, be it manipulated by analog switches/muxes or video amplifiers on the way, as long as both are implemented correctly. (In your latest schematic, the resistors R1-R6 are problematic, as they would reduce the signal amplitude; similar to having a very poor cable made from aluminium wires or something. Depending on your display device, you might have to crank up the brightness to its maximum to get a good image, for example.)Quote from: analogix on October 29, 2024, 09:17:27 pmNo, the '2G241 (inreply #42and#51) buffer the digital sync signals.It turned out that if the three video switches/amplifiers have the same enable state, and there are two switches or buffers for the the sync signals with opposite enable states (one active low, one active high), no logic is needed, and the slide switch can be used directly.Quote from: analogix on October 29, 2024, 09:17:27 pmLet's say you use a similar circuit with the slide switch as in myreply #42: the wiper is connected to ground, with the three outputs are connected to pull-up resistors to 5V. This way, the selected output is LOW, and the two other outputs are HIGH, and one pole slide switch (SP3T, or one side of DP3T) suffices.U1/U11 Enable and U2/U22 Select are connected to the respective slide switch outputs (making the "Any" state LOW).For U2/U22 enable, you need a 5V logic inverter (NOT, or XOR with other input connected to GND, for example) from the U1/U11 Enable signal. (An analog SPDT switch or multiplexer can also be used as an inverter, by just connecting the inputs to GND and 5V, and using the U1/U11 Enable signal as the selector.) We have LOTS of options for this.I like the SOT23/SC-74 footprint for hand-soldering, as it is small enough but not too small to solder by hand. Looking at Mouser catalog, we have some 34 options in stock (in SOT23/SC-74 at 5V). The cheapest one isSN74ACH1G86DBVR(PDF datasheet) at 0.10€ apiece in singles. Pin 1 is connected to the U1/U11 Enable signal, pins 2 and 3 to ground, pin 4 to U2/U22 enable, and pin 5 to 5V. Because it is a XOR gate, and B is always at GND, pin 4 Y = not A (pin 1), the inverted state we need. If the distance from pin 5 to a capacitor between 5V and ground is longer than a couple of centimeters or an inch, I'd add a 100nF X7R capacitor between 5V and GND close to the SN74AHC1G86: it will almost certainly work absolutely fine without it, but it is what the datasheet and common practice suggests.What I recommend, is having a strip of 100 in 0806 (bigger) or 0603 (smaller) X7R 100nF = 0.1µF capacitors at hand. At Mouser,100 Samsung CL10B104JB8NNND's in 0603costs 1.60€ total, and100 Samsung CL21B104KBCNFNC 's in 08051€ total. The smaller ones are harder to solder –– to keep in place while you solder them, actually, being so tiny; without excellent tweezers they tend topingand vanish when you grab them, never to be seen again –– but useful when working on a small board, so I tend to have both. I'm actually looking for low-durometer silicone I could dip the end of some wooden barbecue sticks for holding these buggers in place! Always having the pads for these bypass capacitors is easy, even if not strictly required for the particular application. You can always just leave them unpopulated afterwards. Bodging them in without a footprint is much more annoying; and finding out the problem is lack of supply bypass capacitor for some IC is absolutely infuriatingly difficult: you end up finding out it was the problem basically after trying everything else first and fixing it by adding the capacitor to see if it was the issue.)For the same reason, instead of the SN74ACH1G86DBVR XOR gate, you might instead use aSN74LVC1G97configurable multifunction gate, so that you can get a few dozen of them, and have in stock for other use cases. Mouser sellsSN74LVC1G97DBVRfor 1.29€ for ten. The idea with these is that they have three inputs, one or two of which you connect to GND or VCC to select the configuration you need. Figure 8 in the datasheet shows the inverter configuration: pin 1 is connected to the U1/U11 Enable signal, pins 2, 3, and 6 to ground, pin 4 to U2/U22 enable, and pin 5 to 5V. So almost the same configuration as the XOR gate, except that the XOR gate has one less pins (its pin 5 corresponds to pin 6 in SN74LVC1G97; the connections to that and the new pin differs between these two).'1G97, '1G57, and '1G58 are similar multifunction gates, but with different logic tables. Any one of them could be used here instead.One reason I like the SOT23/SC-74 footprint is that in an emergency or prototyping stage, I can solder wires directly to the legs, then cover them in heatshrink, to do a circuit modification without any PCB, i.e. "dead bug" it. If you experiment with digital circuits, high-speed multifunction gates like SN74LVC1G97 areveryuseful when you find you need to combine some signals or invert some signal. For the exact same reason, I keep SN74LVC1T45 voltage translators in SOT23 (Diodes 74LVC1T45W6-7 or TI SN74LVC1T45DBVR) in stock.

author: analogix
author_rank: Frequent Contributor
timestamp: October 31, 2024, 10:16:15 pm
content: Quote from: Nominal Animal on October 30, 2024, 05:03:32 pmAll "Atari ST to VGA cable" pinouts include resistors on the R, G and B lines of the HD15 connector since the signal level is too high compared to a normal PC's output.I made a slight change here, so I could have separate resistors for colour or mono modes (for adjusting the colour balance in mono mode).Is this where you're saying there's a problem, or by having resistors for the R,G,B and monochrome outputs at all?By the way, out of curiosity I measured the resistance between the R, G, B and monochrome pins to GND from the video output connector (DIN-13). The computer was off when measuring.R to GND: 220 OhmsG to GND: 220 OhmsB to GND: 220 OhmsMONOCHROME to GND: 127 OhmsQuoteAha! That sounds simple enough (like I like it!), and confirms my findings for the Ubeswitch and other Atari to VGA cable pinouts.But I got confused again becausethis variation of the Ubeswitchhas indeed got termination resistors. Could it be because this version also has a 74HCT14 for buffering the Hsync and Vsync signals? Attached is the schematic which is available fromthe project's PCBway page.Regarding the buffer -I was told they're there to prevent the video circuitry in the computer from overloading. Which sounds like a good thing of course, so keeping it would be beneficial, right?I previously mentioned the (5 channel) TS5V522 multiplexer as a possible replacement for the (4 channel) TS5V330 -the latter being used in my schematic, just as in the Ubeswitch and the Ubeswitch variation above. The TS5V522 datasheet says it has built-in buffering for the sync signals. In any case I need two of them for the whole set of 7 signals (4 MUX chips in total for the PCB) regardless of which MUX I use, but it has more pins (24) than the TS5V330 (16 pins) which would mean more PCB space. Do you think it would make any difference if I go with the addition of a 74HCT14 for this, or have it built-in with the TS5V522? (see an excerpt of the PCBway schematic below showing just the buffer chip. The complete schematic is attached at the end of this posting)QuoteAh! I see.That clears up a lot of confusionGood to hear that the MUX solution is something that I can go for (at least I understand how that works).Thanks for the info on the logic switching circuitry.I need to re-read it to understand it, and possibly draw a schematic before getting back to discuss it. One step at a time

author: Nominal Animal
author_rank: Super Contributor
timestamp: November 01, 2024, 04:20:47 am
content: Edited to prefix: If anyone more experienced than just-hobbyist-myself finds an error in my posts or something that needs to be better explained,please point it out! Me fail often, and such corrections are definitely appreciated.Quote from: analogix on October 31, 2024, 10:16:15 pmRight; this means that the signal amplitude on the Atari is too high, andmustbe attenuated by a series resistor for VGA.I did not take this into account, because I have no knowledge of the actual voltage levels on the 13-pin DIN connector on the Atari (when terminated with 75Ω to GND). I only know that for VGA, the red, green, and blue analog video signals should vary between 0V (minimum intensity) and 0.7V (maximum intensity).Thus, I agree that "omitting" would be wrong too. I still do not know the exact values or even the range of values needed for the series resistors, though.Quote from: analogix on October 31, 2024, 10:16:15 pmR1, R2, R3 being 75Ω looks incorrect to me.If you use color mode, with a vertical white filled rectangle of about half the screen wide, on black background, you disconnected the video connector, and connected a 75Ω resistor between pin 13 and pin 10, what voltage swing would you see on pin 10?Some web pages say 1.0V (that would be 0V to 1.0V with respect to pin 13, GND).On the Atari STe video circuit, pin 10 is the analog blue intensity signal, coming from 2N3904 NPN transistor Q402 acting as an unity gain (emitter follower) amplifier, withRᵢ=75Ω resistor in series to pin 10. Let's say the voltage on Q402 emitter isVₑ, and the measured voltage on pin 10 (on one end of the resistor) isV. If we call the terminating resistorRₜ=75Ω, and the web pages are right, thenVₑ·Rₜ/(Rₜ+Rᵢ) =V= 1.0V, i.e.Vₑ=V+V·Rᵢ/Rₜ, which yieldsVₑ= 2.0V.VGA displays have exactly that 75Ω termination resistor to ground, and they expect a voltage swing of 0.7V at the top of that resistor for red, green, and blue signals. The resistance of the cable is small, one ohm or less, so we can ignore that: typical 5% resistors resistance varies more than that. If we useRₛfor the added series resistance we need to convert from Atari to VGA voltage levels, thenVₑ·Rₜ/(Rₜ+Rᵢ+Rₛ) = 0.7V, i.e. 2.0V·75Ω/(150Ω+Rₛ) = 0.7V, giving usRₛ≃ 64Ω.Note that if the measured swingVabove was just 1.05V, then repeating the same calculation would yieldVₑ= 2.1V and we'd needRₛ= 75Ω for VGA. If the measured swingVwas 1.4V, thenVₑ= 2.8V, and we'd needRₛ= 150Ω for VGA.(Because the voltage swing is obviously correct for the Atari 13-pin DIN output, those signals do not have any resistors in series.)If one measures the voltage between pins 10 and 13 directly, without a resistor, using a high-impedance probe (say 10kΩ or higher impedance), the result isVₑdirectly. (The higher the impedance, the smaller the error. It's about 0.75% at 10kΩ impedance, 0.075% at 100kΩ, and so on.) If the probe has 75Ω impedance to ground, you don't use a resistor at all as it is built-in to the probe so to speak, but otherwise treat the measurement the same as above. If the probe has some other impedanceR, then measurementVyieldsVₑviaVₑ=V+V·75Ω/R. If you don't know the probe impedance, the measurement is useless. Therefore, just stating some voltage figure is useless, unless we also know how it was measured!I've mentioned it before that I do not know that voltage swing for sure, and therefore cannot tell exactly what the series resistors need to be;and that they need to be determined somehow.My schematic using video amplifiers does not take this into account either, and the resistors must be adjusted (and optionally some more added, in a voltage divider configuration), to get the correct 0.7V voltage swing in the VGA display receiver end.Quote from: analogix on October 31, 2024, 10:16:15 pmIt does not really matter, because the output is an NPN transistor (2N3904), with an emitter resistor to ground to stabilize the gain (because BJT transistors are current-controlled devices).That is, when unpowered, you are not measuring the properties of the transistor amplifier, but just the series resistance and the emitter resistor in series, because the base-emitter junction is basically a diode in blocking direction here. The schematic says the series resistance is 75Ω for R, G, B, and the emitter resistance is two 75Ω in series for each, so you should see 3·75Ω=225Ω. For the monochrome, the series resistance is 27Ω, and the emitter resistor is just one 100Ω resistor, so you should see 27Ω+100Ω=127Ω.Which is what you measured, to within few percent, confirming that the schematic (here) should be correct in this regard.Quote from: analogix on October 31, 2024, 10:16:15 pmGood.As discussed above, because the Atari signal swing is a bit too high for VGA, some series resistance is needed to bring that swing down to the 0.7Vpp range, though, and I have not taken this into account before, because I do not know the actual signal swing!My problem is that I cannot find a reliable source to find out what it is, and since I don't have an Atari STe myself, I cannot even measure it.Quote from: analogix on October 31, 2024, 10:16:15 pmNo, it has 75Ω in series with the analog video signals (red, green, blue) between the input 13-pin DIN and the analog switch/multiplexer, plus another 75Ω in series with the VGA red, green, and blue video signals just before the VGA connector. In other words, it usesRₛ= 150Ω.In Ubeswitch mk6, there are three trimpots in voltage divider configuration, so we don't know what the real-worldRₛthere is.If the schematic you showed works best, it would imply thatVₑ= 2.8V or thereabouts, with the measurement using a 75Ω resistor or 75Ω probe showingV= 1.4V.Would it be possible for you to do the aforementioned measurement? Very, very carefully? With a color mode test image, half-screen-wide white filled rectangle on black background, you'd need less than 1 MHz of bandwidth to measure it, so even the $25 oscilloscopes would suffice.Quote from: analogix on October 31, 2024, 10:16:15 pmBuffer = amplifier with unity gain (no change in amplitude). For the sync signals, it means the Atari would power only the inputs of the buffers, and the buffers would provide the power from that on, to the VGA display device and the Atari display.Thus, yeah: I do believe the buffers are beneficial. (Essentially, the video amplifiers in my schematic do the exact same thing, except for the analog video signals.)Quote from: analogix on October 31, 2024, 10:16:15 pm74HCT14 is a hex inverter with Schmitt trigger TTL level inputs. It buffers the sync signals by inverting each twice. It does not have an enable pin, so it is only valid for this VGA-only schematic, not the switched one.For the VGA-only model, I myself would prefer a pair of 74AHCT1G17GVH (in SOT23/SC-74/SOT753 footprint, 3mm×1.5mm body, 0.95mm pin pitch, small but still hand-solderable), or a single 74HCT2G17GV,125 (in SOT23/SC-74/SOT457), whichever is easier to route.For your switched model, having different enable states would be simplest. For example, two SN74AHCT1G126DBVR and two SN74AHCT1G125DBVR would suffice for the sync signals for the VGA and DIN connectors, using only the Atari output active-low enable signal from the slide switch. The '1G126 outputs would go to the DIN connector, and the '1G125 to the VGA connector. These are in SOT23, and thus small but not too small to hand-solder. (There are also AHCT2G125 and AHCT2G126 chips, having two inputs and two outputs each so you'd only need one chip of each, but see next paragraph.)Because of the routing, having a tiny SOT23/SC-74/SOT753 chip (or two) per sync signal per connector makes routing much easier compared to using a single larger chip where you need to bring both sync signals to. This is particularly true on the 13-pin DIN connector, where the sync signals are basically on different sides, bracketing the analog video signals, making routing them as a pair a bit difficult. (Because Vsync is very low frequency signal, you can route that one through almost any convoluted path you like ending up near hsync, without any ill effects, so it isn't a real issue, though.)Would it make anyuser-visible difference? No, I don't think so.

author: analogix
author_rank: Frequent Contributor
timestamp: November 01, 2024, 10:01:13 pm
content: Quote from: Nominal Animal on November 01, 2024, 04:20:47 amI understand.Yes, the values may very well be incorrect. I don't know how I ended up with 75 Ohms. It may have been something I picked up from other source, or something I used when testing whichappearedgood. But no scientific calculations or anything like that from my part. This time around however I want to do it right.Actually I haven't used my Atari STe for quite a while, but give me a little while and I'll get it ready for testing. I have a recapping kit for the power supply which I think is a good idea to install first, or at least test the power supply to see if it's still good.I also have a "quickly built" VGA mono cable which I'll be using with a VGA display I have. I should probably reconnect its pins into a test-board or something so I can check out various things before completing the design of the circuit board. Something like this:QuoteI do actually have an oscilloscope (that I built from a kit). It's aJYEtech DSO-150single channel type, but its bandwidth is only 200 KHz. Is it unsuitable for this measurement?

author: Nominal Animal
author_rank: Super Contributor
timestamp: November 02, 2024, 01:01:41 am
content: Quote from: analogix on November 01, 2024, 10:01:13 pmActually, it should work for this. Both AC and DC coupled input modes on the DSO-150 have an input impedance of over 1 MΩ, which means you can just stick probes directly to pins 10 and 13 on the Atari STe, giving youVe(amplifier emitter voltage). Because of the high impedance, the current is at most 12µA no matter which pins you stick them into, so it should be quite safe to do, too.When you look at the 13-pin DIN female connector on Atari STe, it looks like this:⎛ D ⎞ D = GND 8 = 12V 3 = ExtClock⎜ 9 A B C ⎟ C = Vsync 7 = Red 2 = Composite⎜ 5 6 7 8 ⎟ B = MonoVideo 6 = Green 1 = AudioOut⎜ 1 2 3 4 ⎟ A = Blue 5 = AudioIn⎝ ┌─┐ ⎠ 9 = Hsync 4 = MonoSelectThe sole pin is pin 13. Pin 1 is clockwise from the tab/dent in the female connector, counterclockwise from the tab/dent in the male connector, when looking towards the connector from outside, as if you were the mating connector. When looking at the pins from the inside, from the cable or enclosure side, remember that you then see the pin order mirrored.)For clarity, I write units within angle brackets, [], below.The signal has thenRi=75  in series for R, G, B andRi=27  for MonoVideo, inside the Atari. Any cables and switches/muxes on-state resistances and additional series resistances, in series, summed together, isRs. Finally, on the VGA display, there is a terminating resistanceRt=75  to ground. On the other end of the terminating resistance in the VGA display, the voltage swing between black and white must be about 0.7 :Ve·Rt/ (Rt+Ri+Rs) = 0.7 which means that when you knowVe, you can calculate the total amount of series resistance (including switches and series resistors) you need between Atari output and VGA output:Rs=Rt·Ve/ 0.7  -Rt-Riwhich for R, G, and B isRsrgb= 75  ·Ve/ 0.7  - 150 For monochrome video split to VGA RGB, the series resistance needed isRsmono= 75  ·Ve/ 0.7  - 102 on R, G, and B after splitting mono video components. (This includes, as a sum, any series resistance on the monochrome video signal before the split into R, G, B.)Set up color mode, black background, and a full height filled white rectangle of about 80% screen width. That will give you the lowest frequency signal, each horizontal scan line taking about 1/15700Hz ≃ 64µs, and the white part about half that (remember, the time includes horizontal retrace also), so 200 kHz bandwidth should be plenty enough.If you also have a known good multimeter (I have an Aneng AN8008), you could use a 1kΩ or so resistor in series with any battery you happen to have, and measure that with both, to see how closely the multimeter and DSO-150 agree. (Batteries need to be loaded a bit to get their actual voltage; their unloaded voltage is somewhat higher and can "lie".)We don't needthatmuch precision here; I'd say getting the voltage swing to within 0.1 volts or so would suffice; 1% precision is about the best we can get with this kind of simplicity. If you are also active on Atari ST enthusiast forums, youcouldask there for someone to do the same measurement (with a high-impedance probe, or with a known-impedance probe on a "proper" oscilloscope). If you want help formatting the question, PM me (or send me an email; address ishere).To repeat, if you have a probe with impedanceR, and the measured voltage swing with that probe only (nothing else but the probe connected to the video output pin, and the ground clip/pin connected to pin 13/GND) isV, thenVe=V+V·Ri/R, whereRi= 75  for the color signals and 27  for the monochrome video signal. That is also why for probes with high impedance, say 10  or more, we can approximateVe≃V: the error is less than 1% ofVthen, and that's the reasonable limit of precision here anyway. Also, we already know the sync signals are 5V TTL level digital signals, so it's just the four analog video signals we need info on.)

author: analogix
author_rank: Frequent Contributor
timestamp: November 02, 2024, 01:16:36 am
content: Thanks. Sounds good.I'll get back to you once I've recapped the STe's power supply. I have all the parts, so I just need the time

author: analogix
author_rank: Frequent Contributor
timestamp: November 07, 2024, 09:20:21 pm
content: A little update:Recapping went fine, but my Atari-VGA cable no longer works(no big suprise really as it was only intended for a few times use back in the day and has the typical "dead bug" look). I hope to buy some prototyping/experimentation type PCBs in the next few days so I can rebuild it with better reliability which will also allow me to easier test out things while designing the Atari-VGA output board.A practical question: I want to connect the Atari-VGA output board with a (perhaps 20cm) cable that has a 13-pin DIN (male) at one end (plugs into the Atari STe motherboard), and at the other end something like a 14-pin Molex or similar (I'm open for suggestions) that goes into the video output board.Using a shielded (75 Ohm?) cable with 14 conductors, should I use 12 of the wires for the first 12 signals, and for pin 13 (GND), should I use the shielding for this which also goes to the GND-plane of the VGA output board? I'm concerned about ground-loops.(please disregard the DIN13 symbol below -it's supposed to be a plug, not a socket):

author: Nominal Animal
author_rank: Super Contributor
timestamp: November 09, 2024, 12:43:00 am
content: Quote from: analogix on November 07, 2024, 09:20:21 pmOnly Red, Green, Blue, Monochrome video, and Composite video need to be 75Ω. If you don't mindbulky, you could do a cable bunch, and use five 75Ω coaxials for the video signals, and a multi-strand data cable for the rest – my choice would be a four-pair Ethernet cable. Remember that you can use a small PCB you manufacture at JLCPCB/PCBWay/etc; they do not need to terminate directly at either connector. (The trick with such is to extend the board outwards from the through holes for the cables, and have ziptie holes so you ziptie the cables to the PCB. Otherwise they'll easily detach from the PCB.) On your own board, you can use separate standard connectors for the cables. If you use Ethernet RJ45 connectors, your socket (jack) needs to be the non-magnetics type, like Adam Tech MTJ-881X1/MTJ-883X1/MTJ-885X1, Amphenol RJE03-188-0310, and so on (that Mouser sells for about 0.5€ in singles).Shielding and grounding is my weak point; I'veasked about this myself here. However, your device is DC-referenced, which means that the display(s) and the Atari STemustshare the same ground. If possible, I'd power them from the same mains socket, or at least the same mains circuit.Thus, I would use the shields for GND, yes, but also have a dedicated copper wire for the GND.

author: analogix
author_rank: Frequent Contributor
timestamp: November 09, 2024, 09:57:56 pm
content: Finally some great news and progress here: I now have a working Atari-VGA cable and the computer appears to work fineSo now I can start the measurements etc. I hope to get that done soon.Quote from: Nominal Animal on November 09, 2024, 12:43:00 amSo Hsync and Vsync don't need a 75 Ohm connection (because they're digital signals)?textQuoteWhat do you mean by "terminate" at the connectors? That the unused wires can be left hanging loose and not be connected to anything at the one end (or both ends)?It just occured to me that the Atari-VGA cable I've made is in fact a standard VGA cable (with moulded HD-15 connectors at each end and RF-chokes) where I've cut off and stripped one end to attach a DIN-13 plug.So for the shielded cable I could just cut off the required length and use it for this project. After all, it's shielded, got the right impedance and enough stranded wiresQuoteYou mean like this?

author: Nominal Animal
author_rank: Super Contributor
timestamp: November 09, 2024, 11:22:40 pm
content: Quote from: analogix on November 09, 2024, 09:57:56 pmExactly. They are just TTL level sync signals, so the characteristic impedance of the signal-ground pair used for them doesn't really matter, especially since Vsync is less than 100 Hz and Hsync less than 40 kHz for Atari STe.Quote from: analogix on November 09, 2024, 09:57:56 pmApologies, I worded myself horribly badly.Do you have good-quality DIN-13 to DIN-13 cables? If you do, then disregard everything except"Only Red, Green, Blue, Monochrome video, and Composite video need to be 75Ω."in the first paragraph of that post.You see, I considered the case where fully-connected DIN-13 cables with five 75Ω impedance video conductors are "unobtainium".The solution, then, is to split your board into two. One connects to a male DIN-13 connector, signal wires from the connector soldered directly to the PCB. That PCB also has five RCA or BNC female connectors for Red, Green, Blue, Monochrome video, and Composite video, plus one or more connectors for the audio and digital signals (which do not need any specific impedance, just good contact and lowish on-state resistance, although hsync, vsync, and monochrome detect can handle a couple of hundred ohms of on-state resistance ). Then, your board with the VGA, Composite, and DIN-13 outputs would connect to the Atari STe using that bunch of cables.That was all I was trying to say! Me fail English.Quote from: analogix on November 09, 2024, 09:57:56 pmYup, that works well for a single cable.Quote from: analogix on November 09, 2024, 09:57:56 pmYes, this is exactly how I'd do it.To recap: among these 13 conductors (plus shield), you have the following kinds:75Ω impendance high-frequency (video) signals: COMPOSITE_OUT, GREEN, RED, BLUE, MONOCHROME.For best results, use a 75Ω coaxial cable for each.VGA cables use twisted pairs for red, green, and blue, with 75Ω characteristic impedance. The rest are digital signals.Ethernet cables have four twisted pairs, with each pair having 100Ω characteristic impedance, so using my video amplifier schematic, if you wanted a longer cable between the Atari STe and your selector, you could use three Ethernet cables (Cat6a S/FTP preferred), with additional 25Ω or so series resistors on the Atari STe end (on a small board having the male 13-pin DIN connector connected to the Atari), and the input terminator resistors changed to 100Ω, you could use much longer S/FTP Cat6a type cables too I believe.Audio signals: AUDIO IN, AUDIO OUT.These are analog signals also, but (assuming line audio) any characteristic impedance between 100Ω and 600Ω will work fine. This is because the termination is different: no terminating resistors, or high values like 10kΩ or higher, so 100Ω to 600Ω impedance only varies the signal amplitude by less than 5%. This can be done because the frequencies involved are less than 25kHz or so, and the attenuation by a few percent only affects the volume –– 5% by 0.4dB or so.The cable used in headphones et cetera would work well, as will a twisted pair in an Ethernet cable for each audio signal; best if you used an S/FTP cable (individually foil-shielded pairs, so basically no cross-talk or coupling between pairs).Digital signals: HSYNC, VSYNC, EXT CLOCK.These don't need any specific characteristic impedance. You just want to keep the series resistance reasonable, say below 300Ω.If you put these next to the audio signals, unshielded and untwisted, they can capacitively couple to the audio signals. If you use one strand of a twisted pair for a sync and the other for audio, youwillget audible noise, a square wave at the sync signal frequency.Constant, or rarely changing: GND, +12V, MONO DETECT.These are similar to the digital signal in that you just want a good conductor with low enough series resistance for these; but since the signal in these is basically constant, they do not induce noise in nearby signals. In ribbon cables, putting a GND wire between two other wires basically eliminates such coupling.If I used a pair of VGA cables to carry all these signals, I would use the red, green, and blue conductors in one cable for RED, GREEN, and BLUE; and for COMPOSITE, MONOCHROME, and EXT CLOCK in the other. One would carry hsync and vsync; in the other, I'd use them for AUDIO IN and AUDIO OUT. I'd use the GND wire for GND in both cables; it's connected to several pins on the HD-15. That leaves +12V and MONO DETECT, and there should be some conductors left in the cable, typically used for I2C or monitor detection. I'd use one for MONO DETECT, and split the rest evenly between GND and +12V. The conductors are thin, so DC resistance relatively high, and any current drawn on the +12V would heat the GND and +12V wires. By using a thicker wire, or multiple conductors, you spread the load seen by a single conductor, reducing the waste heat.Ethernet S/FTP and U/FTP cables have a foil shield (that you connect to GND) between each pair, with each pair carrying one signal with approximately 100Ω characteristic impedance. S/FTP has an additional shield around the entire bunch, a wire mesh; and F/FTP has a foil around the entire bunch. U/FTP does not have a common shield over the entire bunch. One cable carries basically four signals among any of the above, except that for the constant/rarely changing you can use one half of a pair.Cat6a has very low DC resistance, so a single half-of-a-pair suffices for +12V. Basically, you need ten pairs for the video, audio, and sync signals, one for MONO DETECT, and the final one for +12V and GND. The only downside is that because of the characteristic impedance, you need to adjust the impedance on the Atari STe end, and use video amplifiers to re-output the five video signals at 75Ω impedance, or otherwise somehow handle the impedance mismatch. If only there were Cat6a S/FTP cables with 75Ω characteristic impedance!

author: analogix
author_rank: Frequent Contributor
timestamp: November 15, 2024, 11:04:02 pm
content: I've been pre-occupied for a while trying to get two Atari STe computers up and running, upgrading some things etc. and a VGA display, but have now got a working STe setup and can check things out in a real hardware environmentQuote from: Nominal Animal on November 09, 2024, 11:22:40 pmNo, because those cables are non-removable from the Atari monitors, having a DIN-13 male plug at one end.But the VGA cable I already have should do. I suppose it's a good idea tonotremove (or cut the cable before) at least one of the RF-chokes when soldering the the new connectors at each end of the cable.So, at this stage I'm trying to finish my schematic so I can design the PCB and finally order and make it.In the enclosed schematic I've added the SN74AHC1G86DBVR inverter as you suggested, but I haven't finished the rest of the connections to the 3-way slide switch.Truth be told I'm struggling to follow your schematic. If there's a simple and quick way to convert the signal labels to actual wire connections between the components, could you do that and post a new version of your schematic? If you need to do it all manually, never mind.I've also included the Hsync/Vsync buffer (74HCT14) which is taken from one of the Ubeswitch variants (relevant part of the schematic posted here)But I'm also considering your suggestion of using the SN74LVC2G241).That's what I have so far.To finalize the project I need to finish the above (logic connections, redoing the buffer it the existing one isn't suitable).Then, I suggest designing the PCB with multiple options (jumpers and/or solder pads) so that we can experiement with the resistor values to get the desired result.I see myself having a few options regarding the R, G, B resistors which include:1) fixed resistors for everything (monochrome and R, G, B)2) trimmers for the monochrome lines (for mixing the colour hue output) with jumpers/solder pads for the direction of the trimmers3) a single fixed resistor for the monochrome line4) a trimmer for the monochrome line, and trimmers for the colour R, G, B lines5) trimmers on the R, G and B pins of the HD-15 connector (provided the monochrome signal is the same level as the colour signals)It's either "all options available", "keep it simple" or something in between.

author: Nominal Animal
author_rank: Super Contributor
timestamp: November 16, 2024, 09:23:25 am
content: Quote from: analogix on November 15, 2024, 11:04:02 pmI can do that, but I want to make sure you understand the difference between my suggested approach and yours, the difference betweenvideo amplifiersandvideo switches, first.A video amplifier is an active device whose inputs act like the inputs to a real display, and whose outputs act like the original outputs of any video card or video output circuitry. While the output depends on the input, whatever happens on the output will not be propagated back to the input: it is like one-way valve, or a generator powering a motor, in that sense. It is important to understand that input sideends(and thus may needtermination, like analog video does), and the outputstartsa new signal path.A switch or multiplexer is just a complex connection between the input and output; not really any different to physical switches, or human connecting and disconnecting separate cables. It is important that their on-state resistance is low, just like you would by using good-quality cables. Any load or change on the output side affects the input side.The two are not interchangeable.Amplifier approach requires termination and impedance control, whereas switch/multiplexer approach only needs to keep the series on-state resistance low. Because Atari video signal amplitude is higher than on VGA, some series resistance will be needed to attenuate the signals down to the VGA range.For fixed resistor values, I'd need to know the emitter voltage swingVe(as I described inreply #59), but I think it would be better to design it with say 200Ω or 500Ω multi-turn pots instead, for adjustability. Perhaps Bourns 3296X or 3006P series?I personally believe the amplifier option is superior, because they are easier to control (adjust, for correct signal levels), and the components needed are cheaper.Quote from: analogix on November 15, 2024, 11:04:02 pmYup. Hsync and Vsync are 5V TTL signals at less than 40 kHz and 100 Hz, respectively, so there are a bazillion ways and ICs you can use to buffer them.I do believe two SN74AHCT1G126DBVR (0.10€ at Mouser;0.11$ at Digikey; part C163712 at LCSC and JLCPCB) plus two SN74AHCT1G125DBVR (0.12€ at Mouser;0.13$ at Digikey; part C7484 at LCSC and JLCPCB) would be the best option, though. These are cheap, easily available everywhere, in SOT-23 (small, but hand-solderable), and can directly be controlled from active-low or active-high "Atari" output selector signal without any logic. The fact that there is one chip per signal per output connector only makes routing the signals on the PCB easier.Quote from: analogix on November 15, 2024, 11:04:02 pmDefinitely. It only takes a little more space to allow for different footprints, and I already habitually do that with e.g. surface mount resistors: I like to use my own footprint, which has the same outline as 0805, but the same gap between pads as 0603, so I can use either one.With through-hole multiturn pot footprints, one can also use through-hole resistors in the vertical style. (The idea is that you do not bend one leg at all, and bend the other leg parallel to the resistor, perhaps with heatshrink around it, making it a vertical cylinder.)The resistors that affect the monochrome video tint are very nonlinear, because of the effect of the series resistanceRson the output signal amplitudeVo=Ve·Rt/(Rt+Ri+Rs). Basically, you'd need close to 1/x = x⁻¹ taper forRsforVoto adjust linearly... For a specific range, you can achieve it by using a fixed resistor in parallel with the potentiometer. For example, a 1000Ω resistor in parallel with a 100Ω trimmer gives you such a taper between about 91Ω and 909Ω (1% to 99% range), middle of the taper (50%) being about 167Ω. Since we do not know the range yet, we'll get better range and thus adjustability options with linear potentiometers, even if at one end it barely affects the output, and on the other end is very sensitive to changes.

author: Nominal Animal
author_rank: Super Contributor
timestamp: November 17, 2024, 10:06:52 am
content: So which one would you prefer I show the full schematic of: one using amplifiers, or one using switches/multiplexers?I'll have to redraw it anyway, but I find it fun, so it's not a bother –– as long as it is useful/informative. I don't mean you should use mine as is, but as a reference point relating to everything I've written thus far, so that you can make your own informed choices as to what you want/need.

author: analogix
author_rank: Frequent Contributor
timestamp: November 17, 2024, 12:20:13 pm
content: Quote from: Nominal Animal on November 17, 2024, 10:06:52 amYes, this is both informative and educational for sure.I'm a more of a visual person, which is why I find a full schematic with wires easier to understand than where the wires are symbolized.I'd like to go for the Ubeswitch-based solution which I've been working on, with the additional MUX chips (to allow for the necessary signals to be switched) and with logic control from the physical switch and the added Hsync/Vsync buffer.You don't need to spend a lot of time redoing the whole schematic (which is why I was hoping for a KiCAD function that would simply convert labels to wires), but I would like to understand better how the logic switching and buffering is wired up, so maybe you could just draw the wires from the 3-way slide switch to the the rest of the schematic and the buffers in yourvideo amplifier-based schematic in post #51.I will try to understand it and include the relevant bits intomy ubeswitch-based schematic (my most recent version posted in post#65).

author: Nominal Animal
author_rank: Super Contributor
timestamp: November 18, 2024, 09:18:21 pm
content: Attached is the part of the schematic that deals with video signals. Blue lines are analog video signals, cyan are sync signals, and green are digital selector signals.On the slide switch, pin 2 is the common pin, and is connected to ground. Pin 1 is "ATARI SELECT", and it is low when the slide switch is in the Atari position, and high otherwise. Pin 3 is "VGA COLOR SELECT", and it is low when the slide switch is in the VGA COLOR position, and high otherwise.U7 inverts the "ATARI SELECT", so that its Y output is high when the slide switch is in the Atari position, and low otherwise.U1 is connected to the VGA connector. When /EN is high, the switch is in high impedance mode ("not connected"). When /EN is low –– and it is low whenever the slide switch is not in Atari position (is in either VGA color or VGA mono position) ––, the VGA Red, Green, and Blue are connected to either input Red, Green, and Blue via resistors R1-R3 (to attenuate the signal to 0.7V), or to the input Mono via resistors R4-R6 (to attenuate the signal to 0.7V or less, tinting the monochrome video somewhat), depending on the IN pin voltage.U2 is connected to the Atari output connector. When /EN is high, the switch is in high impedance mode ("not connected"). IN pin is tied low, so that only S1 inputs will ever be used. When the slide switch is in Atari position, this IC is enabled.U3 and U4 are 74AHCT1G126 tri-state TTL-compatible buffers. When enabled, they pass the sync signals to the VGA connector. The OE pin is active high, and is connected to the ATARI SELECT slide switch pin, so that when the slide switch is in the Atari position, these are disabled, and enabled otherwise.U5 and U6 are 74AHCT1G125 tri-state TTL-compatible buffers. They are like '126s, except these are active low. The /OE pin is again connected to the ATARI SELECT slide switch pin, so that when the slide switch is in the Atari position, these are enabled, otherwise disabled.EXT CLOCK can be buffered using a 74AHCT1G125.Input MONO DETECT pin handling will use two 74AHCT1G125. One connects input MONO DETECT to output MONO DETECT when the slide switch is in Atari position, and the other connects input MONO DETECT to GND when the slide switch is in the VGA MONO position.Thus, by my count, you need 2×TS5V330PWR, 5×SN74AHCT1G125, 2×SN74AHCT1G126, and 1×SN74AHCT1G86DVBR (or any other 5V logic inverter).Also, I noticed that the +12V output on the Atari STe has a 2kΩ resistor in series. This means that the pin voltage drops by 2V per each milliamp you draw from it. Basically, the entire current budget it only 3mA or so! I would personally consider adding an USB input power connector, connected to a MTE1S0506MC isolated DC-DC converter and a 5V low-drop regulator like BA50DD0WT.

author: Nominal Animal
author_rank: Super Contributor
timestamp: November 18, 2024, 10:34:52 pm
content: Using a 4P3T slide switch like E-Switch EG4319A (Mouser) or EG4319 (Mouser), CW Industries G-660S-6010 (Mouser), G-Switch SS-43D01-G090 (C2686900 at LCSC), and so on, we can minimize current draw and eliminate the inverter; see attached image. Each of the four poles (common pins) is an active-low selection signal:(Atari)(VGA color)(VGA mono)Active-low signalPosition 1Position 2Position 3MODE_ATARIGND+5V+5VMODE_VGA+5VGNDGNDMODE_VGA_COLOR+5VGND+5VMODE_VGA_MONO+5V+5VGNDThis way, no current is lost in any pull-up or pull-down resistors, and 2×TS5V330PWR plus 7×SN74AHCT1G125 IC's suffice, lowering the BOM cost.Edit: Instead of SN74AHCT1G125's, use 74LVC1G125's (like NXP 74LVC1G125GV,125 or TI 74LVC1G125DBVR et cetera) since they have TTL-compatible logic levels but include Schmitt triggers on inputs too.I'll see if I can draw a full schematic using this slide switch, this time including all signals. Note that the different slide switches have different physical layout, but all 4P3T switches have 16 pins, and if you mount the switch on the enclosure, you can use 6 wires –– +5V, GND, MODE_ATARI, MODE_VGA, MODE_VGA_COLOR, MODE_VGA_MONO –– from the PCB to the switch, with additional "jumper" wires in the switch itself. The above table tells you what voltage each of the four signals should have in the three different positions.

author: analogix
author_rank: Frequent Contributor
timestamp: November 20, 2024, 10:41:02 pm
content: Quote from: Nominal Animal on November 18, 2024, 09:18:21 pmThank youI'll spend a little time studying it and the other one you posted and get back to you.Thanks again!

author: analogix
author_rank: Frequent Contributor
timestamp: November 24, 2024, 10:08:24 pm
content: Quote from: Nominal Animal on November 18, 2024, 09:18:21 pmThanks to your schematic inpost #69I believe I now have a more or less finalized schematic(See attachement below).I've made these changes:- Added Hsync and Vsync buffers (2x 74AHCT126) for the VGA output- Added logic inverter (74AHC86) for opposite logic enable signals of Atari-MUX and VGA-MUX- Added 3-way slide switch for selecting the 3 video modes- Added LEDs showing each mode (mainly to see if the MUX chips are working if troubleshooting)- Added more comments and visual cleanups to make the schematic easier to read- tied unused MUX inputs/outputs to GNDI have a couple of questions:a) I've tied the unused multiplexer inputs and outputs to GND (U22, U11) because I've heard floating logic pins are bad (they can fluctuate). Now that I think about it, these aren't actually logic inputs and outputs are they?, so should I just remove those GND connections and leave them unused?b) One of the VGA MUX chips (U22) switches theHsyncandVsyncsignals. They are of course used in both VGA-mono and VGA-colour modes, so I have switch outputsS1AandS2Apermanently connected together for Hsync.Similarly, for Vsync I haveS1BandS2Bpermanently connected together. Is this OK?c) should there be a pullup resistor on the +5V line of U5 (74AHC86) like there is on the slide switch?

author: Nominal Animal
author_rank: Super Contributor
timestamp: December 02, 2024, 09:36:21 pm
content: Attached is my version of the mux/switch-based switch. Apologies, I got "stuck" and couldn't redraw it with wires instead of net labels. (Promising to do something in the future is my Achilles' heel: even very simple tasks often become very difficult for me to complete.)AUDIO IN, AUDIO OUT, COMPOSITE, and +12V are directly wired between the two 13-pin DIN connectors.Only three of the four poles in the three-throw slide switch are used. They are all active low. /ATARI is low when the 13-pin DIN output is selected. /VGA is low when either of the VGA output modes is selected. VGA_COLOR is low when the color VGA output mode is selected.The monochrome SELECT signal between the two 13-pin DIN connectors is switched by U4. When /ATARI is low, they are connected. When /ATARI is high, IN_SELECT is connected to Q1 (and ATARI_SELECT is not connected). When /VGA_COLOR is low, Q1 does not conduct (is high-Z). When /VGA_COLOR is high, Q1 conducts and pulls U4 NO to ground. This way, in color VGA mode IN_SELECT floats, and in mono VGA mode it is pulled to ground. Q1 also conducts when /ATARI is low and /VGA_COLOR is high, but U4 ignores the NO then, so it is okay. R7 on gate of Q1 limits peak current draw, and I think values between 1k and 10k should work fine here. (All it does is "slow" down the rate at which Q1 switches.) Note that Q1 is an enhancement mode N-channel MOSFET, similar to BSS138, and is therefore voltage-controlled (or rather,charge-controlled); it draws only tiny leakage currents in steady state.U6 connects ATARI_EXTCLOCK to IN_EXTCLOCK only when /ATARI is low.Sync signals are routed by U2. When /ATARI is low, IN_HSYNC and IN_VSYNC are connected to ATARI_HSYNC and ATARI_VSYNC, respectively. When /VGA is low, IN_HSYNC and IN_VSYNC are connected to VGA_HSYNC and VGA_VSYNC, respectively.VGA color signals are controlled by U1. When /VGA is low, /VGA_COLOR controls whether IN_RED/GREEN/BLUE or IN_MONO is connected. When /VGA is high, they are not connected. The series resistors/potentiometers R1-R3 are used in series with the signal to attenuate the red/green/blue from Atari to VGA levels. The series resistors/potentiometers R4-R6 do the same for the monochrome video signal, and also control monochrome tinting.Atari 13-pin DIN output color and monochrome video signals are controlled by U3. Note that it is in 4PST configuration (compared to 3PDT for U1). Whenever /ATARI is low, IN_RED/GREEN/BLUE/MONO are connected to ATARI_RED/GREEN/BLUE/MONO, respectively.Because the Atari +12V output is through a 2k resistor (R431), we can draw only about 3mA before the voltage drop over it is 6V, and we only see about 6V on the +12V input. I am not sure if 3mA is sufficient for this circuit. The OnSemi LM2931AT-5.0G I added to the schematic is relatively cheap, in an easily cooled TO-220 package (the metal tab is ground), and can handle any input voltage between 6V and 24V. I suggest using a jumper to a pin header, so that you can supply that externally instead of from the Atari.I personally would also add pads for 0.1µF = 100nF supply bypass capacitors between the VCC and GND pins of basically all ICs. They are likely not needed, but can help andmightbe needed, so although I left them out from the schematic, I do believe I'd put them on the PCB.Also, the connectors are rather large, making the PCB needed surprisingly large. The components fit in quite small area, especially if you use a four-layer PCB.

author: analogix
author_rank: Frequent Contributor
timestamp: December 12, 2024, 09:34:46 am
content: Quote from: Nominal Animal on December 02, 2024, 09:36:21 pmThanks for sharing, and for explaining how it works.Concerning parts count, board space, cost and efficiency this seems to be a well thought out solution, but my head is spinning!It's just that every time I've finally understood something we seem to start all over again with yet an improved redesign, which means I have to relearn everything again instead of just completing it.This is why I want to stick with the 4x TS5V330 design inreply #72.There are still a few things I'm not 100% sure is correct in that design, but during this thread I've had several eye-opening "aha!" moments learning from yourself and others about how MUX chips work and likewise, inverters. I think the concept of enabling/disabling a whole MUX and the ability to invert a logic signal are both ingenious things to know about, so I greatly appreciate learning that. It'll come in handy for other projects too.I also think your way of solving the connections from the slide switch with the pullup resistors is a great way to do it, and yet something new learnt that I can put to use in other projects!OK, so I believe I have a basically functioning schematic with the MUXes, and if the wiring is correct with the 74AHC86 inverter (U5) and the 3-way slide switch I should have the correct logic control signals for the opposite enables of the Atari and VGA MUX chips. Does it look OK to you?Regarding the parts count, parts cost and power usage:I will be replacing the original Atari power supply with a better and more powerful one, so it'll be much easier to take power to this board directly from it than trying to find ways to deal with the very limiting +12V supply from the DIN13 connector. I will just pass on that line (DIN13 pinto the new DIN13 connector untouched.Since the Atari ST has a dual voltage power supply (+12V and +5V) I can really just use the +5V line for this board, making the 78L05 voltage regulator (IC1) unnecessary.I don't worry too much about the costs as there aren't that many parts here and there really aren't any extreme costs involved. I'd rather just get the project done.I also understand that there are many ways of improving upon it (as you've shown many times already), and I appreciate that, but I'd rather have an understanding of a simpler circuit than scratching my head over an ideal solution. If it does what it's supposed to do without incurring undesirable side-effects or problems I'm good.QuoteGood suggestions, and useful info for similar situations. I appreciate your explanations -I'm learning all the timeBut with a direct connection to the +5V of the power supply we needn't worry about the 3mA limitations here.Can I connect the +5V directly from the power supply to this board, or do I need some current limiting resistors or something first?QuoteGreat idea! with SMD capacitors those pads won't take up much extra space anyway.Is that ot minimize induction, as the wire traces of the PCB can act as induction coils and cause power "noise" and other problems?QuoteI can't make 4-layer PCBs with Eagle. But 2-layers should do fine?I don't want to make the PCB anywiderthan necessary, but should contain the VGA connector, 13-pin DIN connector and the slide-switch between them. That's on one end of the PCB, and probably with 2 or 3 reinforced holes for screws and metal brackets (so it can be firmly fastened to the rear panel of the 19" rack enclosure). I think the VGA connector also allows for its own screws to mount through the rack panel, so that should greatly help with stability when inserting/removing the mating monitor connectors on the other side.As for thedepthof the PCB I don't think of any limitations other than that of Eagle's free version limits (off my head I think it's around 10x8 or 10x10cm or something), which will probably be doable. There should be a lot of free horizontal space available inside the 19" rack enclosure for this and other boards.

author: Nominal Animal
author_rank: Super Contributor
timestamp: December 13, 2024, 01:58:20 pm
content: Quote from: analogix on December 12, 2024, 09:34:46 amDo not learndetails, learn the reasoning behind the choices!For example, there are many possibilities on how to control the sync signals. If we look at the schematic inreply #73, I realized that if we have active-low signals for 1) Atari output, 2) VGA color or mono output, and 3) VGA color output, we only need two analog switches (TS5V330), and a single 74HCS125 suffices for the sync signals. 74HCS125 is a quadruple tri-state buffer with Schmitt trigger inputs at TTL logic levels, meaning it is just about perfect for buffering and enabling/disabling 5V TTL level signals like the sync signals are.What would change if we replaced the 74HCS125 with say four SN74LVC1G125's? Nothing much; the latter do not have Schmitt trigger inputs, which means that if the input voltages are not clearly TTL level (low if below 0.8V, high if above 2.0V; so between 0.8V and 2.0V) extra current may be drawn in the '1G125s.What would change if we replaced the 74HCS125 with four Diodes, Inc.74AHCT1G125W5-7's?Nothing at all. The Diodes, Inc. variant of AHCT1G125 has Schmitt trigger inputs with TTL input levels. Aside from details like maximum current draw per output pin and such, these are interchangeable.This is the exact reason I vary my suggestions. Getting fixated with specific components is not a good idea; you want to learn the rule behind the component selection! Here, for the sync signals, we needactive lowenable signal (which means it will havethree-state outputs, the third state being "disabled" or "high-Z"),TTLlogic levels, and preferablySchmitt triggerinputs for most robust control of the sync signals. The difference is the same as between memorizing and understanding a text book on something. The former gets you past the tests, but doesn't enable you to create anything new. And I only help, because I want others to create something newbetterthan before.(Wecouldalso useactive highenable for the VGA sync outputs, because /ATARI is HIGH in both VGA output modes. So, two AHCT1G125 plus two AHCT1G126 –– the two only differ by the polarity of the enable signal –– from Diodes, Inc. would also work.)How the analog video signals are routed/switched is a completely separate decision, and does not affect how you deal with the sync signals.I much prefer the amplifier-as-a-switch approach, because it allowssimultaneousoutput on all connectors, and just seems more robust to me. This is because video amplifiers passes input to output, amplifying the output, but nothing in the output passes back to input. Analog video switches and muxes, on the other hand, onlyconnectthe input to output, as if it they were connected by wires, so everything on the output side will affect the input side also. The reason analog video switches and muxes do work well in this particular case is that the video signals generated on the Atari need to be attenuated a bit to get down to VGA levels.Quote from: analogix on December 12, 2024, 09:34:46 amI think apolyfuse, or Polymeric Positive Temperature Coefficient (PPTC) device on the input, would be a good idea. Something like a 50mA/150mA one, perhaps a Yageo SMD1206B005TF. Element14 has a pretty goodguide to resettable fusesthat explain how they work.Basically, they are a resistive devices that pass currents up to theholding current(50mA for the Yageo) like a low-value resistor (3.6Ω and 50Ω for the Yageo, depending on the ambient temperature and current it is passing, and how long since it tripped last). When the current is exceeded for long enough, ittrips, its resistance becoming very high, and thus dropping the current. When the circuit is turned off, the PPTC recovers by itself, essentially resetting itself. These are basically used for short circuit protection, but they're not instant. If one triggers many times, you may wish to replace it, as the trip currents and so on will be affected.Another option is to have a say +7V supply that you linearly regulate to +5V wherever +5V is needed; with just input and output capacitors and a linear regulator (low-noise, low drop or LDO type). Linear regulators have a property calledcommon mode rejection ratio, often expressed in decibels, which refers to how much ripple and noise is passed from input to the output. 60dB CMRR means that if the peak amplitude of such is 1V on the input, it is seen in the output with peak amplitude of at most 1mV. (This is because 60dB corresponds to 1000:1 ratio in amplitudes.)Since the regulators drop only about 2V, at say 100mA of current only 2V×0.1A = 0.2W of waste heat is generated.This way, noise in one 5V circuit is not passed to other 5V circuits (because each regulates their own one from the common +7V supply), but not too much power is turned into waste heat.I know others (jepSTone.net) have usedMean Well RPD-60Afor Atari STe supply.I personally might consider using aRPS-30-15linearly regulated to 12V, and aRPS-45-7.5linearly regulated to 5V, although I do admit it is overkill; and some kind of aluminium heatsink would definitely be needed for the regulators. I just like the idea of very low noise, very stable power rails...Quote from: analogix on December 12, 2024, 09:34:46 amNo, they literally behave as local charge storage. You see, we're using transistor-based circuits here, where current draw changes whenever the signals change state. This means the current draw from the +5V supply varies based on the signal. Without local bypass capacitors, the current draw fluctuations affect the voltage on the supply rail, affecting the +5V VCC of other chips. With bypass capacitors, the peak current draw is topped up from the capacitor, "smoothing out" the noise otherwise generated on the supply rail.This is also why the capacitors need to be very close to the ICs, preferably within a couple of millimeters. They also don't need to have huge capacitances; 0.1µF = 100nF is extremely common. Sometimes you see larger ones, for example 1µF to 10µF, with for example microcontrollers, since they do a lot of digital switching. (There are entire threads on bypass capacitor selection here at EEVblog forums, including why some use a large and a small capacitor for bypassing; and misconceptions related to that.)Quote from: analogix on December 12, 2024, 09:34:46 amYeah. I do recommend using M2.5 or M3 nylon standoffs; you can get kits from e.g. AliExpress. The through-hole is then 2.5mm or 3.0mm in diameter.You could consider not mounting the connectors on the PCB, and instead solder the cables directly to the board, and have the connectors on some kind of panel. The downside is that the solder joints do tend to break off, if the cable moves too much/often (due to metal fatigue, and the solder wicking up the signal wire making it stiffer, forming a weak point immediately after the stiff part because that tends to flex most when the cable moves).Or you could do separate connector PCBs, that connect to the main switching PCB via a ribbon cable or male-female headers, or even directly soldered.Note that for the schematics in this thread, I've used the free onlineEasyEdaeditor.

author: Nominal Animal
author_rank: Super Contributor
timestamp: December 14, 2024, 07:55:44 am
content: I've been toldherethat the way I've drawn these schematics is too ugly to publish, so I will not be doing anything further on this.I hope those members will help you further on this, as the way I've done is apparently too horrible to show in public. I wouldn't hold my breath, though.

author: analogix
author_rank: Frequent Contributor
timestamp: December 17, 2024, 07:38:04 pm
content: Quote from: Nominal Animal on December 13, 2024, 01:58:20 pmWell said, and I agreeI've definitely learnt a lot of new things from this thread; many things which I think I can apply to my next project (output selector boards for the Atari STe cartridge port, serial port and ACSI port -the knowledge about multiplexers and the ability to enable/disable them is key here).I keep re-reading your posts because many of these concepts are new to me, and all that information is overwhelming, but taking it slow and repeating helps. The good thing is that I'm starting to understand several things now which were totally incomprehensible a few weeks backYou've been very good at explaining things, but a lot of concepts still take time to "get", then again that's just the way it is.So now I'm left with a multitude of choices....Initially I decided to go for the 4x TS5V330 solution (as in myschematic in post #72) because it's based on a tried and working design (Ubeswitch), it's clear and understandable even by me, and it should do what it's supposed to. It's even got 3 unused MUX switches which I will put to good use as LED indicators which also aid in troubleshooting in case it won't work as intended.But..... I'm open for changes, if it's for the better, andin post #57 you wrote(red colouring of text is by me):QuoteApart from easier routing I think I also read somewhere (in one of the multiplexer datasheets?) that it's critical to place the sync signal traces correctly on the PCB. I may not have understood it correctly, but was under the impression that routing the sync signals (or one of them) should be done in a specific way as to not cause intereference or signal loss. If using separate chips for sync means less chance of problems I'm all for that.UPDATE: I found the source (or one of them at least). It's from theTMUX1104 multiplexer datasheet, where on page 25 talks about design guidelines (see attachement below). Are these applicable for my use when working with video signals?I also finally understood that your suggestions include an "all in one" solution for the buffering the sync signals and simultaneously be able to switch them (i.e. a buffer chip with an enable pin).I see that in my latest schematic (post #72) I've added two 74AHCT1G126 chips, but following your comments there are better solutions which include Schmitt triggering, so I should replace those anyway.But I have a question: in my schematic those '1G126 buffers are attachedafterthe TS5V330 multiplexer which means I will already have a MUX-switch resistance before buffering. Will this degrade the signal, or doesn't it matter since the buffer chip "regenerates" the signal again anyway?On the other hand, if I go for one of the buffers you suggested which have a Schmitt trigger AND an enable pin, that means bypassing the resistance of the multiplexer, and still being able to control the sync signal passing through it. I didn't find any information in their datasheets about the Ron value (multiplexer switch resistance), so does it mean they act differently from a multiplexer and don't incur any added resistance?QuoteGood idea!So in case there's an electrical problem with my circuit (i.e. short circuit) the PPTC fuse will blow, giving me a chance to troubleshoot before it damages everything on the vidoe output board (and possibly also causing the power supply's own fuse to blow)?I suppose it's important to first measure the current draw of the board when fully assembled, in order to choose the PPTC fuse's suitable tripping current?QuoteThanks for the link. Hadn't seen that one yet.I see that there are several power supply replacement options available, and fortunately I'm not limited by its physical size as most other Atari ST owners are since I won't be fitting it inside the original Atari STe enclosure, but a 19" rack.This Atari I'm working on will not only have this video output board added to it, but also several other hardware add-ons, so I suppose in the end I need to figure out how much current everything draws and then choose a replacement power supply based on that.

author: analogix
author_rank: Frequent Contributor
timestamp: January 10, 2025, 05:40:07 pm
content: NOTE: I'm the OP and had a related question to this project which I posted here:Computer/online tool for simulating logic signals?SinceI received a reply directly pointing back to the subject discussed hereI've decided to post the reply below:Quote from: ledtester on January 09, 2025, 05:01:43 pmThanks for confirming. I found theSN74LVC1G14DBVR(single inverter with Schmitt trigger) to be suitable for this.I've added it to my schematic (see attachement below) with the appropriate changes (replacing the 74AHCT126 buffers with 74AHCT125 with new connections for enabling them with the opposite logic level as before).I've also added the Mono_Detect line to the slide switch (which I've also replaced in the schematic with the actual DP3T switch I'm thinking about ordering) in order to set the computer to the correct display output mode (monochrome or colour) with it forced to LOW (GND) for VGA-mono output and passed it along to the new DIN13 connector for Atari output (where the Atari colour or Atari monochrome monitor attached handles connecting Mono_Detect to GND (Atari mono monitor) or leaving it unattached (Atari colour monitor) internally inside those monitors).Finally I've also added 3 LEDs (one for each switch setting) by using the HIGH and LOW signals unique to each display setting and attaching each LED's polarity appropriately to that, through a current limiting resistor. I hope I got it right.Oh, I've also added pullup resistors for the multiplexer and buffer chips as suggested in their datasheets, and 0.1uF bypass capacitors for all ICs. I'm at loss for the values of the pullup resistors though -the datasheets don't give an exact value for this. Suggestions anyone?Pulldown resistors have also been added to the unused U1 and U2 multiplexer (TS5V330C) output pins through 50 Ohm resistors as suggested here (Texas Instruments multiplexer forum:  What to do with Unused Pins & Exposed Thermal Pads?).QuoteYes, I was looking for simplifying and lowering the cost of my BOM.Plus, as a beginner, challenging myself to properly understanding the design (which I've received a lot of help in this thread for) and making new decisions based on that infoQuoteThanks for the suggestion on the 'HCT244. So these essentially improve the signals passing through, similar to buffer chips?If I remember correctly I had initially decided on adding another TS5V330 to each of the two outputs, but was (inpost #57) suggested that I use one of those smaller chips for more flexibility in terms of placement/routing. And with an additional TS5V330 I'd need to add extra ICs after the switching for buffering, wouldn't I? As far as I can see the TS5V330 doesn't have built-in buffering (the TS5V522C however, which I also considered, has 5 SPDT switches (unlike the 4 of the TS5V330) and two of them have built-in buffering for HSYNC and VSYNC signals).As for the 74AHCT125 I also thought it was pretty cool that they included an "enable" feature, so it would work both as a buffer and a multiplexer.QuoteThe two-buffer version (74AHCT2G125) had been suggested to me earlier (post #51), and later suggested that I go with the single-buffer version (post #57) because that would make routing easier, particularly around the DIN13 Atari output connector.That SN74HCT125 (4-buffer) chip you mention is pretty cool. I wasn't aware of it, but will keep it in mind for similar projects! Thanks for letting me know about it.Later (post #70) it was suggested that I got for a version of those chips having Schmitt triggeringwhich is why I've now used four pcs. 74LVC1G125DCKR (actuallyNominal Animalsuggested 74LVC1G125DBVR, but I think I landed upon the "DCKR" because of pricing, or I just didn't search well enough -I'll look into that before ordering the components).Update: I've now used 4x Texas InstrumentsSN74LVC1G125DBVRin my schematic (U20, U22, U10, U11) as suggested earlier byNominal Animal. I think that version is a little physically bigger and less challenging to hand-solder.Update 2: I'm a little confused about that particular chip (from Texas Instruments) because the datasheet mentions nothing about it having Schmitt triggering, and shouldn't there also be TTL compatibility? I might just use theNexperia 74LVC1G125GV(also suggested byNominal Animal, as another alternative) instead, because, according to its datasheet, has both TTL compatibility and Schmitt triggering.