1. Milling Machine

This week's main purpose is to make a FABISP. It is a downloader for download code from computer to MCU. All we have to do this week is download a PNG file from web and make it.
I downloaded Valentin's board from here. And here is the PNG.

There are two png files. One for the circuits and another for the boundary.
Then open fabmodules.org to make the milling files. Follow the steps.

1. Input image and choose Roland mill for output.
2. Choose PCB traces(1/64).
3. Choose the output machine.
4. Set x0,y0,z0 to 0.
5. Click calculate and save the file.
6. Open the Roland milling machine software. Set the origin point and input the file output from fabmodules.org.

We have encountered a lot of problems, I will refer to them in the third part of this article.

2. Solder and download the code

In this part we need to solder the PCB board. Because I am an electrical engineer so I didn't encouter much problems in the soldering process. But I do take a lot of time to debug. First let me introduce the ISP making process.

Open the terminal and type:
sudo apt-get install flex byacc bison gcc libusb-dev avrdude
sudo apt-get install gcc-avr avrlibc libc6-dev

Then download the Firmware and unzip it. You can use:
wget http://academy.cba.mit.edu/classes/embedded_programming/firmware.zip
Then edit the makefile.Go to the line that says:
#AVRDUDE = avrdude -c usbtiny -p $(DEVICE) # edit this line for your programmer
AVRDUDE = avrdude -c avrisp2 -P usb -p $(DEVICE) # edit this line for your programmer
- If using the USBtiny programmer or another FabISP
- Remove the "#" in front of the line with "usbtiny" in it
- Add a "#" to beginning the line with the "avrisp2" in it to comment it out.
- save the Makefile
Then program the FabISP. CD to the file. Type:
make clean
make hex
sudo make fuse
sudo make program

If success, you can use lsusb in the terminal and see there would be a "usbtiny" here.

Finally, make a connector like this. Just pay attention to the direction.

And my final board:

3. Problems and debug

1. Fabmodules.org

There are a lot of parameters in fabmodules. Every parameter is useful. The most important is to set the tool diameter. Although we use a 0.4mm endmill, it's too large for some calculating. So we need to make it small. Then you need to adjust the num of offset smaller and offset overlab bigger to make the circuit width turn into regular size

2. Milling Machine

Make the board stick to the platform!

Make the board stick to the platform!

Make the board stick to the platform!

Important thing goes three times.

Do not make the endmill to close with the machine. Or the machine will go crazy in Z axis. Because there will be some punch in the machine.

3. PCB board

You must carefully exam the board after milling. There always appear some wrong line during the milling.
I have encountered a problem during programming. After I doing make fuse(this is ok), then when going "make program" it always said "initialize error". Because after making fuse the chip will use the ouside crystal, the problem thing may be the crystal. After two day's debugging, i found the problem is there is a tiny tiny line between the crystal pin and another circuit. Just cut and slove the problem.