USB 'hub' project

Discussion in 'The Projects Forum' started by Socket, Jan 5, 2014.

  1. Socket

    Thread Starter New Member

    Jan 3, 2014
    2
    0
    Hello all

    I want to create a USB 'hub' for USB memory sticks with 10 sockets. The way it would work is that beside each socket there is an LED light and beside each light a button which when pressed once will light the LED and make the USB socket go 'live'.

    NB:- Only one socket will be 'live' at any time.

    My question is since the buttons are not a permanent closed switch, they would simply close the circuit momentarily and pop back open, would i require some sort of microcontroller to manage the 10 LED\sockets?

    Cheers.
     
  2. 4pyros

    New Member

    Jan 3, 2014
    22
    3
    And why not just keep them all live??
    I think it would be better to do in software than hardware.
    You do not want to kill a socket while the USB memory stick is active!
     
  3. Socket

    Thread Starter New Member

    Jan 3, 2014
    2
    0
    Im starting out simple buddy!

    The idea is that no software be required on the PC, the OS should simply think a stick has been removed and another has been inserted.
    I would operate the 'hub' by finishing whatever data transfer from a particular socket prior to selecting a different socket (usb stick).

    My original circuit idea was for the two data pins (on all 10 sockets) be kept permanently wired to the PC socket, and the circuit would switch which socket is live via the 5V power to earth pins. I was going to use a single button to scroll sequentially through the 10 leds via a 5-stage Johnson counter, but realised it would be better to have a button beside each LED to select which socket i want to use..
    Any ideas on how i could accomplish this type of switch selection where the button is not permanently depressed (thus completing the circuit), im still thinking there must be a microcontroller that would suit this???
     
  4. alexfreed

    Member

    Oct 8, 2012
    72
    10
    Sure a microcontroller can do it. Or standard logic. Say an S-R flip-flop with each button wired to the S input and a circuit to generate reset to all other flip-flops on the positive edge of the Q. More interesting is the switch. With all data pins wired together it will most likely not work. Probably need CMOS analog switched on the data lines.
     
  5. R!f@@

    AAC Fanatic!

    Apr 2, 2009
    8,753
    760
    without safely removable of USB memory devices data corruption occurs.
    A switch will just do tht.

    U can use windows to remove it and then just unplug it.
     
  6. 4pyros

    New Member

    Jan 3, 2014
    22
    3
    I dont think you can just switch USB devices on and off like that without losing data.
     
  7. wayneh

    Expert

    Sep 9, 2010
    12,103
    3,038
    Sure you can, it's called hot swapping and we do it all the time.

    I've seen a solution to a problem like this using just LEDs. There's some elegant way to turn all the others off when turning the right one on. I just can't recall how it was done. I'm thinking of a comparator with hysteresis but it's just not coming together in my head. :(
     
  8. R!f@@

    AAC Fanatic!

    Apr 2, 2009
    8,753
    760
    Can u hotswap using push buttons ???
     
  9. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    Where will be the data pins connected to? You will need a 10-port usb hub to make this work, you can´t just hack all the data pins together and hope for the best.
     
Loading...