Tuesday, June 26, 2012

Raspberry Pi (removing hub and adding a Li-Ion battery)

I had some problems regarding USB on the RPi + lapdock. I bought myself a Tp-Link TL-WN723N wireless (b/g/n) USB adapter to use it with my new "laptop". The problem was that it would not work with the lapdock connected at the same time. If I connected only the wireless dongle, it worked fine. Also, if I connected only the lapdock, it worked OK. When both of them were connected at the same time I got freezes and lots of kernel errors.
I took a risk and removed the onboard USB hub (from the RPi) and everything went back to normal. I don't know if it was a software issue (though they worked fine when connected individually) or a hardware issue with the onboard hub. Of course now I don't have any Ethernet connectivity on my Pi so I basically transformed the model B into a model A. Because of this, there was no more need for the USB (since the only USB connection was routed to micro USB connector) and Ethernet connectors so I decided to unsolder them too. RCA, P2 and audio were the next ones.
This is actually pretty cool in two ways: wireless works and RPi draws a lot fewer power (which is great for mobile applications). Ethernet is useful in some cases but I can always connect an USB-Ethernet adapter.


A 2nd problem with the Raspberry Pi + Lapdock combination is that the lapdock switches the power supply off, for about 2 seconds, when you close the lid. This is really annoying. I thought of adding a Li-Ion (from some unused phone I had) battery to the RPi PCB since I now have a lot of free space. So the plan is to pass the 5V from the input to the Li-Ion charger (MAX1555) which charges the battery. Next, the voltage from the battery is passed trough a switch (power switch) and straight to the RPi. For this, I removed the fuse (F3) from the PCB.


A Li-Ion battery has a max voltage of 4.2V. This would be a problem if I would want to attach something to the RPi's USB ports, but since I don't have any USB ports on my RPi, this works just fine for me. HDMI seems to work just fine with the lapdock (with a 4.2V input voltage).


Below is a basic "schematic" that shows how the battery is connected to the RPi. The blue connections are GND and they are connected together (the connection is missing in the drawing).


Remember that F3 is removed from the PCB.


Li-Ion battery also raised another problem. The RPi 3.3V regulator is a linear one (LM1117-33). This means it's not so efficient, but the biggest problem is it's voltage drop. According to the datasheet, the voltage drop is somewhere around 1.2V. This means that to get a 3.3V output, you need to provide an input voltage of, at least, 4.5V. So this could only mean one thing: replace it.


But about the 3.3V regulator replacement in another post.


Comments and suggestions are welcomed below.

3 comments:

  1. Hi,

    like your projekt very much. I thought of doing kind of the same thing with mine but changing the hdmi connector seems too much work for me so I used an adapter. Don't know if you thought about that but i replaced the speakers with a 3,5mm hedphone jack. Works ok but there is al lot of noise because my headphones only take 32ohm instead of the 8ohm the lapdock requires.
    Also do you have a suggestion how to wire up a standard usb to the usb cable?

    Ok keep it up
    Sebastian

    ReplyDelete
    Replies
    1. I was thinking of adding a 3.5mm audio jack but don't have much time and there isn't a lot of space to add it (I would also keep the speakers).
      Not sure what you mean by USB to USB cable. What do you want to do?

      Delete
    2. yeah i had to remove the speakers an cut some parts but fits in good. I've tried to build a custom micro usb cable to standard usb but the micro usb connector is too small for my skills so i'll probably just cut off the connector of the dock an wire them directly to the standard usb connector.

      Delete