During this week I designed, fabricated and tested a basic board for the ATtiny44 from scratch.
I decided to create a board utilizing the Hello World FTDI as an example (Figure 1). I decided to use Autodesk Eagle as a EDA (Electronic design automation) to design my board. It is one of the most utilized tool for the hobbyists all around the world. In the future I might try other alternatives. My board should include in addition to the previous components:
The lists of components to use are:
I installed Autodesk Eagle 8.0.2 in my Linux machine. Next, I had to install the Fab Lab components library (fab.lbr) containing majority of components from the Fabinventory. I just downloaded the library and placed in the "library folder" of my Eagle installation. Actually, you can set where Eagle looks for your personal libraries in Options>Directories. Finally, in order to be able to to use the library, I should select it on the left menu, click with the right button and select Use. Other option is to click on the gray button located at the right of the library name.
After creating a new project File>New>Project, I need to create the schematics: Put the mouse on the new created project>Right button>New>SchematicA schematic diagram, is a representation of the components of a circuit using graphic symbols (simple shapes). It shows also the lines which connects the components and through which the electricity flow. Figure 4 shows the main buttons of the UI. When you press the button Add component you select a component from the libraries in use to be added to the schematics. In order to simplify the search of components (reduce the number of options) i marked as used just the fab.lbr and the supply1.lbr. I marked the rest as not used by clicking on the green button.
When you add a component (using the Add component button) is very important that you choose adequate encapsulation. We are not using throughhole components but surface mounted ones, so we must be sure that we select that encapsulation. Usually, components in the fab inventory contains the FAB suffix somewhere. When you add a component (press Enter button when you have selected the correct component), the ADD window opens again. If you want to remove this window just press ESC button. If you cannot find the adequate component, you can use the Search button.
If you want to move a component, just press the Move button from the Menu and click on the cross located inside the component you desire to move. If you want to rotate a component, select a component using the Move tool and press the right button of the mouse.
I added all the components and give them adequate Name and Value using the buttons on the Menu. The name is the reference name of the component (e.g. R1) while the value is the real value of the component. For the components that does not have a value (e.g. LED) you must add a significant characteristic (e.g. color of the LED).
After that you must create the connections among the components. To that end, I used the Net tool and NOT the wire/linetool. In order to simplify the circuit I gave names to some of those Nets using the Name tool. Two nets with the same value will be linked in the board file (they belong to the same electrical line). In order to visualize the name of the nets use the Label button.
After creating all the connections, I run the ERC (Electrical Rule Check) to check that there are no problems with the signals. I got two warnings (Figure 8), but they were caused by the way I drew the circuit. After the schematics was correct I moved to the board view pressing the button Generate/switch to board view. This view permits drawing the traces for the circuit. The main tools I utilized are shown in Figure 9.
I made sure that the traces had the correct size. We are using a milling bit of 1/64. We have to be sure that the isolation lines are of the correct size. Considering that we are using several offsets of 50% we cannot choose a width for the line much smaller than the milling bit. Hence, I thougth that 0.015 mils was a good size. Go Settings>Width and be sure that it is marked 0.016. You can move the components using the Move button. I placed all the components in my candidate initial position before starting any traces. I had to move from the schematics to the board view several times in order to check the names of the components. I finally opted to print the schematics in paper to make my life easier.
I created manually all routes using the Route button. However, before starting the manual work I pressed the Ratnest button. This button calculate the shortest airwire for the current position of all the components. Once you are drawing a route you can select multiple wire bends (straight angle, non-straight angle, linear, round ... They are quite helpful in order to draw adequate lines. By default, Eagle use a snap grid to place the routes. You can define the grid size pressing the Grid button. In addition, by pressing Alt while creating the route you can define a finer position. You can also set up the Alt resolution in the Grid tool(Figure 10). For some routes I had to set the grid to 0.025 inches with an Alt resolution of 0.005 inches.
The whole process took me quite a lot of time. It was really difficult to imagine which was the best position to place the components initially to reduce the paths and do not have routes that cross each other. I could not manage to create a network without crossing so I had to use 1 0Ohm Resistor to overcome one line cross. Actually, I also realized that having the MISO and MOSI pins of the SPI available in the pin header for external connections (I called it GPIOT) was really problematic, so I finally decided to remove those connections. The new pin header GPIOT had only 4 connections: TXD, RXD, GPIO1, and GPIO2. The current version of the board is shwon in Figure 11.
Once the board was ready I firs inspected visually, using the Show object button, that all the connections were correct. After that, I run the Design Rule Check to check if the clearances were correct. Before I had to configure those values in the Clearance tab of the DRC(Figure 12). I set all the values to 16mil (the size of the milling bit: 1/64 inches)
The clearance test return several errors, because some lines were really close one from each other (Figure 13), or very close to the pads. To solve the errors I had to move the lines, change the wire bend in some of them and use a finer position for the grid (0.01 inches) in order to position more accurately the traces.
After I managed to remove all clearance errors, I removed all unnecessary layers using the Show/Edit/Hide layers button. I just left the Top layer (the one containing the lines and the Pads). In order to show again a hidden layer you must click on the layer number from the Menu (Figure 14)
The final result is shown in the following figure:
Next we had to edit a little bit the files before being able to send it to Fabmodules so it creates the .rml. The process is as follows:
After creating the .rml file I noticed that some of the traces were so close, that it could only do one offset, instead of 4 (Figure 17). Hence, I decided to go back to Eagle and reduce the width of some of the most problematics line from 0.016 to 0.012. Furthermore, I redo some of the bends to ensure more distance among tracks. The new .rml file managed to have at least 2 offsets in all the lines. Final version in Figure 18.
I used the same method as in Week 4 assignment. I had some problems with the board, since it look like that the FSR1 was a little bit bent. Hence, I had to mill it twice, the second time with a depth of 0.25 instead of 0.15 that is the default one that we use for our machine setup. The final board is shown in the following figure
The stuffing process took some time. I still need some practice with surface mounted soldering. However, although it is not a piece of art, I managed to create a working board.
A few months ago a built a a little bit simpler board. Then, I utilized a reflow oven instead of solder ironing and the results are better at least esthetically
I started checking visually the board with the help of a microscope in order to find possible visible shortcuts.
After that I used the multimeter to check continuity and find possible shortcuts. Fortunately, i did not find any problem.
Next step, was to program the board. I downloaded the software from the Embedded programming week. Actually I downloaded the following files:
I utilized our instructor's FabISP programmer to upload the program to our board. This programmer powers also the board, so i do not need to connect the board directly to my computer.
I run the following commands to compile, program and test the board:
make -f hello.ftdi.44.echo.c.make: Compile the code
sudo make -f hello.ftdi.44.echo.c.make program-usbtiny-fuses: Setting up the microcontroller for programming
sudo make -f hello.ftdi.44.echo.c.make program-usbtiny: Flash the microcontroller
python term.py /dev/ttyUSB0 115200: Run the python application app which connects with the serial port of the board.
For knowing the serial port in which the USB device is running in my computer I run the following command:
dmesg | grep tty
It looks like everything is working as expected. I managed to write messages in the terminal and board returns the echo.
This week I got acquainted with Eagle software. Although I had used once before, it is the first time I face a design problem by myself.
Creating the routes to connect different signals is, with difference, the most complex topic I dealt with during this week. It is very difficult to guess beforehand which the best position for the components to generate efficient routes. Furthermore, sometimes it was rather complex to create a route in which two signals does not cross with each other. I guess that with more training, I will improve my skills and manage to make this process quicker.
I still find also some difficulties soldering the surface mount components. This board was more challenging that the one we built two weeks ago. But, this time I felt more confident soldering.
I learned to use Eagle software. I think now I have better intuition on how to create the routes. I still need to practice a little bit more with the soldering. Although the board seems to work, it is still not "beautiful".