Week 2: Electronics Production

"Priyanka Tries to Mill a PCB Board for a USB"

For my second assignment for How to Make (Almost) Anything, I learned how to mill out and solder on components onto a copper plated epoxy glass PCB substrate for creating a USB board from scratch! It was really fun learning how to use the baby milling machine, but I realized quickly that there are many ways to make mistakes.

And mistakes were made.

First things first -- The group assignment!

Group Project: Calibrating the Mini-Mill for creating a USB out of a Copper-Plated Epoxy Glass PCB board

The first thing we did for this week was to take a look at the machine that we will be using to create the board that we will then populate with components, like a microprocesser that we will then program.

The process requires us to use both a 1/32'' end mill (shown below inside a spool of tape that we use to mount the copper plate onto the test bed) to mill out the outer rim of the board and a 1/64'' end mill to engrave the traces in the board. The traces were etched first, and then the outline (so that the traces are placed properly and there minimizes the possibility for the board to shift once it gets cut out)

Now that we have the tools, we can now start getting used to Neil's very software the connects the hardware to the software we need to mill out the board accurately. The software called MODS was then connected to the mini mill, which then calculated the toolpath of the end mills from the inputted PNG files of the traces and outline of the board.

Before we start diving into the actual milling, we have to properly setup the end mills and the positioning of the spindle properly above the copper plated epoxy glass PCB board material. First the PCB board is firmly taped with double sided tape onto a plastic bed. Then, the correct end mill (the 1/64th first!) needs to be screwed into the spindle. But first we need to make sure there is clearance to properly set it up. Once the end mill is screwed in (using a set srew and a long thin hex screwdriver) then we orient the spindle (in the X-Y axes) over the copper-plated board to have enoguh room to mill out the board. Then we need to calibrate the Z-axis, so that the end mill properly etches the traces. For this, we carefully lower the spindle in the Z direction using the MODS software interface. Once it is just hovering over the board, we then carefully unscrew the spindle slightly and then manually lower the end mill onto the top of the board. Squeezing the mill slightly down onto the board will screwing it back into place in the spindle is our last step before we go back to MODS, calculate the toolpath, and then run the file to etch the traces. Once the traces are done, we redo the process with the 1/32'' end mill to mill out the board outline. Here is a picture of the process in action below.

Once I was comfortable with the process, it was time to get started with the Individual Project!

Individual Project: Making an In-Circuit USB Programmer!

For my individual project, I first etch and mill out my board, solder on the components, and then input a ready-made program to complete the creation of a homemade USB programmer!

Despite the excitement, it took some tries before I got the board milled out properly. Here below is my first attempt where -- probably due to not calibrating the "jog height" properly, I only etched out part of the board, while the rest was underetched.

Sadly, the second try wasn't much better --> the board barely etched at all!

I realized that it was likely that I wasn't putting enough pressure onto the 1/64'' mill (in fear of breaking the tip!) and so it wasn't etching through all the way to the epoxy resin glass. Nevertheless, I didn't give up, and gave it another (hopefully final) try.

I am a big believer in zero (or at least minimal) waste, so (despite all the attempts and attempts from others using a lot of the copper-plated boards) I decided to use the unmilled part of an old copper plate, and go for it. I had to do a weird taping job, but at least it saved my conscience. Here it goes...

It actually finally worked! I guess third times the charm! Finally the traces were etched all through and I was ready to move onto the next steps!

Here is a look at all three of my board milling attempts! (It was a good learning experiment at the very least)

The components that were given to us are as follows: 1x ATtiny45 or ATtiny85 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 started off soldering the microprocessor, and then I ran out of time and plan to finish the soldering and programming after class on Wednesday. Nevertheless, here is the microprocessor on the board, which was done using a soldering iron station.

Once I got myself going with relearning soldering, I used a previously-made ATTiny Programmer board as a template to help me "stuff" my own board.

Here I go chugging along at stuffing my board at the soldering workstation.

Once I finished soldering (which took some time, but now I am getting the hang of it!), I was not privy to the fact that my LEDs were soldered super skewed on their solder joints.

Therefore, I had to go back and resolder those two components. Using the copper solder stripper and some dexterity, I finally came to the following board layout, which looks pretty great!

I checked the solder joint connects and trace connections once again with a multimeter, and it looks like the board is just about read to be programmed!

Stay tuned for more progress on "Programming the Programmer" to come!


After a few weeks, I retried my luck at creating a programmer from a programmer, and after some initial help testing the solder joints and making sure all the components were connected properly and in the correct orientations, I was then able to get started with the actual programming.

But first, here is the PCB with the "bridged" jumper, which is required to close the circuit, and have the board be programmed.

To get started with actually "programming" the soon-to-be programmer, I followed the instructions on former HTMAA participant, Brian's page in order to download CrossPack for Mac OSx, that includes the necessary AVR libraries required for sending the correct commands to the programmer to my board.

Once the installation was complete and successful, the overview of the Crosspack package for AVR development cam up, and since we will be using an ATTiny45 microcontroller to program my own ATTiny 45 microcontroller on my board, I made sure teh assembler supported this device, which it does!

I then downloaded the firmware source code and unzipped the zip file that includes the MakeFile that we will be using to program my board. Here is the picture of the MakeFile from my Downloads directory.

But first! Before actually running commands using the MakeFile, I needed to acquire an already programmed programmer so that it can then program my own board into a programmer. EDS luckly had an ATTiny45 USB programer in-house, so I didn't have to make any changes to the MakeFile. Hooray! I then connected it to my board (making sure the soldered leads touched the metal leads inside the USB housing) and then connected the system to my computer via a USB extension chord. Below are pictures of the in-house programmer that I used to program my board. As well as the whole setup.

ATTiny45 Programmer boxed in blue

Picture of the whole setup

Once I connected my board via the black box ATTiny45 programmer to my computer, the green LED turned on! (The instructions said it should have been a red LED, but I accidentally switched the positions of the two (red and green) LEDS. But that's ok! Because the LEDs here are only indication markers. Here below is my lit up green board ready to be programmed!

Green LED is ON!

Now that my board is connected and my computer recognizes the black box ATTiny45 programmer, I followed the insturctions on Brian's webpage and opened my terminal program, cd'd into the source code directory, ran "make" in terminal (which recognized the programmer), ran the "make flash" command in terminal to erase whatever was on my board's microncontroller and write over it flash memory using the .hex file in the directory, and then verify the chip.

Now, to set the configuration fuses EXCEPT the one that disables the reset pin, I ran the "make fuses" command to prepare ourselves to then BLOW the fuse so then it dsiables the reset pin on my board and makes it into a programmer (and not something to be programmed). To do that I inputted "make rstdisbl" in my terminal window which then happily disabled the reset pin!

Lastly, to have a working programmer, I desolder the jumper, disconnecting V_cc from the V_prog pin on the ISP header, and now I have a working ISP programmer that I can now use to program other boards that I will be making for the class!

More programming and electronics work to come!!

And to get me motivated and aware of what indeed is to come, I checked out a programmer that was connected to a separately designed board and then connected to an output device of a servo motor that one of my peer's did for a demo project.

I plan to create a similar-looking system for the "Output Devices" week assignment, so stay tuned!