H T Ma A
week 5

Electronics Design

This week, the group assigment was to use a multimeter and a oscilloscope to observe the operation of a microcontroller circuit board. This exercise contributed for the understanding of the current flow through the board, of the voltage drop between the components.

This week's individual assignment was to redesign a microcontroller board - the echo hello-world board - and add a button and LED to it. Besides that, we should build it using the techniques from week 3, milling and soldering, and finally programme and test it.

The first step was to download eagle as well as the eagle.fab library from the cba gitlab library. I wrote a little instruction set for that for eventual future need.

- go to:

- download eagle-fab.lbr

- Move the dowaloaded file to your Documents Folder >> Eagle Folder >> Libraries Folder

- Open Eagle >> Projects >> make new project: name it Hello World

- Double click to turn the project on (you should see a small green ball)

- Right click it >> open a new schematic

- Create a Grid for your project by typing grid at the input field in the new project schematic

- Using Neil's board layout, the right components could be identified to be searched in eagle's library

- Type add at the input field to add components from the downloaded library

- To search for the components at the library, type an * before and after the componet's name.

This were the components added

>> add t44: attiny 44 SOIC44 >>
>> add xtal 1 : RESONATOR
>> add R1: RES - US1206
>> add C: CAP - US1206FAB
>> add J2: FTDI - SMD - HEADER
>> add J1: AVRISPSMD
>> Buttom: 6MM SWITCH
>> add the LED 1206

After placing and organizing the components one in relation to the others on the project schematic window, I began to draw the lines (net command) that wwould be the traces connecting the components. The following image shows my initial attempt.

After Thomás' Tutorial I learned how to make the connections betwenn the components in a more organized and efficient way. Instead of drawing lines (net) to connect each component, I drew the lines just slightly away from their origin pin so that I could name them accordingly. Eagle then automatically connects the lines (net) with the same name.

After drawing the lines and naming them accordingly, some last steps were done before moving to the board layout's design:

- Input the resistor's resistance value. In this case 10k

- Add an extra resistor to button

- Input the capacitor's value. in this case 1uF

- Check Attiny44 Data sheet in order to find out where in the ATtiny44 the LED should be connectet to.

- Check LED location in relation to the resistor

To start the board layout, type "edit. brd" in the input field. A new window will open and your components will be shown with their respective connection lines (nets). To organize them in a propper layout, I went through the following steps:

- Select the components and their lines and type Group in the input field to group them

- Type Move >> press enter >> press command >> Right Click >> to move the group freely

- Place the group inside the board

- Start organizing the layout as you would do a puzzle.

- The Yellow Lines show the connectios that have to be draw as traces. Organize the layout of the components keeping in mind that the yellow lines should be as Short and clean as possible, preferably not crossing each other.

To begin routing the traces, first set up some important settings:

- Type "drc" in the input field >> Clearence >> 16mil for all fields >> Sizes>> 12mil for the minimum width field - To draw the traces type route in the input field

- all the Yellow lines have to be "replaced" by a respective trace

- The ground connections can be connected directly to the ground of the board >> draw a Polygon around your board (type Polygon at the input field and draw the board limits) >> Name the Sinal Name as GND >> Type rat in the input field to ratsnest

After grounding the board,I checked for eventual errors:

- make sure that all yellow lines have been "replaced" by red traces

- type "drc" in the input field >> check

At the first time, I had many erros, because my board was not grounded properly. But after grounding it as explained above I got it allright.

The next steps are:

- delete the yellow external frame

- change the layer to dimension and then draw the outline of the board

- after that type "disp none dim" to separate the board from the outline >> type "disp none top" to move from the outline view back to the board view

- type export image in the input field >> check monochrome >> resolution 1000 dpi

With the board design ready, my peers and I have placed all our individual png files together in one board so that we could mill them all at once.

At the first attempt to mill, following the tecniques of week 3 we had some unforseen events that we have not experienced before.

To begin with, we found out that milling more than one circuit board at once can be very risky. If the cupper board or the sacrifitial layer are not truly flat, it can be that some circuit boards or parts of it will not be completely milled. Besides that, we have also found out that in case an ongoing work is not properly cancelled at the Modela Machine, the commands previously attempt to be 'canceled' can still be opperating in the machine, what can possibly mess up the next steps. This happened to us. Althought the coordinates of origin were the same for the traces and the outline, because of this confusion in the machine generated from previous but not properly cancelled files, the outline was milled through the circuit board ruining it, and we hade to start over. We have learned that to cancel an ongoing work at the milling machine, we should just press cancel at MODS and wait until the machine stops completely (it takes long). After that, it is important to check at MODS at the >> WebSocketSerial, if the adress and portare open and if the status field indicates done. Otherwise the serial server should be restarted >> close >> open. Eventualy, restarting MODS is also necessary. The following pictures illutrate the mistakes that happened.

This image is an example of when ghost signals are at the machine and can interfere and perform traces wrongly, cutting through the board.*

After having these mistakes, we decides to mill our boards individually. At this point, I had an issue while milling the outline, the endmill was cutting the board bot not through the entire cut depth. As a result, my circuit board was not cut out of the cupper board. As an attempt to solve this, I have tryied out diverse possibilities, such as readjusting the endmill, restarting mods, restarting the Modela machine and even setting up a deeper cut depth than the one established by default. None of this attempts worked out. With the support of a very helpful TA, I found out that I was setting up the Z axis of the Modela Machine too low, so the arms of machine at the Z axis could not move further down. As a result it did not have room to move deeper and cut through the board. After bringing the Z axis a bit up, but still having the endmill touching the board (obviously), the problem was solved and the board was cut out. Due to this problem, the the finishing of the board at its boarders did not came out very well, but it might not interfere in its performance, it just does not look beautiful.

*same issue as the picture above

This image shows how the settings for the WebSocketSerial in the status field should be.

This image illustrates the moment when the machine was going through the outline traces but not cutting through it.

After milling was done, soldering the components at the board was pretty much straight forward,following the steps of week 3. The most challenging part was to figure out the right orientation of the components at the board. For that we looked at the components datasheets, as well as at the website of last years' students.

Programming the board was also challenging. As I did not have programmed the microcontroller done in week 3 I started with this step:
- follows the instructions at brian's page: http://fab.cba.mit.edu/classes/863.16/doc/projects/ftsmin/index.html

- downloaded the cross pack

-downloaded the firmware source code

- moved the firmware source to the documents folder >> fts_firmware >> make file

- copied the name of the progammer I was using to the make file: White box with blue stripe >> atmelice_isp

- Have runned terminal, until the command make flush as shown in the image bellow, but apparently it does not work in a MAC computer, since 6 students tried it out together and it did not worked in any of our machines. We found out the same steps would work in a computer running Linux and this is what I am going to try in the coming weeks.

The LED flashed :) (but at this step I noticed that on week 3 I have inverted the green and red leds)