Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

DIY USB sharing switch

Status
Not open for further replies.
Hi,

I don't think this will work.
I assume the LOW signal levels on A and B signals are not low enough.
And base resistors would be a good idea, too.

Klaus
 

Great! lots of inputs!
I am yet to try some of the designs (got busy in between).
will wait for elechi's reply.
 

Hi,

I don't think this will work.
I assume the LOW signal levels on A and B signals are not low enough.
And base resistors would be a good idea, too.

Klaus

I did not understand the LOW signal levels not low enough? The opto transistor is fully off or full saturation as no biasing is done. So I expect to pull the Node A/B to full low through overriding 1k resistor. Collector emmitor resistance is quite low compared to 1k @5v I am able to go below Vil on A/B signals 4052.

On base resistors? I did not understand where do you suggest for the resistor? I mean which transistor base?

Test board I made as per artwork in my previous post, worked perfectly fine with replacing CD4052 with 74HC4052. New board, trace matching (between D+/D-) taking too much time for routing.
 
Last edited:

I did not understand the LOW signal levels not low enough?
some options:
* run a simulation
* do a real test and measure the voltages and currents
* learn basic transistor circuits

So I expect to pull the Node A/B to full low
I don´t expect it. How to go on?
Maybe one of us needs to test it.

Collector emmitor resistance is quite low compared to 1k @5v II am able to go below Vil on A/B signals 4052.
Neither collector nor emitter is connected to the A/B signals. So how are they related?
If you say levels are fine, I have to believe.

On base resistors? I did not understand where do you suggest for the resistor? I mean which transistor base?
Usually every BJT´s base needs some current limiter ... usually a resistor. I can´t find it in your circuit.

Test board I made as per artwork in my previous post, worked perfectly fine
I don´t think so. But if you say it works perfectly then - be happy.

******

For the OP I recommend to do his own tests before producing a PCB.

Klaus
 

Hello,

I have few designs for a usb sharing switch for keyboard and mouse between my PC and the Raspberry Pi4.
I have searched the internet and many circuits are speculative. So, I wanted some opinions from circuit design experts.

I have no idea about USB. But have a fair knowledge on electronics. Just I do not want to damage the USB ports of the PC or Pi.

1.
View attachment 165318

2.
View attachment 165319

3.
View attachment 165320

Can anyone suggest which one would be best? I know option 3 is fool proof. But it requires that every time I am going to push two switches! And I guess option 1 will work as long as the power is drawn from one source.

for Switch, i am considering a push-lock switch like this : **broken link removed**

I did post this in Raspberry Pi forum but did not get any reply.

My main aim is to share keyboard and mouse AND not to damage the USB port of PC and Pi (I consider eliminating the hub also).

Thank you!
If you are okay with just the keyboard and mouse, this might work. Option 2 is good enough. But remember effectively you are unplugging and re plugging the devices and they need to be re-enumerated. This is the same approach I am taking in my design. However I have a need that I already have a hdmi video switch (a cheap one I got on Amazon for ₹450 [~$5]) which I plan to add usb switching as well. There are 3 led indicators on the video switch which I replace with the optocouplers. Signal switching (D+/D-) I am using 74HC4052

20201126_210315.jpg


If you observe, this switch is also using scottky diodes to join supplies from three hdmi channels.
 

Neither collector nor emitter is connected to the A/B signals. So how are they related?

OC1 and OC2 optocoupler pin 4 (collector of the npn transistor inside the opto) is pulled up to the supply, and the same is also driving the A/B
The transistor inside the opto works as an resistor-based inverting buffer.

Usually every BJT´s base needs some current limiter ... usually a resistor. I can´t find it in your circuit.
If you are referring to transistors Q1/Q2/Q3, their base is driven through the 1k to supply. Also, the Rce=(Vce/Ice) of the opto transistor works as the series resistor to ground. As I am using all the transistors in switching mode, I do not need to bias them right!?

The optocoupler already has a base resistor inside the package (Snapshot from the datasheet)

opto.png


Still unable to understand why the A/B Vil would not be met ?
Could you explain a bit more what I am missing?
 

Hi,

Everybody makes mistakes. Me too. Sometimes I recommend something to hobbyists ... but others say I'm wrong.
Then I'm most interested not to confuse the hobbyist (even more). I try to clarify doubts - best with the next post.
A lengthy discussion may confuse the OP.
Almost 3 weeks ago I recommended:
ome options:
* run a simulation
* do a real test and measure the voltages and currents
* learn basic transistor circuits
* If you run a simulation, show the simulated circuits with the according currents and voltage levels.
* If have a real circuit it should be easy to do measurements...give the results
* If you know how to calculate the voltages, then show your calculations of currents and the resulting voltage levels.

In case you still don't know why your circuit can't provide valid voltage levels please start a new thread for discussing your circuit of post#20...
... to avoid a lengthy discussion here in a "foreign" thread about your circuit.

Please:
Give a very clear statement to the OP whether your circuit is proven (or even simulated) or not.
..wheter it's worth for him/her to build this circuit ...

Klaus
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top