Building the FabFTDI (i.e. USB to Serial Converter)


1 Introduction

This page descirbes how to make your own FabFTDI cable (i.e. USB to serial converter). FabFTDI is DIY version of FTDI cable that can be made in fablab. It uses an Atmega16U2 microcontroller and is based on USBtoSerial example of LUFA library. Figure below shows the schematic diagram of the the FabFTDI circuit:

Figure: Schematic circuit diagram of FabFTDI.


The FabFTDI is powered through USB port which provides 500mA at 5V. The USB controller needs a precise clock, therefore, an external 16MHz resonator is used as a precise clock source (note- eventhough the resonator is not as precise as a crystal, its precision is sufficient for a USB 2.0 full speed device). The FabFTDI is a USB 2.0 Full-speed device and support upto 38400bps of serial communication. The Unix and Mac OS doesn not require any drivers, however, a driver is required for windows operating system (more on this later).

2 Fabrication of FabFTDI

Figure below shows the FabFTDI board design.

2.1 Board Design

Figure: Board design of FabFTDI.

2.2 PCB Fabrication

Download the PCB trace file and outline file from the links below:

Figure below shows the milled board. Inspect for error and make sure no wires are short-circuiting.

2.3 PCB Assembly

For stuffing FabFTDI board you will need following components:

  1. Atmega16U2 micro-controller (or a compatible micro-controller such ast Atmega8U2 or Atmega32U2 with same pin count).
  2. One 0.1uF capacitor, and one 1.uF capacitor.
  3. One 0ohm resistor, two 22ohm resistors, two 499ohm resistors, and one 10K resistor.
  4. One 16MHz resonator.
  5. One 6 pin 2x3 connector (aka ISP connector), and one 6 pin 1x6 connector.

It is recommended to start with stuffing smaller and difficult components first and then bigger and easy components such as connectors. For FabFTDI, start with soldering the micro-controller as it is tricky since the pins are very close to each other. Here, I am showing an easy way to solder the microcontroller. First, carelessly solder all the pins to the pads and then use copper braid to remove excess solder.


Once the micro-controller is soldered. Solder other components like resistors and capacitors. Finally, at last, solder ISP connector and FTDI connector. Figure below shows my stuffed board.

3 Program the FabFTDI firmware

  1. Download the firmware file from here and extract it.
  2. Open a terminal and navigate to the the Firmware directory. Connect your programmer (In my case I am using FabISP) to the FabFTDI ISP connector (make sure to connect in right orientation). To program your board execute the following command:
     $ make program-usbtiny 

    (if you are using avrisp2 porgramer than execute the following command:
     $ make program-avrisp2
    (Note - The code is pre-complied, however, if you want to recompile it locally before flashing it into your FabFTDI board execute the following commands:
    Clean and remove the previously compiled files.
     $ make clean 
    Recomplie the files again
     $ make 
    Program the newly created hex file to your FabFTDI board.
     $ make program-usbtiny 
  3. Once the program is succesfully flashed, disconnect the programmer and disconnect the FabFTDI from your computer. Now, connect the FabFTDI back again to your computer and this time the operating system should detect your bouard as FabFTDI. Next section describes how to check if your operating system can detect connected FabFTDI.


4 Verify that the OS succesfully detects the FabFTDI

Once you connect the FabFTI to your computer, both Mac and Unix operating system should detect it right away without needing any driver. However, Windows operating system would require a driver (more on this later). Follow the instruction for your operating system to check if the FabFTDI is detected sucessfully


Click on the apple icon on the top-left of the screen and then click on "About this Mac". A "system information" box will open, click on the "system report" button which will open another window. On the left of the window, scroll-down and click on USB. Here you should see FabFTDI listed.  See the image below for reference.

4.2 Ubuntu

In ubuntu, lsusb command is used to list all connected usb devices. Open a terminal and type

 $ lsusb

In the list of connected USB devices, you should see FabFTDI listed.

4.3 Windows

Windows operating system need a driver for the FabFTDI to work. When you will connect the FabFTDI to your Windows PC, it will be registered as an "unrecognized device". Follow the instructios below to install the driver.

  1. Downlaod the driver (.inf file) from here.
  2. Open the device manager, right click on the "unrecognized device" and click on "update driver".
  3. Give the path to the downloaded .inf driver file and windows should be able to succesfully install the driver.

Once the drive is succesfully installed, the FabFTDI should be listed as "LUFA USB to Serial" in windows device manager. Check the image below for reference.

5 Testing your FabFTDI

We are almost done! To check that our FabFTDI is indeed functining as a FTDI cable, we would need a serial terminal through which we will send some characters to our FabFTDI. The easiest way I have found is using the serial monitor that comes with Arduino IDE. Below are the instructions to test your FabFTDI:

  1. If you don't already have arduino, download and istall it.
  2. Open the arduino IDE.Go to tools-port and select the FabFTDI port (in my case, its COM6)

  3. Now go to Tools and open "Serial Monitor".
  4. Connect the Rx and Tx pin of your FabFTDI board using a jumper wire (or a jumper, or just wrap a wire around Rx and Tx pin) as show below.
  5. Now go to "Tools" and open "Serial Monitor". In the Serial Monitor, the top text input box is for sending the character to the FabFTDI and the bottom "read only text box is showing the recieved characters. Since, we have connected the Rx and Tx pin. Any character send to the FabFTDI will be recieved back to FabFTD and should appear in the reciever text box.

    Type something on the top text box and click on "send". If you see the same characters show in the text box below, you have a working FabFTDI. Congratulations!!




6 Troubleshooting

Sometime things don't workout the way we want them to, If your FabFTDI is not working, try following things

  1. Consider using other USB port on your computer. Our FabFTDI is a USB 2.0 full speed device. Many modern computers come with USB 3.0 ports which technically should be compatible with USB 2.0, however, sometime connecting a USB 2.0 to a USB 3.0 port doesn't work.
  2. Check that you have used the right resonator. It must be 16MHz resonator.


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.