Assignment: Group: Characterize the specifications of your PCB production process. Individual: Make an in-circuit programmer by milling the PCB (program it, so that you can use it to program your board in Electronics Design week, and in other weeks). Optionally, trying other processes.
Learning outcomes: Describe the process of milling, stuffing, de-bugging and programming. Demonstrate correct workflows and identify areas for improvement if required
Assessment: Have you
The machine which we were using was the stepcraft c300 for making our outline for our pcb.
1. The first thing I did, was to download the traces file, and the outline file as image files (png) to my computer.
The tools which we used were Flatcam 8.9.0 and inkscape
and we also had to install the Winpcnc software to work with our stepcraft machine.I then went ahead and imported my trace file and outline file of the pcb into inkscape and bitrace it. I then saved them as a dxf file onto my computer.
I then went ahead and imported my trace file into Flatcam as dfx and on initial import I had to change the base parameter from px to mm. I then went ahead and change my selected object parameters
Flatcam | Selected |
---|---|
Tool Dia | 0.2 |
Cutz | -0.2 |
travel Z | 2 |
Feed-Rate-X-Y | 3.0 |
Feed Rate Z Plunge | 0.5 |
Spindle Speed | 10000 |
note: Set origin to origin of coordinates
Uncheck the option about ignoring gcode parameters
Then I went and generated my file pcb.dfx_cnc file and saved it onto my computer.
I then went ahead and open Winpcnc and imported my cnc file.On initializing you need to select your language and which machine you need the parameter for in my case was stepcraft c-2/300.
I then went ahead and double check my parameters from the parameter menu item and double checked.
Most of the parameters have been setup into flatcam. I only had to tick the "invert Z coordinates" option into Import Formats options. Before launching the machine I had to setup the zero. Into move>jog, we can manually move the machine to our desired zero point. We used a sheet of paper between the mill and the PCB to have a precise Z-zero. When X, Y and Z are to my desired point I just click the 0-XYZ button as shown on the picture below and the machine goes to a safe position 10 millimeters higher.
Then I went to parameters tools and make sure the spindle speed was correct I choose 1000 and in the speeds tab I changed the V-Plunged and V-Advanced parameters. And double checked the Dimensions Tab.I also changed on the import format tab to Invert-Z coordinates.
After double checking I then clicked on move and start.
After the traces were finished I then went ahead and did the same thing for the outline file so that it can outline around my pcb with the same initial parameters.
I learn alot this week working with the cnc machine. Starting with helping assembling the stepcraft c300. It took us 10 hours to put the step craft together and getting it to work.The machine looks small but it takes time to assemble it and callibrate it correctly.
Working with the stepcraft took up alot of our time because when trying to install the software (winpcnc) to work with the stepcraft we initially could not get it to work. The software was crashing on our windows os. Another issue which we were having after that was scaling and getting the correct measurements for the the traces and outline images we had to use to mill our pcb.
We had to really take alot of time to adjust the specifict x y z positions and speeds of the stepcraft machine to get our pcb milled. We actally destroyed a few boards and 5 end mills before we could get the 8 pcb boards milled for our weekly assesment.
1.The first thing which I did was to gather my components using the skematic from fabacademy website.
2.Then I went ahead and set up my soldering station and started soldering my pcb.
3.Soldering my pcb
I started off by using my arduino uno as isp to flash the firmware unto my atiny44a. I had to do some research on iscp the pinouts of the arduino uno so I can map it correctly
I then went ahead and connected my pcb to the arduino power them up and connect it to my laptop. The first thing which I did was to upload the defaul arduino isp code to the arduino uno then it was ready to be used as an isp to program the atiny44a
I then went ahead and followed the Fab Academy Instructions for ubuntu for programming my board
Open your terminal / command line interface and move to the firmware directory.
Ubuntu / Windows type:
For Mac users who downloaded the modified firmware:
rm -f main.hex main.lst main.obj main.cof main.list main.map main.eep.hex main.elf *.o usbdrv/*.o main.s usbdrv/oddebug.s usbdrv/usbdrv.s
Type:
If you are successful - you will see this response from the system:
avr-gcc -Wall -Os -DF_CPU=20000000 -Iusbdrv -I. -DDEBUG_LEVEL=0
-mmcu=attiny44 -c usbdrv/usbdrv.c -o usbdrv/usbdrv.o
avr-gcc -Wall -Os -DF_CPU=20000000 -Iusbdrv -I. -DDEBUG_LEVEL=0
-mmcu=attiny44 -x assembler-with-cpp -c usbdrv/usbdrvasm.S -o usbdrv/usbdrvasm.o
avr-gcc -Wall -Os -DF_CPU=20000000 -Iusbdrv -I. -DDEBUG_LEVEL=0
-mmcu=attiny44 -c usbdrv/oddebug.c -o usbdrv/oddebug.o
avr-gcc -Wall -Os -DF_CPU=20000000 -Iusbdrv -I. -DDEBUG_LEVEL=0
-mmcu=attiny44 -c main.c -o main.o
avr-gcc -Wall -Os -DF_CPU=20000000 -Iusbdrv -I. -DDEBUG_LEVEL=0
-mmcu=attiny44 -o main.elf usbdrv/usbdrv.o usbdrv/usbdrvasm.o usbdrv/oddebug.o
main.o
rm -f main.hex main.eep.hex
avr-objcopy -j .text -j .data -O ihex main.elf main.hex
avr-size main.hex
text data bss dec hex filename
0 2020 0 2020 7e4 main.hex
Next, you need to set the fuses so your board will use the external clock (crystal)
Type:
If you are successful - you will see the following response from the system:
avrdude: AVR device initialized and ready to accept instructions
Writing | ################################################## | 100% 0.00s
Reading | ################################################## | 100% 0.00s
Writing | ################################################## | 100% 0.01s
>Reading | ################################################## | 100% 0.00s
>Reading | ################################################## | 100% 0.01s
Writing | ################################################## | 100% 5.68s
Reading | ################################################## | 100% 0.01s
Writing | ################################################## | 100% 0.00s
Reading | ################################################## | 100% 0.00s
Writing | ################################################## | 100% 0.00s
Reading | ################################################## | 100% 0.00s
Type:
Another problem which I encountered was when programming my microcontroller using windows os was a bad idea. I spent 8 hours trying to get my os to detect the Atmelice but it seemed no matter what I tried I could not get the atmelice programmer to flash the firmware on the microcontroller.We later decided to try using ubuntu and in 5 min we got the firmware flased onto our microcontroller. So alittle tip use linux for this stuff. Note: We were trying to program the atiny44a.
After my Fab Isp was successfully programmed as a programmer I then went ahead and remove one of the 0 ohm resistors from the board and was ready to use it to program another atiny board.
I went ahead and connected my fab isp to the hello world atiny 44a microcontroller board via isp connect and uploaded a simple blink lead sketch to it using arduino ide.note: make sure you check the atiny 44a pinout for arduino to match the pins correctly mine was on atiny pin 5 threfore it is on arduino pin 8.
Before I was able to upload the blink sketch to the hello world board I had to add the atiny board by adding this link https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json to the preference section of the arduino ide and installing the atiny board from board manager.
After the board is intalled make sure you have Board Atiny / Processor Atiny 44a / Clock 20mhz external / Programmer usbtiny / if your port is not showing that is no problem.
Before you go and upload your sketch make sure you burn boothloader first once that is completed you can go ahead and upload you example blink led sketch.note make sure to change your led pin to match yours in the default sketch
The upload should take 5 to 10 seconds and you should see the led blinking.
Paramaribo Suriname
Ethnalaan
50..