Previous in Forum: NEMA 34 Stepper Motor Dimensional Size Question   Next in Forum: How Do You Convert a Synchronous Generator Inertia From 1.0 tm2 to s?
Close
Close
Close
17 comments
Rate Comments: Nested
Member

Join Date: Aug 2016
Posts: 7

USB Multiplexing

08/15/2016 8:20 AM

Hi everyone,
I've been trying to design a 12:1 2.0 USB multiplexer for a while, with very little success. I've bought a couple of MAX4999 8:1 multiplexers, trying to use two of them in parallel such as shown in the datasheet.
I've put them on a breakout board from Adafruit, and started testing on a breadboard. I'm need at least 12 USB devices to be accessed individually as removable disks, by the microcontroller (Arduino YUN mini). One of which, for example is Mobius Action Camera.
Obviously, the first concern is the high-speed traces and if you can play with them on a simple breadboard, but I did test a single device, with lines running through the breadboard and everything seemed to work fine as long as they didn't run through the multiplexer.
Any thoughts, suggestions, criticism?
Much appreciated,
Matija

Register to Reply
Pathfinder Tags: Multiplexer mux switch usb
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

Good Answers:

These comments received enough positive votes to make them "good answers".

"Almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, vote them!
Guru

Join Date: Apr 2010
Location: About 4000 miles from the center of the earth (+/-100 mi)
Posts: 9910
Good Answers: 1141
#1

Re: USB Multiplexing

08/15/2016 9:59 AM

The MAX4999 is equivalent to a digitally controlled double pole 8 position selector switch. The binary combination on C0, C1, and C2 connects the COMI to one of the DataI lines and COMO to one of the DataO lines.

Are you driving the enable high?

Are you connected to the data lines which are selected by the channel select?

http://pdf1.alldatasheet.com/datasheet-pdf/view/233303/MAXIM/MAX4999.html

Register to Reply Score 1 for Good Answer
Member

Join Date: Aug 2016
Posts: 7
#2
In reply to #1

Re: USB Multiplexing

08/15/2016 10:15 AM

Thanks for taking your time to help!

Yes, I'm selecting the port directly by shorting the power (3.3V) to EN and/or select pins. I've tested the connections I've selected with the multimeter and, well.... it beeps!

I've been reading about the importance of the USB data lines being equal in length. Considering that I'm using a breakout board, where the traces are obviously different in length --> https://www.adafruit.com/products/1163, could that be the source of my problems?

Mati

Register to Reply
2
Guru

Join Date: Apr 2010
Location: About 4000 miles from the center of the earth (+/-100 mi)
Posts: 9910
Good Answers: 1141
#3
In reply to #2

Re: USB Multiplexing

08/15/2016 12:31 PM

It sounds like you multiplexer is working OK.

Layout could definitely be your problem. Typical hard drive data rate is about 480 MBit/s, so your wiring is really a transmission line. Changes in impedance on a transmission line cause reflections and multiple reflections cause data errors.

You'll probably want to do a little more research on USB physical layout design.

http://www.atmel.com/images/doc7633.pdf

http://www.focusembedded.com/blog/high-speed-usb-in-a-two-layer-pcb/

Good luck!

Register to Reply Good Answer (Score 2)
Guru

Join Date: Aug 2012
Location: Land of Fruits and Nuts
Posts: 4481
Good Answers: 54
#7
In reply to #3

Re: USB Multiplexing

08/16/2016 4:52 AM

I think you have the answer. 480MB/sec is fast and the wire length, material, location and shape (bends, curls, etc) will make a big difference.

Back in college (mid-late 80s') my friend an I took a senior level RF course. In the lab, our class had to design and build an AM radio receiver - they didn't tell us what we were building - each group received a part of the transmitter with input/output/amplification specs. Our part was the balanced mixer and we used a ring modulator with four diodes. On paper, it should've worked great, but due our lack of real life design skills, we never realized that the component leads and breadboard were causing all kinds of unwanted signals. One day, we had the spectrum analyzer connected to our mixer and out of nowhere we got a large unknown frequency pop up. We had no idea what it was from and our fear was that we somehow cooked one of the diodes - making it unbalanced. We started probing all around our mixer, then poof - the signal was gone! When we talked to our Lab TA, he asked us the frequency. He had us think about it, then he told us to go around to each group and ask what frequency they were working on. Sure enough, someone had turned on a signal generator and the long leads on our circuit acted like an antenna.

Case closed! But we never got our mixer to work and the class never got the AM receiver working.

__________________
Enjoy and be happy! Life is too short!
Register to Reply
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 17996
Good Answers: 200
#9
In reply to #7

Re: USB Multiplexing

08/16/2016 7:31 AM

Many too many) years ago I had a large computer from our company, go on the blink at irregular intervals....

Many tried to fix it, nobody could get it to run longer than 3 days at best......many parts were replaced, that worked in other systems of the same type without problems....

Finally, I was sent to stay there till it was fixed, or the US system designer would have to be sent for!!

I had my scope set up and a MW/FM radio for amusement.

Suddenly, it went wrong and the station I was listening to on MW went sort of mushy at the same time.

I saw some weird signals on the main voltage bus, signals I "sort of" recognised, but could not remember where or when......signals that should not have been there!!

(This is turning into a children's bedtime story!!!)

I was in the rest room next door, smoking a cigarette (so it was before 31-12-1976, which was when I stopped!), and staring out the window, with the door to the computer room open and the radio on loud, when I noticed an EW RADAR antenna revolving on the far horizon, some 10 miles away at a guess, in time with the noise from the radio!!!

It was a RADAR System that was causing all the problems.

The company had to screen their computer room in some way, but that was not my job, a special company did it if I remember correctly.....

I had seen some similar signals in the RN some years before!!

__________________
"What others say about you reveals more about them, than it does you." Anon.
Register to Reply Score 1 for Good Answer
Guru

Join Date: Aug 2012
Location: Land of Fruits and Nuts
Posts: 4481
Good Answers: 54
#13
In reply to #9

Re: USB Multiplexing

09/01/2016 11:32 PM

Cool story. Unwanted RF signals are all over the place and can wreak havoc on electronics.

I have another interesting story I'll post in a new thread in a couple minutes.

__________________
Enjoy and be happy! Life is too short!
Register to Reply
Guru
Engineering Fields - Electrical Engineering - New Member Fans of Old Computers - Commodore 64 - New Member Popular Science - Evolution - New Member United States - Member - New Member

Join Date: Oct 2013
Location: Illinois, 7 county region (The 'blue dot' that drags the rest of the 'red state' around during presidential elections.)
Posts: 3683
Good Answers: 89
#14
In reply to #9

Re: USB Multiplexing

09/02/2016 10:21 AM

"I saw some weird signals on the main voltage bus, signals I "sort of" recognised, but could not remember where or when......signals that should not have been there!!

(This is turning into a children's bedtime story!!!)"

You tell ghost stories to children when tucking them in at night?

Oh, wait, Germany also has children's stories about mischievous elves that chop off the thumbs of thumb-suckers with giant scissors, and a story about a litter of kittens shoved into a sack and thrown into the sea to drown, the kittens dying one by one in horrible ways, until the last kitten finds a family to live with. (Never says they're a 'nice' family, or that they treat the kitten well. all we know is that they're offering shelter to the kitten, and we don't even know if it's conditional on being good mouser.) And then there's Krampus, who is busy hitting naughty children with birch switches while Santa is passing out presents to the good kids. Kramus also stuffs the REALLY naughty children into his wicker basket to carry them off " and they were never seen again."

Sometimes I forget that the land of my father's father's father has some really 'unusual' ideas about children's entertainment.

__________________
( The opinions espressed in this post may not reflect the true opinions of the poster, and may not reflect commonly accepted versions of reality. ) (If you are wondering: yes, I DO hope to live to be as old as my jokes.)
Register to Reply
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 17996
Good Answers: 200
#15
In reply to #14

Re: USB Multiplexing

09/02/2016 11:02 AM

Bad hair day?

I hope you recover!!

So get well soon!!

PS. You obviously did not understand a word I wrote, or you would not have been so rude, or is that simply your general manner?

Note, nobody else felt the need to demonstrate a really bad upbringing...

But if you are fully prepared to learn something interesting, that is interesting for many technical people, I can expand it in a PM if you wish!!!

Or you ask simple questions and build up your knowledge..... Just to make it easier for you to understand.

But if you have no further interest, also not a problem for me!

Have a great day either way......

__________________
"What others say about you reveals more about them, than it does you." Anon.
Register to Reply
Guru
Engineering Fields - Electrical Engineering - New Member Fans of Old Computers - Commodore 64 - New Member Popular Science - Evolution - New Member United States - Member - New Member

Join Date: Oct 2013
Location: Illinois, 7 county region (The 'blue dot' that drags the rest of the 'red state' around during presidential elections.)
Posts: 3683
Good Answers: 89
#16
In reply to #15

Re: USB Multiplexing

09/02/2016 11:30 AM

I believe we are having a problem due to cultural misunderstanding.

I was not attempting to be rude, and I apologize for any offense I have given.

I was trying to convey a tone of "That is shocking to me! But wait, when I look at the culture, it makes sense, so I should not be an 'ugly american' and assume that everyone tells the 'sugar-coated' stories american kids are raised on."

In my attempt to play the Self-Mocking Fool, I appear to have played the Boorish Oaf instead. I am sorry and ashamed.

Did I choose the wrong examples? Are those stories ones that are no longer considered acceptable? Or was it the 'tone of voice' I was writing in that turned my attempt at humor into an insult?

__________________
( The opinions espressed in this post may not reflect the true opinions of the poster, and may not reflect commonly accepted versions of reality. ) (If you are wondering: yes, I DO hope to live to be as old as my jokes.)
Register to Reply
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 17996
Good Answers: 200
#17
In reply to #16

Re: USB Multiplexing

09/02/2016 3:26 PM

To me it was taken as a clever Dick being rude.....

Maybe another here thinks that I am over sensitive on the subject.

But it was a "fix", that helped make my "Tech Support" name when still working for Sperry Univac, very many, many years ago!! Not the only one I hasten to add....

Also, do not forget, I was born in the UK, not Germany!!

__________________
"What others say about you reveals more about them, than it does you." Anon.
Register to Reply
4
Guru

Join Date: Jun 2009
Location: South of Minot North Dakota
Posts: 8376
Good Answers: 775
#4

Re: USB Multiplexing

08/15/2016 6:56 PM

I just used one of these when I needed to expand my USB inputs on my computer.

Orico 13 Port USB-3.0 Hub and Charging station.

Odds are you won't fabricate a system that does more and better for less than this. I got mine on eBay for ~$30 last year.

There's nothing wrong with DIY but sometimes a guy just has to step back and look to see if ready made is available.

Register to Reply Good Answer (Score 4)
Guru

Join Date: Aug 2012
Location: Land of Fruits and Nuts
Posts: 4481
Good Answers: 54
#5
In reply to #4

Re: USB Multiplexing

08/16/2016 4:21 AM

Just what I thought, over engineering the solution for a 12 USB port device. The Orico is a 13 port device. Did you consider that he may be superstitious and 13 isn't lucky?

Try this one, the true solution to a 12 USB port device: https://www.amazon.com/Satechi-Power-Adapter-Control-Switches/dp/B0051PGX2I/ref=pd_sim_sbs_147_6?ie=UTF8&dpID=51NSqsuiq%2BL&dpSrc=sims&preST=_AC_UL160_SR160%2C160_&psc=1&refRID=JRSVG73WKG360GH41EJP

Just kidding - I had no idea a 13 port device existed!

__________________
Enjoy and be happy! Life is too short!
Register to Reply
Member

Join Date: Aug 2016
Posts: 7
#6
In reply to #4

Re: USB Multiplexing

08/16/2016 4:31 AM

Thanks to everyone for replies!

@Rixter:

I will definitely read more about it, thanks for the links. I've found this website to be extremely useful as well: USB-in-a-nutshell.

1. So, do you think that a more appropriate PCB layout will most likely help my multiplexer problem?

2. I've been creating PCBs using an etching tank, is this a good enough process or should I consider having it outsourced and made professionally for the high-speed transmission lines not to cause reflections?

@tcmtech:

That's a great idea, I've been researching hubs and hub driving ICs for a while now, as it offers an even better functionality, than multiplexing. Circuits like this for example:

The reason I can't buy a ready-made hub as you suggested, is cause I'm building a mobile device, with very limited space and power available.

Register to Reply Score 1 for Good Answer
Guru
United States - Member - Born, raised halfway 'round .....

Join Date: May 2010
Location: Metro.Manila, Philippines.
Posts: 1269
Good Answers: 27
#10
In reply to #6

Re: USB Multiplexing

08/16/2016 9:28 AM

Answers to your questions 1 and 2 are both yes!

Crosstalks and noise isolation are real problems in pcb layout, print size / spacings, routing, etc. beside harmonics...are few that need to be addressed if you want reliabilty!

good luck!

__________________
vsar
Register to Reply
Guru
Engineering Fields - Electrical Engineering - New Member Fans of Old Computers - Commodore 64 - New Member Popular Science - Evolution - New Member United States - Member - New Member

Join Date: Oct 2013
Location: Illinois, 7 county region (The 'blue dot' that drags the rest of the 'red state' around during presidential elections.)
Posts: 3683
Good Answers: 89
#11
In reply to #6

Re: USB Multiplexing

08/17/2016 3:31 PM

One of the reasons that you're having trouble multiplexing your USB signal is that USB is not DESIGNED to be multiplexed.

Data on a USB line is grouped into 'frames.' If you're familiar with IEEE-232 signals (previously known as RS-232), you will see the similarities: both have 'start bits,' 'stop bits' and 'error checking.' but while RS-232 sends 7-8 bits of data between start and stop, USB has kilobytes of data between 'start' and 'stop.' That data is also bidirectional, one portion of the frame could be outgoing data being sent to a printer, followed by a section for the mouse to report its status, followed by a section of data going to a USB memory stick, followed by incoming data from another USB memory stick, etc. The size of each portion in a USB stream can vary, frame to frame, and the 'table of contents' for the frame is right after the start string and the clock reference, so all the USB devices 'downstream can see when it is their turn to pick off data or add in data. 'Breaking the line' as a multiplexer will do, causes the devices to see NO signal when a signal is expected, and they will interpret this as a 'frame fault,' and signal that the frame needs to be resent.

This is why we do not use 'multiplexers' to split USB signals, we use 'USB Hubs,' which take the entire signal and duplicate it to EVERY downstream port at once, and collect the signals from ALL the downstream ports, correct 'sub-bit' timing errors, and combine their signals into a single stream going back to the USB controller.

__________________
( The opinions espressed in this post may not reflect the true opinions of the poster, and may not reflect commonly accepted versions of reality. ) (If you are wondering: yes, I DO hope to live to be as old as my jokes.)
Register to Reply Score 1 for Good Answer
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 17996
Good Answers: 200
#12
In reply to #11

Re: USB Multiplexing

08/17/2016 9:56 PM

You put my thoughts, of which I was not completely sure, into words. Thanks.

I always think of a USB as being a "streaming" device.....correctly or not!!

__________________
"What others say about you reveals more about them, than it does you." Anon.
Register to Reply
Guru

Join Date: Jul 2008
Posts: 1688
Good Answers: 145
#8

Re: USB Multiplexing

08/16/2016 6:40 AM

First rule of troubleshooting: check your power. Make sure the voltages are correct. Need decoupling capacitors near the chips. Chips need a good ground. Make sure the decoupling capacitors are "good capacitors" at the frequencies and first few harmonics that you are generating.

Second rule of troubleshooting: carefully review your work with the first rule.

__________________
Few things limit our potential as much as knowing answers and setting aside questions.
Register to Reply
Register to Reply 17 comments

Good Answers:

These comments received enough positive votes to make them "good answers".

"Almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, vote them!
Copy to Clipboard

Users who posted comments:

adreasler (3); Andy Germany (4); Autobroker (3); BruceFlorida (1); Rixter (2); Stric_Matic (2); tcmtech (1); vsar (1)

Previous in Forum: NEMA 34 Stepper Motor Dimensional Size Question   Next in Forum: How Do You Convert a Synchronous Generator Inertia From 1.0 tm2 to s?

Advertisement