Role of the transistor in this sync combiner circuit?

The place for all discussion on gaming hardware
Post Reply
nes.og
Posts: 128
Joined: Sat Apr 04, 2020 7:01 pm

Role of the transistor in this sync combiner circuit?

Post by nes.og »

Can anyone explain the role of the transistor in this sync combiner circuit?

https://www.retrorgb.com/building-a-pas ... biner.html

I’m also wondering how it can output both TTL and 75 ohm levels simultaneously with no switch/jumper to select?

It notes:

“R4 is technically optional, but allows the C output to drive into both HIGH-Z (TTL) and 75Ω terminated inputs. If it’s removed, you can simplify the construction by not having to tap into the ground node, but then only driving into 75Ω terminated inputs will work”

Input is appreciate, thanks.
User avatar
NewSchoolBoxer
Posts: 369
Joined: Fri Jun 21, 2019 2:53 pm
Location: Atlanta, GA

Re: Role of the transistor in this sync combiner circuit?

Post by NewSchoolBoxer »

Thanks for bringing this to my attention. It's a bad design that no one should use, let alone tell others to use, and I don't mean because it's an "and" gate over the superior "xnor" gate approach. Giving Ste whom I don't know some credit, he doesn't show this "and" design in the linked part 2 article even when I bring up oldest archive.org version. His "xnor gate" circuit given looks good and uses ICs versus individual transistors. Unfortunately, we never got part 3 nor the simulated circuit to download. I'd like those 74LV SPICE models.

All these logic gate solutions require TTL input with bi-level sync, meaning no 75 ohm level or HD (720p/1080i/1080p) sync input that is tri-level.

Transistor Switching
Spoiler
I guess I wanted a long weekend project so let me explain. The circuit uses an NPN BJT transistor as a switch for an "and" gate. Transistors have two basic purposes: to operate as a switch and to amplify voltage/current with an external power source. The amplification part is usually much better suited by op-amps (that contain transistors) for temperature stability, simplicity of design, among other reasons. The switching part, a single transistor is still useful and very cheap.

Basic switching with an NPN BJT transistor begins with the top pin, the collector, which is the power source. The left pin, the base, turns the switch on when it has enough current and off at zero or close enough to zero. The output is the bottom pin, the emitter. Keep powered and when you want the switch on, such as to light up LEDs, feed it enough current at the base with the LEDs connected off the emitter. While a simplification, it's enough to say that the gate being on means to pass the power from the collector to the emitter.

With a few transistors, you can make any MOSFET logic gate you want. You're also forced to use resistors and/or diodes for BJT logic gates. The "and" gate means only give a high output if both inputs are high, which tends to mean 3-5V. Sending 0V / no voltage at either or both inputs gives 0V output. In this case, the inputs are the horizontal and vertical sync signals. BJT triggering on high current instead of high voltage is close enough.
Why the design is bad:
Spoiler
-Uses vertical sync as both the sole power source and one of the inputs.
-Cannot preserve enough voltage for proper TTL level output but description states that it can.
-Transistor being powered on and off 30 times a second NTSC and 25 times a second PAL creates more switching noise than from keeping it on.
-BJTs use more power than MOSFETs.
-BJTs have a significant Vce voltage drop that prevents achieving TTL level sync.
-Relatively high current from the 100 ohm resistor that is forced way below 1k ohm to keep the output voltage up to an acceptable level. The higher current generates more heat and more EMI than necessary and a higher Vce loss as well.
When BJT is better than MOSFET:
Spoiler
-General use BJTs cost 20-30 cents in an individual IC versus MOSFET at 30-50 cents but that small cost is irrelevant here.
-BJTs are better as switches when you need high gain, current control, gain with minimum power used or else to cut design costs ever so slightly. We need none of these except for gain for compensating for BJT voltage drop. Can use a $1 "and" 74LV IC made of MOSFETs instead, else 6x MOSFETs to avoid unstable transistor gain or a more expensive op-amp.
-BJTs have lower parasitic capacitance and therefore switch faster at equal size. In modern times, MOSFETs can be made many times smaller to get around this and switch faster. Downside to smaller transistors is you reduce how much voltage they can handle. Thus one reason for the rise of 2.5-3.3V logic.
I get the point of the design being clever from not needing an external power source but we have the +5V line on, I think, everything that can produce external sync but Jaguar and external power from batteries or AC outlet can provide cleaner power than from the console, especially the console's own sync.
I’m also wondering how it can output both TTL and 75 ohm levels simultaneously with no switch/jumper to select?

It notes:

“R4 is technically optional, but allows the C output to drive into both HIGH-Z (TTL) and 75Ω terminated inputs. If it’s removed, you can simplify the construction by not having to tap into the ground node, but then only driving into 75Ω terminated inputs will work”

Input is appreciate, thanks.
You can passively split a line as many ways as you want and equal voltage will flow through each path. The tradeoff is:

a) You add a slight amount of noise at the junction of this passive splitting.
b) The current gets split up so 2 paths with equal resistance (impedance for AC): Equal voltage but half the current flowing in each. Therefore the power on each path is half what it is before the split. The signal to noise ratio is therefore decreased (bad).
c) Without a buffer IC, the output voltage depends on how many times greater the output resistance (AC: impedance) is than the source's. Since you form 2 parallel paths, the equivalent output resistance is lower than with one path and thus the output voltage on each is a little lower.

Preventing this voltage drop is what the removing R4 comment is alluding to, though making the output the full emitter voltage with no alternate flow for transients is generally a bad idea and you need an R4 for any gain. Per the comment's logic, making R4 as large as possible pushes the sync voltage higher but could just as well remove to get the max possible value without adding the resistor's high thermal noise.

The voltage gets split up among each component in the series path, such as resistors. You don't need a switch but driving both 75 ohm and TTL outputs in parallel at the same time drops the output voltage slightly for each as explained above. 75 ohm sync being fine around 250-350mV can get away with that but the loss is significant on TTL that should be at least 3V, if not higher. Can use active switching or sync regeneration to avoid the power loss and all these problems but neither is cheap or simple.

Slight improvement to circuit

Download all 3 simulated circuits I used


The common 2N7002 NMOS aka N-Channel MOSFET isn't very fast so I spent 10 minutes finding a model for a replacement that is cheap and available: EM6K33
It's surface mount but if someone wants better options in through hole / TTO-220, tell me and I can look.

-The circuit is okay only for driving 75 ohm sync.
-Should keep R4 and add a capacitor in parallel with R4 of 4.7nF or less.
-Should switch to a MOSFET for lower power and faster switching at same < $1 price point. Compare datasheets for faster rise and fall times and low-ish Rds.
-Better still is replacing transistor with a 74LV "and" gate or similar and powering from 5V line or externally. If so, add a bypass capacitor for the DC power line.

Circuit Simulations

Notice:
-The voltage levels improve with MOSFETS, with the BJT 2N3904 being faster than the 2N7002 but slower than EM6K33 by ROHM.
-Higher voltage without R4, though I don't recommend this.
-Significant noise pulse from transistor turning off with vertical sync ending 30x a second NTSC / 25x a second PAL. Worse for MOSFET but can add bypass capacitor on output and for every one of those are at least 263 horizontal sync noise waves, which are worse for BJT.
-I added square wave inputs (PULSE) for an approximation of NTSC sync. PAL is close enough for comparison.

Stated design with dual TTL and 75 ohm outputs:
Spoiler
Image
Max level 5V sync is unrealistic, especially from a console but does show max possible output:
Spoiler
Image
No R4
Image
TTL only
Image
Realistic 3.6V sync levels coming from console:
Spoiler
Image
No R4
Image
Much is lost in a tl;dr but in any case:

-Do not build the circuit in the link. I'd prefer an "and" IC from the cheap and famous 74 CMOS series such as 74LV that is 5V tolerant and can compensate for the aforementioned voltage loss.
-Better though perhaps overkill option is the more complicated and expensive "xnor" circuit in the article.
-Note that the none of the designs mentioned will work for HD sync. Is a glaring omission from the articles but may have been intended for part 3.
-The easiest but most expensive DIY way out is buy a $13.50 Renesas EL4511 that is intended for sync stripping SD, ED and HD video but can combine (or split) sync for you as well, including HD. Also works for 75 ohm sync input if you put a sync dropping resistor in the console, which isn't standard to do over putting in a cable.
nes.og
Posts: 128
Joined: Sat Apr 04, 2020 7:01 pm

Re: Role of the transistor in this sync combiner circuit?

Post by nes.og »

Thanks for for all the info!

I came across this circuit from this guy selling them for RGBHV to RGBS to use with GBS Control.

https://mysticprysm.com/product/sync-combiner/

He used the schematic from the Retro RGB page but knows nothing about how the circuit works. This isn’t to put him down, it’s a nice gesture for the community. Hopefully it won’t cause issues.
User avatar
NewSchoolBoxer
Posts: 369
Joined: Fri Jun 21, 2019 2:53 pm
Location: Atlanta, GA

Re: Role of the transistor in this sync combiner circuit?

Post by NewSchoolBoxer »

nes.og wrote:Thanks for for all the info!

I came across this circuit from this guy selling them for RGBHV to RGBS to use with GBS Control.

https://mysticprysm.com/product/sync-combiner/

He used the schematic from the Retro RGB page but knows nothing about how the circuit works. This isn’t to put him down, it’s a nice gesture for the community. Hopefully it won’t cause issues.
You're welcome! Gave me the motivation to re-learn transistors. That is a professional looking PCB. Maybe I should hire him. The description repeats the mistake of calling it a passive sync combiner. A transistor is as active a component as it gets. Good for a popular content creator to spread advice from someone with professional electronics education or experience. Thing is, we can be wrong, we don't know everything and I seriously doubt Ste intended for the design for anything but a proof of concept.

I finished the sync combiner work I intended. Ste's "xnor" design is fine but surprisingly uses two logic gates instead of one. The "100 ns glitch" equates to a pulse at 1/100ns = 10 MHz that the RC filter can remove:
Image

Simulation Models Update

I think I should have added 2nd 75 ohm resistors since video lines work that way to form a 1/2 voltage divider. I updated the simulations with this change as well as a bypass capacitor that does a good job of removing switching noise. Value is somewhat flexible between 1-10nF where higher than that starts degrading the csync level or the fall time. I also added simulations of a better "and" setup with two transistors and separate 5V supply to avoid massively inflating the current on the vertical sync while reducing the EMI. First cycle doesn't work since the top transistor is turning on and getting gate current at the same time but that is irrelevant when the game takes longer to boot.

It's less obvious if sync circuitry contains two 75 ohm resistors since a TTL sync signal is getting clipped at 5V from any video amp. Probably for the best that RetroRGB left the 75 ohm resistors out of the design since they are already contained inside the television or monitor. We just need to include them in a simulation to show the expected output.

On a related note, removing R4 is bad for a BJT setup since the resistor helps stabilize the operating point while preventing thermal runaway. Could add a relatively large 22u-220uF capacitor in series on the sync output if not already AC coupled. Other option is a 10k ohm or so pulldown resistor from gate to ground if you think logic low is floating.

Even going the "and" gate route, it's pretty lolzy to wire multiple logic gate transistors together instead of using a CMOS IC that draws less power, outputs higher voltage and sizes the PMOS and NMOS transistors at the right ratio for minimum propagation delay. Two individual transistors can have a different specs even from the same print run if they aren't on the same die. The basic rule is BJTs are better in analog circuits and MOSFETS are better in digital - and sync is effectively a digital signal. The 74LS BJT logic gates still exist but are worse and more expensive than 74HCT and 74LV CMOS.

I should mention that the C in CMOS means "complimentary" for using both NMOS and PMOS transistors in equal amounts, where NMOS drives the output to 0V and PMOS to high voltage.

AND Gate

Harder than I thought to get an imported "and" CMOS IC model working in LTspice. Vout over 3.3V is better than anything buildable from a 1 or 2 transistor circuit. Rise and fall times are very fast. The 470 ohm resistor can be increased to 680 or 750 ohm to bring back down to 300mV. This is what mysticprysm should do for a design meant to be as cheap as possible that would be above criticism. Totally fine to remove R4 here. Should test what resistor to go on Vcc along with a bypass capacitor.
Image

Here is a search filter that finds 1 gate "and" ICs that accept 5V and are in stock. Seems 30 cents at quantity of 10.

Other idea is to buy a 74LVC1G57 that can be configured with 3 inputs to function as a AND, OR, NAND, NOR, XNOR, Inverter aka NOT or buffer gate! I never knew this existed. I didn't see a breadboard friendly through hole design but I did find the SPICE model with complete test circuit.
nes.og
Posts: 128
Joined: Sat Apr 04, 2020 7:01 pm

Re: Role of the transistor in this sync combiner circuit?

Post by nes.og »

Thanks for sharing, I have so much to learn lol.
Last edited by nes.og on Thu Sep 15, 2022 2:39 am, edited 1 time in total.
viletim
Posts: 550
Joined: Mon Aug 07, 2006 6:44 am
Location: Sydney, Australia
Contact:

Re: Role of the transistor in this sync combiner circuit?

Post by viletim »

I've seen variants of this circuit floating around the internet for the past 20 years. I don't see anything fundamentally wrong with it. If the conditions in the article are met, then it's fine.
The article wrote:R4 is technically optional, but allows the C output to drive into both HIGH-Z (TTL) and 75Ω terminated inputs. If it’s removed, you can simplify the construction by not having to tap into the ground node, but then only driving into 75Ω terminated inputs will work.
That means it can drive a TTL input or it can drive a 75 ohm input. It does not mean it can do both at once! R4 is necessary because some monitors have a pull up resistor on the sync input. In that case, without R4 there is nothing to drive the input low when the transistor is switched off.

NewSchoolBoxer, Are you really saying the this circuit is no good because of half a milliamp of wasted current driving the transistor's base? If the h. sync source can't supply that, then the v. sync source certainly wouldn't be able to drive the 75 ohm load anyway. It's not really a concern if it's connected to a VGA card as the VGA/VESA/whatever it's called standard specifies a certain amount of drive current that the sync outputs must be able to source. That's how it can work reliably.

There is one significant point in favour of the BJT as opposed to a mosfet in this circuit - The BJT is not sensitive to ESD. You can pop a little mosfet by touching under the right conditions. That's not something you want in a circuit for the average pleb to build.
User avatar
NewSchoolBoxer
Posts: 369
Joined: Fri Jun 21, 2019 2:53 pm
Location: Atlanta, GA

Re: Role of the transistor in this sync combiner circuit?

Post by NewSchoolBoxer »

Tim W. as I live and breathe. I'm glad to get pushback. More than one way to do something in electronics and sometimes a more simple solution is good enough.

Conditions in the article, I'm not sure the design reaches TTL level for arbitrary arcade or vintage computer video input considering the Vbe and more significant Vce losses. An extra 100mV on the output just from changing BJT to NMOS could make a difference and using a logic gate IC instead would leave no doubt.

The guide doesn't explain how to output TTL but remove the 470 resistor or passively split before it right. I'm not seeing why the device can't dual output. Signal loss from the impedance mismatch isn't great but bulky Y cables for VGA and DVI do the same thing. I didn't know some displays need a pulldown resistor. Good to correct me but none of these are professional video monitors or SCART televisions that a sync combiner is most relevant for?

The design is no good mostly for having electrically superior options at the same price point and running one sync at something like 100x more current than the other due to BJT's β. I didn't consider exceeding the driving current limit but I wouldn't have expected it to be above 10mA.

The EMI from vertical sync is now many times greater on a long current loop and that's safe for the display? No bypass capacitor or other method to reduce the alarming - to me at least - switching voltage spikes. If someone wants to show the "xnor + buffer" design then say you may be able to get away with the simpler "and" design and do a worse version of it with one or two transistors then..okay. What we have instead is people thinking a lab exercise to teach logic gates is worth selling to the public.

Maybe I'm surprised that you defended the design as good enough when I've quoted your reply in several discussions that criticizes the lack of 75 terminating resistors before connecting to sync strippers.
I wonder where people get the idea to make these PCBs to sell to the public? That and reading datasheets targeted to professionals who know better.

I give RetroRGB credit for editing out the suggestion to replace the 7805 in SNES with a switching regulator with no actual compensation to remove its switching noise. The suggestion in 2016 came from rama, an expert in several areas of electronics, but he must have been a beginner in power electronics..in 2016. So maybe the sync combiner article can get an update?

That is fair about BJTs being less sensitive to ESD. I think my university labs used BJT 74LS gates where the intro class didn't have to be taught to terminate unused inputs. I could see a noob touching a transistor or a floating wire in a live circuit that causes a desync for a few seconds. Pleb me exploded a reversed electrolytic capacitor with +5V.

BONUS
Spoiler
Already back to RTL logic, let's devolve one more step to DTL. I always thought diodes switched slower than transistors but they seem fine at 15 kHz. No transistors so even more noob friendly:
click for full size
Image
4x faster switching speed and more beginner friendly with no transistors!
Circuit Explanation: You may wonder why the Shockley diodes are facing backwards. Face forwards and remove Vcc to get an "or" gate. Think of the diodes in terms of Vcc. It sees a diode from a 0V (off) input as a short circuit to send all its current. Only if both inputs are 5V (on) does it flow to the load.

Weakness of this design is Vcc sees (5V - diode voltage drop) instead of 5V so outputs the diode drop voltage instead of 0V in low logic. Rectify by using a normal diode that has a drop about 2x a Shockley to get 0V lows at price of (5 - 0.7V) max high.

I randomly picked the diode models. Can be better options and lower current means a lower diode voltage drop.

I think this ghetto fabulous circuit is okay but wouldn't use over a CMOS IC circuit.
Real limitation of Diode Transistor Logic is it can't form a "not" gate / inverter necessary for functionally complete logic.
Post Reply