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

 

1 Introduction

FabFTDI is DIY version of FTDI cable that can be made in fablab and this page descirbes how to make it.  The FabFTDI uses an Atmega16U2 microcontroller and is based on USbtoSerial example of LUFA library. Figure below shows the schematic diagram of the FabFTDI:

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.

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 (or compatible microcontroller such ast Atmega8U2 or Atmega32U2 and same pin count).
  2. Two 3.3V voltage limiting zener diodes.
  3. Two 18pF capacitors, one 0.1uF capacitor, and one 1.uF capacitor.
  4. One 0ohm resistor, four 499ohm resistors, and one 10K resistor.
  5. One 16MHz crystal.
  6. One 6 pin 2x3 connector (aka ISP connector), and one 6 pin 1x6 connector.
  7. Optionl: An LED and a 1K resistor.

It is recommended to start with stuffing smaller and difficult component and then bigger and easy components such as connectors. For this board soldering the micro-controller is tricky as 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 Programing Fuses and Firmware

  1. Download the firmware file from here. Flash it using the following command (replace avrisp2 with usbtiny if you are using fabisp)

    sudo avrdude -p t45 -c avrisp2 -P usb -U flash:w:usbtoserial.hex:i

  2. Flash fuses using following commands

 

4 Testing your FabFTDI

  1. Connect your FabFTDI to a computer. Mac/Unix operating system should be able to detect it without any driver. For Windows, download driver from here.
  2. For testing FabFTDI, we will use Neil's hello.ftdi.44.echo board. Since our cable support baud rate up to 4800, we need to specify this baud rate in hello.ftdi.44.echo.c file. Open this file and change bit_delay_time = 208.3, compile and flash it into hello.ftdi.44.echo board.
  3. Next step is same as what you did in Embedded programming week. Connect FabFTDI to hello.ftdi.44.echo and execute command

    python term.py /dev/ttyACM0 4800

if you can see the typed character in term.py window echo'ing back then you have a working FabFTDI. Congratulations!!

 

 

5 Troubleshooting

If things don't workout, try following things

  1. Double check the polarity of the two Zener diodes.
  2. Consider using other USB port on your computer.
  3. Check if the FabFTDI is connected in the right orientation. Match GND pin of FabFTDI to GND pin of hello.ftdi.44.echo board.
  4. Make sure FabFTDI is plugged-in properly and not loose.

 

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