Soldering the parts on the USB On/Off Switch
The PCB that i developed had both the smartcard reader and the USB switch PCBs, so i first had to separate them. For some reason, both PCBs had wrong date etched. The smartcard reader circuit had one month error (July 7 instead of June 7), while on this PCB i etched the date July 2010...
The top side of the switching PCB. There are 4 connectors for the 4 USB inputs and outputs, a connector for the relay and another 6-pins connector for interfacing this board with the reader
The heart of the circuit is the ADG714 CMOS SPI octal SPST switch. I'm still not sure if this is going to work with USB wires... A test will show...
Interfacing the boards
A 6-pins connector is used for the 5-wire interface. The SPI needs a data and a clock wire. One wire is the ground wire, one is for the reset signal and the last one is for the SYNC signal of the chip. Here is the wire with the connectors:
And here are the boards interfaced with this wire:
1-2-3 TEST: 2 problems, two solutions, and the switch works! (July 15)
This is the testing setup of the USB lock. It works just fine!
As i said, i was not sure if the ADG714 would work as a USB switch. With no further ado, i updated the software to version 2 and tested the board. At first, the switch did not work at all, but i quickly discovered that the soldering job was kinda messy. I found a small solder blob underneath the chip. I removed the blob and to my surprise the switch worked perfectly fine!
I was quite tired and i decided to go to sleep, so i turned off the 3 CCFL lamps above my desktop... And disaster occurred! The EMI from the CCFL drove the switch nuts! No interference was detected on the PIC, but the ADG714 received a reset signal shutting down the USB ports. I tried once more and the problem occurred again.
I know this problem, i' ve faced it before. fluorescent lamps with the old ballasts can cause a mayhem to the surrounding area with their EMI emissions. I suppose that if the Nabuchodonosor had no EMP, Morpheus would have used these ballasts to kill the Matrix guardians...
The long interface wire acts like an antenna, and since the PIC has only outputs to this wire and the ADG714 has only inputs, the EMI have obvious results only to the ADG chip. The simplest method in such occasions is to use a ferrite toroid core and wind the wire once around this core.
... 3 CCFL lamps can cause a mayhem with their EMI emissions!
A toroidal ferrite core is the simplest solution to reduce EMI from long wires
One turn is enough
The toroid is very close to the switc-board
After several tests i was finally sure that the EMI from the fluorescent lamps won't be a problem any more...
@Giorgos Lazaridis Yeah, like I said, it'll work... mostly. If you take a look at TPC 12 on the ADG714 datasheet, the frequency response at ~500 MHz is going to be around -8 dB. The maximum attenuation of a USB cable is basically the same as that ( http://www.usb.org/developers/presentations/pres0410/2-2_SSUSB_DevCon_PHY_Heck.pdf ) - so essentially, you've basically just put in a long USB cable.
So long as you're talking about devices that are attached with, say, like a 1' cable or something like that, you won't notice basically anything. It's all just a question of how much margin you have left.
@Pat this was one of my concerned, it works ok until now, and i have test usb devices like external HDD (which i copied some 300GB of data with no problem) and also my camcorder uses the USB for the video. Nevertheless, have order relays with 4p2t if the adg fails or have slow data transmission.
"I'm not sure if the ADG714 can be used for USB applications."
No, it can't. It's the bandwidth that matters, not the on-resistance. It has a bandwidth of 155 MHz, which is way below USB spec. This is because the ADG714's input/output capacitance isn't 6/4 pF: I'm not sure where you got that from (the digital input/output capacitance is 3/4 pF respectively). Its on capacitance is *22* pF. This is way, way too high: on a 50 ohm input that's a critical frequency of ~150 MHz.
Switches designed for USB (like the FSUSB46) have on capacitances more like 4 pF, leading to a bandwidth of well greater than 480 MHz.
This design will work... some of the time. Probably mainly with short USB cables and devices that are well within USB spec. Definitely with low-speed USB devices. But high-speed USB devices could easily struggle since you're probably tacking on at least ~6 dB of attenuation.