LaFonera Hardware USB

From DD-WRT Wiki

Jump to: navigation, search

You are here: DD-WRT wiki mainpage / LaFonera / Hardware / USB


[edit] USB-interface

Someone should find some information or write a little tutorial. PAY ATTENTION!!! You cannot connect it directly to a PC USB port. This mod just added a usb connector, but not a USB CONNECTION!!!

[edit] USB port for Serial Console

I have modded one of my LaFoneras with a USB socket, which is connected to the LaFoneras serial console. A USB port is imo a better option than fixing a large, ugly serial port to the side of the LaFonera. Note - This is just a method of using a USB port for a serial console, you still have to connect this port to a TTL to RS232 level shifter, you cannot connect it directly to a PC USB port. Well, you could, but it wouldn’t work. :) Unfortunately I don't have a camera with me at my Uni flat, so I can't take any photos of the end result at the moment.

Before you read on you should be familiar with the internals of the LaFonera, so read this article first: LaFonera_Hardware_Serial-Cable-Port.

[edit] Parts

These are the parts I used. Note, I used a USB type B socket, which is the square kind, rather than the normal type A.

Required parts:

  • 1x USB type B PCB socket link
  • 1x USB type B plug link
  • Some 4 core cable.
  • IDC 0•05in Pitch Ribbon Cable link
  • Double-Row 2x5 IDC Cable Connector (this is like a mini IDE hard drive cable end) link
  • Some strong glue capable of fixing metal to metal. Some kind of Epoxy resin should work well. I like a kind called "Poly Power Glue" which is an own brand glue from B&Q in the UK (I don't know its technical name, there is no info on the package). I prefer it to normal Epoxy resin glues because it starts off not being very sticky, so it is easier to work with.


  • Some heat shrink tubing to keep the joins tidy. link


  • A utility knife
  • A small saw like a junior hacksaw or coping saw to cut the grey plastic case. A dremel would also be ok if you are careful. At a push you could use the utility knife.
  • Something to strip & cut the cable with. You can cut the ribbon cable with the knife.

[edit] Instructions

You can do these in which ever order you like for the most part.

[edit] USB Plug Cable Assembly

The USB type B plug will come in 3 main parts. The long metal outer body, inner plastic part with the 4 pins and the metal clip end which clips into the main body and crimps the cable to hold everything in place.

First strip about 2cm (1/2") of the main insulation off your cable, then strip 0.5 - 1cm (1/4") each of the 4 internal wires, and twist each wire to stop them from fraying.

The soldering end of the pins on the internal plastic bit are shaped to hold some solder. Melt a little solder onto the end of each pin, then to attach the wire, melt the solder again, place the exposed metal of the wire into the solder and remove the iron. The solder should harden, holding the wire in place. Repeat for each of the pins and wires. Note - You need to make sure you keep track of which wire is going to which pin at each join. It is best to note which wires go to what at each join so you won’t have to check which wire goes where later.

Once all the 4 pins are soldered, push the internal plastic bit into the outer metal part, then clip in the metal securing piece. Finally squash the crimping bits at the back of the connector round the cable with pliers to hold the cable securely without putting pressure on the solder joints if any pressure is put on the cable.

Note - You solder the other end of this cable to your TTL to RS232 level shifter.

[edit] USB socket assembly

I used a USB type B socket because a) I only needed one plug b) People are less likely to plug in a normal USB cable by mistake, thinking it was a real USB port.

I placed the USB port to the right of the Ethernet port, hard against it and parallel with the top of the Ethernet port to keep it as far away from the PCB as possible.

By default, the type B USB port has its soldering legs coming out of the bottom, which is no good because there is not enough room inside the LaFonera for the wires to come out of the bottom. However, the back of the type B USB port is removable. The Metal shell of the port is in 2 parts, the rear part can be carefully removed to reveal the 4 legs. You can then solder the ribbon cable directly to the back of the port, rather than the bottom.

Soldering the wires from the ribbon cable can be tricky. First you need to work out which wires to solder, and cut back the rest by about 1cm (1/4") to make room. Then strip about 0.5cm off the end of the 4 remaining wires, and solder them to the plug.

Make sure you are soldering the right wires from the ribbon cable. The red cable of the ribbon is number 1, and you count across from there to 10. The image on the left shows the 10 headers on the LaFonera PCB, 4 of which are for the serial console. Pin 1 is top left, pin 2 is top right etc, so the numbers go like this:


Once you have soldered the correct wires from the ribbon to the socket, you can attach the IDC cable connector to the ribbon cable. This is what attaches the ribbon cable to the headers on the LaFonera PCB. It is quite easy to attach.

First, estimate how much ribbon cable you need, taking into account any folds. Now place the ribbon onto the exposed teeth of the connector, making sure the cable is lined up correctly so that the teeth can pierce the cable and make contact with the wire inside. When it is lined up properly place the securing clip onto the top, and press the two halves together. You will need quite allot of pressure to get the two halves to join together. I would put the larger part onto a table, and push the top down onto it until the teeth pierce the cables, and the two halves clip together securely.

Once you have attached the connector, It is a good idea to check the pins in the USB port are connected to the right holes in the socket with a multimeter. If they are all OK It is probably a good idea to seal up the back of the USB port to stop the bare wires from touching each other or snapping off. Just use some of the glue from the parts list. Makes sure it is not special conductive glue or something. :)

[edit] Modding the Case

The USB-B socket will be placed directly to the right of the Ethernet port (just left of the antenna). It will be touching the Ethernet port, so it can be glued onto it to hold it in place. The top of the Ethernet port will be parallel with the top of the USB-B port, but slightly below to take into account the slight indentation in the plastic top of the LaFonera.

You will need to modify both the white top and the grey bottom of the case to make a hole for the USB-B socket. If you look on the white top where the Ethernet port goes, you will see the ridge on the top has been removed to let the Ethernet port sit flush with the top. They have also indented the top slightly, but that is too much hassle for this mod. Using the USB-B socket, measure how much of the ridge you will need to remove to fit it. Mark the point with your knife, then carefully cut away the ridge until it is flush with the plastic.

Remove the PCB from the case before you start cutting the grey case. Using the USB port as a template, mark with the knife (by lightly scoring) the amount of the grey plastic base you need to cut out. Remember - Start by cutting off less than you think, and then trimming away more with the knife as necessary. You can always remove more, but you can't add some back if you cut off to much! Then slowly cut out the square you marked from the grey plastic with your saw or knife. I don't recommend using a knife to cut out this much plastic, be very careful if you do.

[edit] Gluing the USB-B port to the Ethernet port

Make sure you have soldered and tested the USB-B port before you glue it in place.

This is quite easy if you have cut the square hole right in the case. First scratch up the sides of the Ethernet port and USB port that will be glued to give the glue a key on the smooth metal. Glasspaper/Sandpaper (whatever you call it) is perfect, or just use the knife if you don't mind screwing up the blade.

Then apply a fairly thin layer of glue to both surfaces to be joined, and place them together. The tight fit of the case was enough to hold it in place while the glue dried for me, but you may need to secure the USB port in place while it dries. Just leaving the LaFonera on its side should be enough to prevent the port from moving.

[edit] Result

As I said above, I don't have a camera with me at the moment, but I do have a crappy scanner, so I have attempted to take some pictures of the LaFonera with the scanner. They are really bad pictures, but enough to give you an idea of what it looks like. Click them for a larger image.

View from the top
View from the top
View from the back showing the USB-B port
View from the back showing the USB-B port

-Hal 23:14, 12 Mar 2007 (CET)