For this week our task was to design and mill the Hello World Board adding a button and an LED to the board circuit. Given I had previous experience with Eagle I chose to use it as my PCB design sofware. As a starting point I used the board designed Neil (pictured below).
I choose to redraw the board in Eagle. Below are the schematics of my final board. I tried to organize the board by using less nets and make use of the Name feature in Eagle to connect signals. In this way the schematic looks tidy. I also checked the pinout of the Attiny44 to make sure I got the pins in the correct orientation.
I looked up the ATTiny Datasheet to check if the pins on the datasheet matcched the ones on the library and to ccheck the orientation of the microcontroller.
Having checked the datasheet I listed the remaining components based on Neil's design. For the button I choose to connect it to pin 6 of the microcontroller and connect it to ground with a pull resistor. For the LED I calculated the value of the resistor based on current rating and forward voltage drop of the LED. A 330Ohms resistor would suffice so I chose to use the 499Ohm resistor we have.
This is the final component list of the board:
ISP 2x3 header
1 uF capacitor
6mm switch (button)
For layouting the board used Eagle appluing the design rules of 16mil clearance and using a trace width of 10mm. This gave me some freedom of design but I found hard at some points to trace between pads of the microcontroller. I took me a few tries until i could get all traces to work within the board layout. I then ran the drc command to check of any errors and make sure that no airwires were present.
I then exported the board to mods and used the milling machine to mill the board. I exported the image using 1000dpi of resultion on Eagle. Based on previous experience I knew that on Maccbook retinas 1000dpi is twice the the real size of a board. So I opened the exported PNG in Photoshop and resized the board by 50%.
The board milling went smoothly, I got a board with healthy traces to the design that I had intended. I then moved on to soldering the board. My soldering skills improved, I managed to get all components soldered without any issues.
Here is an image of my final board milled without any components. After milling the board I then washed it with IPA and let it dry before soldering the components.
After soldering the components when checking the final design of the board with the schematic I realized that I didn't draw a trace. In debugging my board by probing with the multimeter I found that I didn't connect the reset pin from the 6 pin header to the microcontroller port. I then did a quick hack to try to connect the board. This is a temporary solution and would be ultimately replaced by a trace.
This is far from ideal but my plan was to move on and test the board like this to validate the design and then I will come back to fix the issue by redrawing some of the traces.
In this last step I encountered a lot of issues which I am still working through.
Here is where I ran into issues. After assembling the board I went on to connect it to my computer to program it using my programmer. The first issue I ran into was that ATTINY programmer board couldn't be found by my Macbook Pro (using USB-C). I then ported the code to a Desktop Macmini. In the Macmini the ATTINY could be found but when trying to run the command as described in programming tutorialI first was facing a -1 error from Avrdude.
After solving the issue with the reset button I stumbled across a new problem. When trying to upload the software I was getting a error that the expected id of the board was mismatched. Which made me suspect that the microcontroller that I was using wasn't in fact the 44 (even though I got it from the drawer of ATTiny44). After comparing it with Jack's board I then noticed that the chip inded wasn't the correct one which explains the issue I was facing.Here is an image of the defunct board. My plan now is to: update the design of the board with a new rev that includes the missing reset cconnection. (2) select and check the ATTiny board before I solder in the component. (3) Assemble a new board.
I wan't really happy with this result, so I decided to design, mill and populate a new board.
In my new design I fixed the issue with the missing reset trace. It took me some time to redefine the traces and I had to move the components around to the new design. I also added a bit more space on the right of the board for the FTDI connector to sit nicely on the edge.
First you have to connect the board to the programmer and make sure that the pin orientation is correct. If the pins aren't correct (either on the 6-pin header or FTDI) you see orange or red blinking lights. If all pins are correct you then see green lights.
2. Put both files in the same directory, connect the FTDI and 6-Header Pin and run:
$ make -f hello.ftdi.44.echo.c.make
If you are using your own ATTiny Board:
$ make -f hello.ftdi.44.echo.c.make program-attitny
$ make -f hello.ftdi.44.echo.c.make program-attitny-fuses
If you are using AVRDude:
$ make -f hello.ftdi.44.echo.c.make program-avrisp2
$ make -f hello.ftdi.44.echo.c.make program-avrisp2-fuses
You should see a confirmation that the program has been uploaded OK before moving to the next step. Below is the output that you should see if the commands worked.