5. Electronics production

Introduction

This week, we had two tasks to complete, one being an individual assignment, and the other being a group assignment. The individual task for this week was to make an in-circuit programmer by milling and stuffing a PCB, and when finished to test it. The group project for this week was to characterize the design rules for our PCB production process.

Making the G Code

The first thing I worked on was my individual part, and I started by looking at what kind of board I would like to mill out, and I found these two PNG files which I made into gcode so that I could cut it out on the cnc milling machine. In order to do this, I used Fab Modules, which would be able to set everything I needed to get me going.

After I had downloaded the images I place them into Fab Modules by clicking input format

Then a dropdown appeared, which in which I could select a file type I wanted to import, so I chose the .png option

After I did this, I set my output so that it would turn into an othermill file (.nc)

Then, the next step I complete was that I selected the process tab, and then I chose my traces to be milled in 1/64th inch

After this was done, I took a look at Bantam’s Website which showed me the recommended setting, which are listed here.

The settings that I ended up changing were the spindle speed (rpm), which I ended up changing to 12000 rpm, and then I decided that I would change the cut depth to 0.25 mm.

The final result of the traces after hitting calculate looked like this

After this was done, I did my outline, which was a similar process, and I also changed two variables in this cut, being the spindle speed to 12000 rpm, and the cut depth to 0.45 mm.

Although this bit was set to be at 1/32, I will decide to cut my board out with a 1/16 bit, which worked perfectly fine.

Cutting Out The PCB

I used a software called Bantam Tools to cut the board out, and here is what the environment looks like.

In order for me to cut the board, I specified what the requirements were, including information such as the size of the bit, the length and width of the board, and the type of board I was using. For this cut, I used the FR-1 single-sided board, which looks like this.

In order for me to be able to cut my board out, I would need to keep the board firmly on the bed, and therefore, I used Nitto tape in order to secure my board. I used several strips of the tape and applied it to the back.

After I had done this, I had made sure everything was set right, and then I acquired the thickness of the board by using the BitBreaker feature and selecting Probe Material thickness. With this complete, I imported my traces with the 64th inch bit, and got the bit and inserted into the mill.

I realized that when looking at the preview, I still had to cut out my outline, so I decided to move my trace 5mm in both the x and y directions. With this, I saw that everything was clear, so I cut the traces.

After this part, I sanded the board a little bit, and I used a brush in order to clear the area of any tiny scrap that I wanted out of the way.

After I had completed this, I changed out the 64th bit with the 16th bit that I would need to cut out my outline.

I uploaded the outline file and also moved it 5mm in both x and y directions in order to let it be aligned with the traces. With this my board was complete!

Soldering

In order for the PCB to work, we have to cut and stuff it. Since I have already cut the board out, I must now stuff the board. To complete this board, I got a soldering iron, my components, and solder, and started surface mount soldering. In order to see what I needed to solder on to the board, I used this guide to help me solder on the correct board. Here are all of the components that I used

  • 1x ATtiny45 chip
  • 2x 1kΩ resistors
  • 2x 499Ω resistors
  • 2x 49Ω resistors
  • 2x 3.3v zener diodes
  • 1x red LED
  • 1x green LED
  • 1x 100nF capacitor
  • 1x 2x3 pin header

I soldered the bigger components first, as I was afraid that if I did this last and messed up via ripping a trace, I would have to start over, being inefficient.

And after soldering all my components on the board, it looked like this.

Programmer

Now that all the hardware parts of the programmer are complete, we now have to make it an actual programmer. In order to do this, I followed this guide in order for me to be successful.

Although this process may vary for people due to different OS, I was using Windows 10, and the process was straightforward looking back after completing the process one time.

The first thing I did was download all the files I would need which include:

After everything has downloaded, the first thing you will want to do it extract all of the AVR and Arm Toolchain to C:/Program Files. After you have completed this, you will want to go to the Gnu make setup, and you shall pick the default location for the installation and let it complete. Finally, with the avrdude, you will want to extract the folder to C:/Program Files as well.

Updating Paths

After you have completed the previous tasks, you will want to update your tool paths, as the computer needs to know where to locate all of the tools we installed. You can do this by clicking the windows button and clicking the control panel -> system -> Advanced System Settings -> Environmental Variables.

Once you are here, you will want to add three new environment variables.

C:/Program Files (x86)/GnuWin32/bin
C:/Program Files/avrdude
C:/Program Files/avr8-gnu-toolchain-win/bin

Zadig

Once all your path work is done, you will want to download Zadig in order for your computer to recognize the FabTiny ISP in the USB port. Once you have downloaded Zadig, make sure to go to options and select to list all devices. This is important as if you do not do this, it is likely that your FabTiny ISP will not show up.

Once this is complete, you will want to click the drop-down at the top, and you will want to select the USBTinySPI. Once this is selected you will select the driver by using the arrow keys on the right side of theIn the driver selection box, use the arrows to navigate through all the drivers until the libusb-win32 driver is selected. You only need this driver once and do not need to install it again for consecutive programmer uses.

Powershell and Fuses

Once everything was set to go, you will need to download these files here in order to get the firmware source code. Once this was complete, I opened the windows Powershell, which can be found by clicking the windows key and searching for it. After the Powershell was open, I clicked dir to check which directory I was in and to see where I could go. Then I changed my directory by using cd <individual_file_path>

Then, I continued by typing in the following commands in order.

make all
make flash
make fuses
make rstdisbl

Unbridging

Now that your board is programmed, the final important step is to unbridge your solder bridge like I have done below

Files

You can find the all of my files from this week here.

Group Assignment

For this week’s group assignment, we were assigned to characterize the design rules for our CBC mill. The mill that we have in our lab is called the Othermill pro, and we learned a lot about the machine that we did not know before such as plunge rate and working Gcode. I personally worked on cutting the board itself and fixing issues with the Gcode/ cutting process.. You can find the link to our group website here.