PAGE 1 of 9 - The USB On-Off Switch
I recently posted a theory of operation for smart-cards and more specifically telephone cards, as well as a very simple phonecard reader with PIC microcontroller. The reason for all these was to gain experience with smartcards and make this project.
What i am making here is a USB lock with smartcard key. The idea is that a phonecard reader made with a PIC micro will be able to store a number of different phonecards into memory. Whenever one of these cards is inserted into the slot, it will activate a 4-ports USB On/Off switch. If the card is removed, the USB ports will be de-activated.
I do not really have any problem if someone else works on my PC, i do not keep federal secrets or military maps in my HDD. But the idea that i can lock and unlock my keyboard and mouse with a smart-card is quite appealing to me, and this is truly the only reason that I'm making this project.
FOR THOSE WHO WILL START SAYING THAT THIS IS NOT 100% SECURE AND THAT THEY CAN UNSCREW THE PC CASE AND USE THE INTERNAL USB PORTS::: Congratulations - Hacker level 1
Let's start - The idea
I decided to separate the reader from the USB On/Off switch. I did this for 2 reasons: First, the reader should have only one through-hoe component, the slot, while the switch may have more than one through-hole component. The other reason is because the switch should be as close as possible to the USB wires to avoid long wires.
The USB On/Off Switch
I'm not very good at high-speed PCBs and hopefully this small PCB with short lines won't be a problem. I will be using the ADG714 chip from Analog Devices for the data switching. I will use also a relay to provide the 5 volts power for the USB.
I'm not sure if the ADG714 can be used for USB applications. It has ON resistance from 2.5 to 5 Ohms and input/output capacitance around 6 and 4 pF respectively. I hope that these values will not cause lag in data transmission.
Here is my very first schematic for the USB On/Off switch:
No Bill Of Materials is needed for this circuit. All capacitors are 0.1uF 50 volts ceramic, except C3 which is 1uF 16V electrolytic. The chip is the ADG714. It uses a serial SPI protocol for the transmission. It provides also a digital output (DOUT) to interface cascade chips daisy chained.
SV1 and SV2 connectors re the USB inputs, while the outputs are provided at SV3 and SV4. The connector SV5 is for the chip interface, and the connector JP2 is for the relay. The relay driver will be on the card reader PCB. That is because the switching circuit will not have any other sort of power connection. The current for the relay coil will be provided completely from the reader circuit which will have external 5V connection.
|At 25 October 2015, 7:00:24 user Giorgos Lazaridis wrote: [reply @ Giorgos Lazaridis]|
@Oliver I found this one on ebay
At 22 October 2015, 15:06:45 user Oliver wrote: [reply @ Oliver]
Where can I buy a smartcard slot? (the one you solder on the PCB)
At 20 August 2015, 22:08:48 user Giorgos Lazaridis wrote: [reply @ Giorgos Lazaridis]
@doug No i do not have them as commercial units. But I do design commercial products for customers. If you wish you can contact me by email and discuss your needs.
At 20 August 2015, 17:39:11 user doug wrote: [reply @ doug]
Giorgos, That is great. Are you or anyone commercializing these at all? I would buy 50 right now for a specialized facility I have but not sure I want to build that many myself.....
At 19 August 2015, 21:25:40 user Giorgos Lazaridis wrote: [reply @ Giorgos Lazaridis]
@Piyush Pandey I use the photographic transfer method.
At 11 August 2015, 12:01:12 user Piyush Pandey wrote: [reply @ Piyush Pandey]
This is a very cool project of yours and I must admit that its a very well documented as well with snapshots wherever required.
But Giorgos I want to know that what is the procedure you followed in making the
PCB as I am greatly impressed the print and cleanliness of the PCB.
At 21 October 2012, 4:54:26 user PCB Assembly wrote: [reply @ PCB Assembly]
This was one of the most well documented blog entries I have read in a long time. It was a pleasure to fill all the gaps I had about this topic. Well written an concise.
At 3 September 2012, 21:14:58 user pcb wrote: [reply @ pcb]
Thanks for share this pcb layout design work... its give me more better ideas for my future projects...
At 3 September 2012, 21:04:29 user Thanassis Mavrogeorgiadis wrote: [reply @ Thanassis Mavrogeorgiadis]
Very good project. Well done George!
At 14 August 2012, 20:56:06 user Giorgos Lazaridis wrote: [reply @ Giorgos Lazaridis]
@Pat I see what you mean... I think i will make some tests :D
At 14 August 2012, 20:09:12 user Pat wrote: [reply @ Pat]
@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.
At 14 August 2012, 19:48:27 user Giorgos Lazaridis wrote: [reply @ Giorgos Lazaridis]
@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.
At 14 August 2012, 18:23:49 user playfsx wrote: [reply @ playfsx]
molis eida smartcard lock skeytika oti enas apo ellinas eixe kanei kati paromio me tilekartes kai tsoup na se pali :P ! ekseretiki douleia opws panta !
At 14 August 2012, 14:39:43 user Pat wrote: [reply @ Pat]
"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.
At 4 July 2012, 8:01:53 user George Karkalis wrote: [reply @ George Karkalis]
Nice app,useful and educational if I may say so!
HOT in heaven!