Thursday, June 29, 2017

Modify Dell multimedia keyboard from USB bus powered to self-powered

As a hobby I really enjoy thinking and tinkering electronic components and circuit board. That's why I rushed into online shop Core Electronics and fetched my Raspberry Pi Zero Wireless when it was released. Soon I discovered RP Zero is not like RP 3 as a self-contained computer, it requires quite a few attachments to make it work especially the USB hub. RP Zero only provides one USB port and you have to use a powered USB hub in order to connect multiple devices.

So I took out my Dell multimedia keyboard model number KB522 which looks like this
The keyboard comes with two USB ports which is very useful when you connect it to RP Zero, I have no problem to connect the keyboard with a mouse hook to one of the keyboard USB ports. Now the fun part comes, I need copy some files from my thumb drive to RP Zero and of course I just plug my thumb drive to another port and think it will work but the answer is NO. I cannot access my thumb drive from RP Zero at all! What happened?

As a sanity test, I plugged the keyboard to my desktop which is running Windows 7 and as soon as I inserted the thumb drive, Windows complained USB Hub Power Exceeded. What does this error mean? Microsoft's answer is as useless as usual with suggestions that you should change to another port or you have connected too many devices to your hub. OK, I'll find the real answer by myself. By checking the Generic USB Hub properties from Device Manager I discovered the USB keyboard is bus powered and the maximum current for each port is 100mA but my thumb drive need 200mA to run. Alright the answer is my keyboard USB hub need more power from external.

I started my searching of adding external power to USB hub and Google gives me these two very useful article Adding an External Power Supply to a Cheap USB Hub and How to add an external power supply to a USB hub. The first article implies we can simply connect an external power supply to the input USB positive and ground pin to provide additional current to the hub. The later article is more elegant to allow both bus powered and self powered modes. So I tried the first solution by soldering an additional USB cable to the input USB pins but no success, no matter I plug the external power supply or not, Windows still recognise the USB hub as bus powered.

Then I have to go deeper to check the chip

(This picture already contains my external power supply cable.)

The chip is FE1.1 and soon I found the datasheet and demo board picture of this chip.
Apparently the chip supports powered Hub feature but how can I make the Dell keyboard USB hub to powered hub? So I started searching the USB hub schematic design and found following very useful information


Pin 36 BUS_B is used to control the working mode of FE1.1 to be bus powered or self powered. Then I used my multi-meter to find out that the blank R21 point is connected to pin 36.
(The red rectangle contains the two connected points.)
I have tried to short the resistor R24 to see whether the hub will be self powered or not but failed. According to above schematic designs the BUS_B has to connect to 5V to enable self powered mode. So here we go

(Left cut the computer 5v line and insert a 2A diode, right connect the R21 point with the external 5v)
Finally put everything together, I do need enlarge the cable hole on the back cover to run the additional power cable

I use a 5v 1A power supply and bingo everything is working happily now :D.
Happy hacking and enjoy!
BTW, this is my Tictac RetroPi and my son is playing Pokémon on it :)




SIZEOFINFINITY[∞]


3 comments:

  1. Hello,
    same keyboard, same problem :( This is very useful, thanks.
    So 5V from PC is disconnected completely or diode is in series with it? On your pictures it looks like cathode of diode is connected to R21.

    Regards

    Marko

    ReplyDelete
    Replies
    1. Hi Marko,

      Glad this post helps :D. The diode is inserted between the keyboard 5V rail to allow the keyboard works under both in powered or passive mode as yktool's blog https://yktoo.com/en/blog/post/216 explained. The 5V from power supply is connected to R21 as the additional power to enable the powered mode.

      Best Regards,

      SIZEOFINFINITY[∞]

      Delete
  2. I just want to let you know that I just check out your site and I find it very interesting and informative.. dell power supply

    ReplyDelete