This week is similar to week2. We need to use equipment in the shop to observe the operation of a micro-controller circuit board as a group and to design, mill, and program an
echo hello-world board individually.
Board Design
I used Eagle to redraw the board. My classmates and I downloaded the fab lab library for necessary components and imported the "eagle_fab.lbr" file into the Eagle Library Manager. After pressed the "Use" button, we were able to expand the library folder to browse different libraries in the "In Use" tab.
To begin the PCB design process, you will need to generate both Board and Schematic View. I started with "Add Part" function in the Board View and connected all components correctly by following this reference picture.
I added all the components showed in the picture, including an ATTINY44, 1μF capacitor, FTDI connector, ISP connector, 10k resistor, 20MHz resonator. For this week's assignment, we need to add a button, and an extra LED plus a 1k resistor to the sheet before switching to Schematic View. The final routing is as follows-
It's amusing to find a working circuit map from the chaos. I encountered difficulties at the beginning, but then I figured out that some lines should go through other components underneath. After solving the routing of the circuit, I import the "eagle_fabcity-designrules.dru" in the DRC tool to check if the circuit design does not conflict to the design rules.
I added a polygon on layer46(milling layer) and narrow down the layer20(dimension layer) to get the outline to mill. I used the command "DISP NONE", "DISP TOP", "DISP DIM" to switch between layers. The final schematic sheet with all the layers showed up as shown below-
To export the PNG files you must make the Dimension layer(20) visible, while the one with the circuit routing contains the Top layer(1), and the other one with the board outline to cutoff contains the Milling layer(46). In order to run the python script, I installed
XQuartz and
Homebrew before installing ImageMagick since I was not able to figure out how to install ImageMagick on my mac with both official instruction and our gitlab document. Homebrew can install the stuff I need that Apple didn’t provide in the build-in system. After making some incorrect attempts, I typed and ran "brew install imagemagick" command in the Terminal and the ImageMagick was successfully installed. I followed the instruction here to generate the PNG files for milling. Make sure the size and the resolution are in the right settings. You can see the images I exported below-
Soldering and Programming
I made bad soldering this time. To test the programming part, you will need an FTDI cable, but it was difficult to find a spare one in the electronic shop for the CBA section most of the time.
Even though my soldering was terrible, but the programming part seems to be okay.
I followed the instruction from Joao and used a Linux system computer in the electronic shop. Firstly implement the program commands and then fuse it. The computer was able to recognize the board as a USB device, which indicates the board has been successfully burning. However, I got some problems when running term.py with the command "$ python term.py /dev/tty0/USB0 115200", which declares the port and speed.
I redesigned another PCB to test the echo function and serial communication. But I couldn't figure out if there were mistakes in my electronic design or just the lousy soldering caused them didn't work.
The FTDI cable is important since it transmit data with RX and TX pin in both directions.
I learned that the "Error 1" and "rc=-1" messages mean there are some problems on my board. Usually caused by the hardware design or soldering. I need to learn how to use multimeter and oscilloscope to fix the problems.