FabFTDI.html 5.87 KB
Newer Older
Prashant Patil's avatar
Prashant Patil committed
1
2
3
4
5
6
7
8
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>FabFTDI</title>
</head>

<body>
Prashant Patil's avatar
Prashant Patil committed
9
<h1>Building the FabFTDI (i.e. USB to Serial Converter) </h1>
Prashant Patil's avatar
Prashant Patil committed
10
11
<h1>&nbsp;</h1>
<h1>1 Introduction </h1>
Prashant Patil's avatar
Prashant Patil committed
12
13
14
15
16
<p>FabFTDI is DIY version of FTDI cable that can be made in fablab and this page descirbes how to make it. &nbsp;The FabFTDI uses an Atmega16U2 microcontroller and is based on USbtoSerial example of LUFA library. Figure below shows the schematic diagram of the FabFTDI:</p>
<img src="FabFTDI_Schematic.png" width="900" height="560" alt=""/>
<p><em>Figure: Schematic circuit diagram of FabFTDI.</em></p>
<p>&nbsp;</p>
<p>The FabFTDI is powered through USB port which provides 500mA at 5V. The USB data line D+/D- is used to communicate with the microcontrolle's USB controller. Since the data lines operate at 3.3V, two voltage limiting zener diodes are used to limit the voltage in these pins. The D- line is pulled-up to the 5V through 1.5K resistor to indicate to the host computer that the connnected device is a low-speed USB device. The USB controller needs a precise clock, therefore, an external 16MHz crystal is used as a precise clock source. The LED and the corresponding resistor R4 is optional but if used can be used as visual indication of data communication. The FabFTDI is a USB 2.0 Full-speed device and support upto&nbsp;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). </p>
Prashant Patil's avatar
Prashant Patil committed
17
<h1>2 Fabrication of FabFTDI</h1>
Prashant Patil's avatar
Prashant Patil committed
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<p>Figure below shows the FabFTDI board. </p>
<h2>2.1 Board Design</h2>
<img src="FabFTDI_Board.png" width="900" height="400" alt=""/>
<p><em>Figure: Board design of FabFTDI.</em></p>
<h2>2.2 PCB Fabrication</h2>
<p>Download the PCB trace file and outline file from the links below:</p>
<ul>
  <li>FabFTDI Board Traces (2000dpi) </li>
  <li>FabFTDI Board cutout (2000dpi) </li>
</ul>
<p>Figure below shows the milled board. Inspect for error and make sure no wires are short-circuiting. </p>
<img src="Documentation/FAbFDI_Milled2.JPG" width="900" height="836" alt=""/>
<h2>2.3 PCB Assembly</h2>
<p>For stuffing FabFTDI board you will need following components:</p>
Prashant Patil's avatar
Prashant Patil committed
32
<ol>
Prashant Patil's avatar
Prashant Patil committed
33
34
35
36
37
38
39
  <li>Atmega16U2 (or compatible microcontroller such ast Atmega8U2 or Atmega32U2 and same pin count).</li>
  <li>Two 3.3V voltage limiting zener diodes.</li>
  <li>Two 18pF capacitors, one 0.1uF capacitor, and one 1.uF capacitor.</li>
  <li>One 0ohm resistor, four 499ohm resistors, and one 10K resistor.</li>
  <li>One 16MHz crystal. </li>
  <li>One 6 pin 2x3 connector (aka ISP connector), and one 6 pin 1x6 connector. </li>
  <li>Optionl: An LED and a 1K resistor.</li>
Prashant Patil's avatar
Prashant Patil committed
40
</ol>
Prashant Patil's avatar
Prashant Patil committed
41
42
43
<p>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. </p>
<img src="Documentation/FabFTDI_Assembled.JPG" width="900" height="856" alt=""/>
<h1>3 Programing Fuses and Firmware</h1>
Prashant Patil's avatar
Prashant Patil committed
44
45
46
<ol>
  <li>Download the firmware file from <a href="Firmware/default/cdctiny45.hex">here</a>. Flash it using the following command (replace avrisp2 with usbtiny if you are using fabisp)<br />
    <br />
Prashant Patil's avatar
Prashant Patil committed
47
    sudo avrdude -p t45 -c avrisp2 -P usb -U flash:w:usbtoserial.hex:i <br />
Prashant Patil's avatar
Prashant Patil committed
48
49
50
51
52
53
54
55
56
57
58
59
  <br />
  </li>
  <li>Flash fuses using following commands<br />
    <br />
    <ul>
      <li>sudo avrdude -p t45 -c avrisp2 -U lfuse:w:0xF1:m</li>
      <li>sudo avrdude -p t45 -c avrisp2 -U hfuse:w:0xCE:m</li>
      <li>sudo avrdude -p t45 -c avrisp2 -U euse:w:0xFF:m<br />
      </li>
    </ul>
  </li>
</ol>
Prashant Patil's avatar
Prashant Patil committed
60
<h3></p>
Prashant Patil's avatar
Prashant Patil committed
61
<p>&nbsp;</p>
Prashant Patil's avatar
Prashant Patil committed
62
<h1>4 Testing your FabFTDI</h1>
Prashant Patil's avatar
Prashant Patil committed
63
64
65
66
67
68
69
70
71
72
<ol>
  <li>Connect your FabFTDI to a computer. Mac/Unix operating system should be able to detect it without any driver. For Windows, download driver from <a href="http://www.recursion.jp/prose/avrcdc/avrcdc_inf.zip">here</a>.</li>
  <li>For testing FabFTDI, we will use Neil's <a href="http://academy.cba.mit.edu/classes/embedded_programming/index.html">hello.ftdi.44.echo</a> 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. </li>
  <li>Next step is same as what you did in <a href="http://academy.cba.mit.edu/classes/embedded_programming/hello.ftdi.44.program.png">Embedded programming week</a>. Connect FabFTDI to hello.ftdi.44.echo and execute command<br />
    <br />
  python term.py /dev/ttyACM0 4800</li>
</ol>
<p>if you can see the typed character in term.py window echo'ing back then you have a working FabFTDI. Congratulations!!</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
Prashant Patil's avatar
Prashant Patil committed
73
<h1>5 Troubleshooting</h1>
Prashant Patil's avatar
Prashant Patil committed
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<p>If things don't workout, try following things</p>
<ol>
  <li>Double check the polarity of the two Zener diodes.</li>
  <li>Consider using other USB port on your computer. </li>
  <li>Check if the FabFTDI is connected in the right orientation. Match GND pin of FabFTDI to GND pin of hello.ftdi.44.echo board.</li>
  <li>Make sure FabFTDI is plugged-in properly and not loose.<br />
  </li>
</ol>
<p>&nbsp;</p>

<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.


</body>
</html>