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.So 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.
https://www.analog.com/media/en/technical-documentation/data-sheets/MAX4885.pdf (https://www.analog.com/media/en/technical-documentation/data-sheets/MAX4885.pdf)
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.
So 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.
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.
What 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?
https://www.analog.com/media/en/technical-documentation/data-sheets/MAX4885.pdf (https://www.analog.com/media/en/technical-documentation/data-sheets/MAX4885.pdf)
That 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.
QuoteSo 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.
Yes, 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 KHz
As 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).
You got your 2 H-scan rates backwards and I am not sure about the 50hz Vsync...
The big question is if I actually need multiplexing circuitry for my application.1P:4T, 2 in sets in 1 chip exist like the 74HC4052.
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.
(Attachment Link)
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.
(Attachment Link)
1P: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...)
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: MAX4634EUB
Cheaper TI equivalent: TMUX1104 (Same specs as the Maxim part)
However, 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.
Ah! I totally missed the "COM" pins :palm: I 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?
Wow! Hugely better than the 60 Ohms of the 74HC4052. Still, will there be noticeable signal degradation with 60 Ohms?
Yes, I think I understand the basic concept a little better now. Do other MUX chips work much in the same way?For analog capable MUXs, yes they all work in a similar fashion.
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.
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:
QuoteYes, I think I understand the basic concept a little better now. Do other MUX chips work much in the same way?For 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.
Like this:
This way, you only get 3 ohm impedance instead of using 2 switches in series where you get 6 ohm impedance.
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.
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.
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.
Can [TQFN be soldered by hand]?If 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.
which companies do [PCB manufacturing and assembly]I use EasyEDA (https://easyeda.com/) or KiCAD to design my own PCBs. EasyEDA directly interfaces to JLCPCB (https://jlcpcb.com/) for PCB manufacturing and optionally SMD assembly, but for assembly you need to use their parts catalog (https://jlcpcb.com/parts/) (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.
Can TQFN be soldered by hand]?If 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.
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!
which companies do [PCB manufacturing and assembly]I use EasyEDA (https://easyeda.com/) or KiCAD to design my own PCBs. EasyEDA directly interfaces to JLCPCB (https://jlcpcb.com/) for PCB manufacturing and optionally SMD assembly, but for assembly you need to use their parts catalog (https://jlcpcb.com/parts/) (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 any max4885 in stock (https://jlcpcb.com/parts/componentSearch?searchTxt=max4885) right now.
PCBWay (https://www.pcbway.com/) is 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.
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)?Sure.
Do you know if the MAX4885 is a common component which is usually easy to order along with PCBs?Well, LCSC/JLCPCB did supply EasyEDA with the footprints, so it isn't rare.
Are you referring to ten of the same PCBs when ordering at those prices? I probably only need one (but a spare or two won't hurt, being unexperienced at this).Yep, 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).
Do you know if the MAX4885 is a common component which is usually easy to order along with PCBs?Well, LCSC/JLCPCB did supply EasyEDA with the footprints, so it isn't rare.
However, I would reconsider the choice, and look at TI TS5V522CPWR (https://www.ti.com/lit/ds/symlink/ts5v522c.pdf)+74CBT3257C (https://www.ti.com/lit/ds/symlink/sn74cbt3257c.pdf) as 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.
Do they (or other low-cost PCB manufacturers suitable for hobbyists) have a search function for which components they can supply?Yes, but it is a bit wonky: jlcpcb.com/parts (https://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.
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.Exactly. 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).
How can I find the bandwidth requirement for the Atari ST video output?TI AN-944 (https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/388/Signal-Bandwidth-vs.-Resolution-for-analog-Video.pdf) explains this.
so perhaps your solution with multiple chips is the way to go.Just 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.
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.
What I would do if I were you, right now, is a table (spreadsheet, I use LibreOffice Calc). Allocate one column for each output connector pin. 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.
You're referring to the logic control of the MUX chips here, right?Yes, exactly.
(https://www.eevblog.com/forum/index.php?action=dlattach;topic=438093.0;attach=2397365;image)That'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.
That'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 to learn instead 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.
What I've done is create a table which shows all the connections of all three modes, but maybe that's not it?Here's what I was hoping to see, based on your initial schematic:
║ 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 11
Atari ║ M │ D │ H │ V │ R │ G │ B ║ │ │ │ │ │ │ │ ║ D = DIN13 pin 4
────────╫───┼───┼───┼───┼───┼───┼───╫───┼───┼───┼───┼───┼───┼───┼───╣ H = DIN13 pin 9
VGAMono ║ │ │ │ │ │ │ ║ H │ V │ │ │ │ R │ G │ B ║ V = DIN13 pin 12
────────╫───┼───┼───┼───┼───┼───┼───╫───┼───┼───┼───┼───┼───┼───┼───╣ R = DIN13 pin 7
VGA ║ │ │ │ │ │ │ ║ 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. Input D ║ Atari DIN13 Output ║ VGA Output ║
Mode ║ ║ M │ D │ H │ V │ R │ G │ B ║ H │ V │ R │ G │ B ║ Inputs:
════════╬═══╬═══╪═══╪═══╪═══╪═══╪═══╪═══╬═══╪═══╪═══╪═══╪═══╣ M = DIN13 pin 11
Atari ║ ║ M │ D │ H │ V │ R │ G │ B ║ │ │ │ │ ║ D = DIN13 pin 4
────────╫───╫───┼───┼───┼───┼───┼───┼───╫───┼───┼───┼───┼───╣ H = DIN13 pin 9
VGAMono ║Gnd║ │ │ │ │ │ │ ║ H │ V │ M │ M │ M ║ V = DIN13 pin 12
────────╫───╫───┼───┼───┼───┼───┼───┼───╫───┼───┼───┼───┼───╣ R = DIN13 pin 7
VGA ║ ║ │ │ │ │ │ │ ║ 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.)Have you checked out ubeswitch mk6 (https://github.com/planeturban/ubeswitchmk6/tree/master)?
Here's what I was hoping to see, based on your initial schematic:Code: [Select]║ Atari DIN13 Output ║ VGA Output │ (Mono) ║This 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.
Mode ║ M │ D │ H │ V │ R │ G │ B ║ H │ V │ R │ G │ B │ r │ g │ b ║ Inputs:
════════╬═══╪═══╪═══╪═══╪═══╪═══╪═══╬═══╪═══╪═══╪═══╪═══╪═══╪═══╪═══╣ M = DIN13 pin 11
Atari ║ M │ D │ H │ V │ R │ G │ B ║ │ │ │ │ │ │ │ ║ D = DIN13 pin 4
────────╫───┼───┼───┼───┼───┼───┼───╫───┼───┼───┼───┼───┼───┼───┼───╣ H = DIN13 pin 9
VGAMono ║ │ │ │ │ │ │ ║ H │ V │ │ │ │ R │ G │ B ║ V = DIN13 pin 12
────────╫───┼───┼───┼───┼───┼───┼───╫───┼───┼───┼───┼───┼───┼───┼───╣ R = DIN13 pin 7
VGA ║ │ │ │ │ │ │ ║ H │ V │ R │ G │ B │ │ │ ║ G = DIN13 pin 6
────────╨───┴───┴───┴───┴───┴───┴───╨───┴───┴───┴───┴───┴───┴───┴───╜ B = DIN13 pin 10
According to this post (https://www.atari-forum.com/viewtopic.php?t=31893), Atari outputs only Mono signal in mono mode (not R, G, B signals), and the input DIN13 pin 4 needs to grounded to enable Mono mode (floating otherwise)
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.
Attached is a more complete schematic.
is [the more complete schematic] just a different way to do it compared to the diagrams I've enclosed in this postingIn 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.
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.
..........
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.
Thanks! Yes, I do believe we are in full agreement.
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...
Also pay attention to all the other GNDs.
On the other hand, the TS5V522C (https://www2.mouser.com/ProductDetail/Texas-Instruments/TS5V522CPWR?qs=THnoWt2ah2CWerjFhbx57A%3D%3D) (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.The one issue I see is the impedance on the monochrome video signal when converting to VGA.
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:Why do you believe using a single IC for switching the entire set of signals is better than two or more ICs?
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?I believe any analog switch will have worse visual quality than the THS7374 video amplifiers.
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?No. 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.)
I tried to find out more and came across this thread (https://www.pcreview.co.uk/threads/what-is-pin-9-on-a-vga-cable.4016582/) where several people warn against using it.With 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)
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.
On the other hand, the TS5V522C (https://www2.mouser.com/ProductDetail/Texas-Instruments/TS5V522CPWR?qs=THnoWt2ah2CWerjFhbx57A%3D%3D) (5-channel, 2-way MUX) seems very similar, but has an additional channel and built in H-sync and V-sync buffering.
The one issue I see is the impedance on the monochrome video signal when converting to VGA.
Without the monochrome signal or mixing, the 5-channel switches (for RGB signals only) would be perfect.
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:Why 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.
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!
I tried to find out more and came across this thread (https://www.pcreview.co.uk/threads/what-is-pin-9-on-a-vga-cable.4016582/) where several people warn against using it.With 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)
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.
Will the TS5V522 behave differently on this than the TS5V330?No, you're right, and my worry misplaced: it will work. I forgot about the Ubeswitch!
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
That'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.QuoteWhy do you believe using a single IC for switching the entire set of signals is better than two or more ICs?Stuck 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.
Aha! This was something I was wondering about (but afraid to ask)...Right! :-+
So R,G,B and monochrome are analog while the two sync lines are digital?
How about mono-detect?
No, 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 often appears I'm more knowledgeable than I am. Plus, I'm overly verbose: my posts are too long for many to read.QuoteI wish I could explain this better... or that some of the more experienced members would step in and explain it better than I can!Nothing 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.Even 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:
It now contains 75 Ohm resistors for the R,G, B linesYou 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.
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.If 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.
Will the TS5V522 behave differently on this than the TS5V330?No, you're right, and my worry misplaced: it will work. I forgot about the Ubeswitch!
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
I particularly like Hammond cast-aluminium enclosures, and would target 1590BB (https://www.hammfg.com/files/parts/pdf/1590BB.pdf) for this.
No, 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 often appears I'm more knowledgeable than I am. Plus, I'm overly verbose: my posts are too long for many to read.QuoteI wish I could explain this better... or that some of the more experienced members would step in and explain it better than I can!Nothing wrong with your explanations. In fact they're very detailed and well worded!
Even though it makes this post yet another wall of text, let me walk you through.
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.Right; I fully trust you regarding your needs, definitely over my own suggestions! ;D
So.... in theory at least it looks like my schematic will work.If you omitted the series resistors R1, R2, R3, and possibly the tint pots R4, R5, R6, I definitely agree it should work.
I'm trying to catch up on the 75 Ohm impedance thing, which is kind of confusing as different sources say different things.The key is that when you use switches, you only convey the 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.
Like, in the Ubeswitch there aren't any resistors at all to balance out the impedanceThat is because it uses switches/multiplexers instead of amplifiers, and thus needs to minimize the on-state resistance.
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.Yes. 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.
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?No, the '2G241 (in reply #42 (https://www.eevblog.com/forum/beginners/vga-display-switching-with-debouncermultiplexerbuffer-circuitry/msg5680779/#msg5680779) and #51 (https://www.eevblog.com/forum/beginners/vga-display-switching-with-debouncermultiplexerbuffer-circuitry/msg5682393/#msg5682393)) buffer the digital sync signals.
Here are the signals I need for each of the 3 modes:Let's say you use a similar circuit with the slide switch as in my reply #42 (https://www.eevblog.com/forum/beginners/vga-display-switching-with-debouncermultiplexerbuffer-circuitry/msg5680779/#msg5680779): 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.(https://www.eevblog.com/forum/index.php?action=dlattach;topic=438093.0;attach=2417995;image)
(Click to embiggen)
If you omitted the series resistors R1, R2, R3, and possibly the tint pots R4, R5, R6, I definitely agree it should work.
The key is that when you use switches, you only convey the 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.
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.
Right; this means that the signal amplitude on the Atari is too high, and must be attenuated by a series resistor for VGA.If you omitted the series resistors R1, R2, R3, and possibly the tint pots R4, R5, R6, I definitely agree it should work.
All "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.
Is this where you're saying there's a problem, or by having resistors for the R,G,B and monochrome outputs at all?R1, R2, R3 being 75Ω looks incorrect to me.
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.It 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).
Good.QuoteThe key is that when you use switches, you only convey the 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.
Aha! 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 because this variation of the Ubeswitch (https://www.atari-forum.com/viewtopic.php?t=41068) has indeed got termination resistors.No, 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 uses Rₛ = 150Ω.
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?Buffer = 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.
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?
Is this where you're saying there's a problem, or by having resistors for the R,G,B and monochrome outputs at all?R1, 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?
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.
I do actually have an oscilloscope (that I built from a kit). It's a JYEtech DSO-150 (https://jyetech.com/dso-150-shell-oscilloscope/) single channel type, but its bandwidth is only 200 KHz. Is it unsuitable for this measurement?Actually, 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 you Ve (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.
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?Only Red, Green, Blue, Monochrome video, and Composite video need to be 75Ω. If you don't mind bulky, 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).
Only Red, Green, Blue, Monochrome video, and Composite video need to be 75Ω.
If you don't mind bulky, 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.
Thus, I would use the shields for GND, yes, but also have a dedicated copper wire for the GND.
So Hsync and Vsync don't need a 75 Ohm connection (because they're digital signals)?Exactly. 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.
What do you mean by "terminate" at the connectors?Apologies, I worded myself horribly badly.
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.Yup, that works well for a single cable.
You mean like this?Yes, this is exactly how I'd do it.
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.
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?I can do that, but I want to make sure you understand the difference between my suggested approach and yours, the difference between video amplifiers and video switches, first.
I've also included the Hsync/Vsync buffer (74HCT14) which is taken from one of the Ubeswitch variantsYup. 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.
multiple optionsDefinitely. 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.
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.
(Atari) | (VGA color) | (VGA mono) | |
| Active-low signal | Position 1 | Position 2 | Position 3 |
| MODE_ATARI | GND | +5V | +5V |
| MODE_VGA | +5V | GND | GND |
| MODE_VGA_COLOR | +5V | GND | +5V |
| MODE_VGA_MONO | +5V | +5V | GND |
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.
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.
Attached is my version of the mux/switch-based switch.
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 and might be 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.
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.Do not learn details, learn the reasoning behind the choices!
Can I connect the +5V directly from the power supply to this board, or do I need some current limiting resistors or something first?I think a polyfuse, 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 good guide to resettable fuses (https://community.element14.com/technologies/experts/b/comprehensive-guides/posts/a-comprehensive-guide-to-resettable-fuses) that explain how they work.
[Do bypass capacitors] minimize induction, as the wire traces of the PCB can act as induction coils and cause power "noise" and other problems?No, 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.
I can't make 4-layer PCBs with Eagle. But 2-layers should do fine?Yeah. 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.
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 new better than before.
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 any user-visible difference? No, I don't think so.
Can I connect the +5V directly from the power supply to this board, or do I need some current limiting resistors or something first?I think a polyfuse, 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.
I know others (jepSTone.net (https://jepstone.net/atarist/power-supply/2022/06/02/atari-st-power-supplies.html)) have used Mean Well RPD-60A (https://www.meanwellusa.com/productPdf.aspx?i=619#1) for Atari STe supply.
I personally might consider using a RPS-30-15 (https://www.meanwellusa.com/webapp/product/search.aspx?prod=RPS-30) linearly regulated to 12V, and a RPS-45-7.5 (https://www.meanwellusa.com/webapp/product/search.aspx?prod=RPS-45) linearly 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...
But one thing still puzzles me regarding the logic control signals.
I've read about the basics of logic gates (https://www.build-electronic-circuits.com/logic-gates/), and while the 74AHC86 (U7) is an XOR gate, couldn't I just use a NOT gate instead (to invert the "enable" signals between the Atari and VGA multiplexers)?
Yes.
QuoteIn the current schematic, the VGA side uses 74AHCT126 buffers (which are the same as the Atari side's 74AHCT125 buffers, except they get enabled with the opposite logic signal).
So with a NOT gate, why not just use 74AHCT125 buffers there as well, having its "enable" pins connected to the VGA multiplexer's (U1) enable pin? Or is there something I've missed, and there's a specific reason the XOR gate is chosen as an inverter?
Yes, you could have U5, U6, U3 and U4 all be the same type of buffer (either '125s or '126s) and drive them with the appropriate logic signal. This could simplify your bill of materials.
There are other "bus transceiver" chips which also might work for U3 - U6, such as the '244:
https://www.ti.com/product/SN74HCT244 (https://www.ti.com/product/SN74HCT244)
Or even possibly use additional TS5V330PWR's in place of the '125s and '126s.
Note that the schematic uses single gate versions of the '125 and '126, but you can get four of these buffers on a single chip which might work for this application:
https://www.ti.com/lit/ds/symlink/sn74hct125.pdf (https://www.ti.com/lit/ds/symlink/sn74hct125.pdf)
It's all a matter of balancing cost, availability, board space, routing, etc.