Skip to content

5. Electronics production⚓︎


On to the fourth week! FabAcademy is starting to happen fast. We have entered in the electronics territory. This week is about making an in-circuit programmer by milling and stuffing a PCB. The electronics industry emerged in the 20th century and is today one of the largest global industries. Contemporary society uses a vast array of electronic devices built in automated or semi-automated factories operated by the industry. Products are primarily assembled from metal-oxide-semiconductor (MOS) transistors and integrated circuits, the latter principally by photolithography and often on printed circuit boards. Here are the Assesment Criteria related to the fifth assignment, Electronics Production:

  • Group assignment

    • Characterize the design rules for your PCB production process: document feeds, speeds, plunge rate, depth of cut (traces and outline) and tooling.
    • Document your work (individually or in group).
  • Individual assignment

    • Make an in-circuit programmer by milling and stuffing the PCB, test it, then optionally try other PCB fabrication process.
  • Learning outcomes

    • Described the process of milling, stuffing, de-bugging and programming.
    • Demonstrate correct workflows and identify areas for improvement if required.
  • Have you?

    • Linked to the group assignment page.
    • Documented how you made (mill, stuff, solder) the board.
    • Documented that your board is functional.
    • Explained any problems and how you fixed them.
    • Included a ‘hero shot’ of your board.

ISP: ATtiny45⚓︎

Although the goal of this week is “only” to mill, weld and program a PCB board without delving into the different types of programmers, a topic that we will see in the next few weeks, we have had to make the choice of which one to make. There are three “in-system development” options: ISP (AVR), UPDI (AVR 0,1-series) and JTAG (ARM).

My instructors recommended me to start with the ISP, despite being the oldest, because it’s the easiest way to get started. Among all ISP programmers, we have chosen the ATtiny45 because of Brian’s excelent tutorial.

Milling⚓︎

For milling, we are working with a Roland MX-20. Here at the lab the machine work through a desktop version of fabmodules installed on a macbook that controlls the machine. Despite being an outdated software, the operation is very reliable and allow them to do everything they need. Probably in the following days I’ll try to learn mods and work with them in Linux and maybe try to get them installed on my windows laptop, as my instructor Adrian is the manager of the program development in Windows.

For this first mills, Nuria guided me in a fast way because I was coming back to Madrid for the weekend and we wanted to have two FabISP working for Friday evening so I could help my remote (not so remote this weekend) FabLab colleges if needed. This means I had to mill, solder and program the PCB in a day and a half. That’s why we also use FabModules instead of mods, because we needed good reliability and no errors. The process was straight forward, using the traces provided for the FabISP and getting the calculated path for the machine.

I will explain more in depth how to work with the machine in the group assignment, but for now I’ll just go through the parameters we were using. We started with a 1/64 mill for the traces and a speed of 1 mm/s because we were using a pretty long mill and didn’t want to break it. For the exterior cut we used a 1/32 and a faster 4 mm/s.

As the my instructors have used this machine and parameters combination many times before, I didn’t experienced any trouble milling and cutting the FR1 board. The tracks came out clear and well spaced as you can see so we moved on. Time was counting.

Traces path in real time while milling. Red lines mark the already milled ones.

The first board was already milled but we were doing both of them at the same time.

Even without any extra removal, traces came out clean.

Once milling the traces and exterior has finished, we can remove the board from the bed with the spatula, as the double sided tape used to attach it is quite strong. After milling every board my instructor Nuria has recomended me to use a home tool that gives the board a shiny and clean look. They use the metallic sponge that is normaly used to clean a frying pan. As strange as it sounds, it removes any grease left by our hands thanks to the soup thats in the sponge, and gets rid of unfinished borders or copper shavings in any trace.

Also, to avoid any short circuit we should remove the extra copper left in the board that may cause any bad contact. In this case we have to peel the tip of the usb conector, and also the sides of it, which is not documented in the photos because I noticed it later.

Soldering⚓︎

Once we have our board ready to solder, it’s time to pick up the electronic components. Here at the lab they have boxes of electronics everywhere, but the ones dedicated to FabAcademy are in what’s called the inventory. With our list of components, it’s just about taking the time to search and pick each one. Nuria uses a cool method in which she uses a strip of zeal to make a layer to put the components and then another one over them to keep them from spilling off and away. You can see it in these photos:

Set your solder enviroment (materials and things in the lab, also safety)

  • Plastic blanket for welding
  • Base for clamping the board
  • Soldering iron with fine tip
  • Curved tip forceps (for placing the components)
  • Fan (to preent inhaling bad fumes)
  • Soldering iron stand
  • Metal sponge for soldering iron (to clean the tip of the solder)
  • Flux (use as minimum as possible)
  • Tin (great quality one for easier soldering)

For my first attemps, Adrian gave me some spare boards to start trying. He gave me a lot of soledring tips and tricks in the making, and thanks to these first attemps, I didn’t ruin my ISP board. As you can see in these photos, I almost burned some traces and the tin wasn’t flowing properly.

I have started soldering the board from the ATtiny45, using some flux to help with the tiny copper pads. After the first component has been soldered, I have tested it’s continuity to check if I have made a short. Going on with the rest of components has been the same constant check process. I’ve been sharing space with Nuria, as I was doing my board while she was making the one for my collegues. Soldering each component has been done constantly checking the photos from the schematic of Brian’s tutorial. Below is the hole process documented, how it has turned out and the final touch of the 3D printed case that Adrian made for me!

These are some solderinng tips I learned and have been usefull for me:

  • Order of soldering: From the inside to the outside of the board and from the smallest to the biggest component
  • Steps of soldering: Heat > Flow > Solder > Away
  • First put a little tip of solder to the pad and then place the component
  • Temperature of the soldering iron should be around 300ºC

Programming⚓︎

Now it’s time to check if all the work has been done correctly and the board works and can be used for it’s purpose. First I had to make a 6 pin bus flat cable to communicate between the boards. Then I just picked one FabISP that was already programmed from the lab, and use it as the mother programmer for mine.

The only problem I have come across in Brian’s tutorial is during the software installation for my Windows laptop. Brian has a separate guide for installing and using the GNU AVR toolchain on Windows 10 because, as he says, it’s a bit more complicated than MacOS or Linux.

The problem has arised when we wanted to download the Atmel AVR Toolchain for Windows. The link provided by Brian which contained the utility is redirected to the main page of microchip, the provider of this tool. This is probably because it’s an old version, so I had to search for the updated one. Unfortunatly, I couldn’t find it on my first try and even read some blogs talking about how this software has been removed from the company’s website. One option is to use the Atmel Studio utility, that contains this tool built in, but I couldn’t download it either because the download didn’t start by any way. Finally I managed to find a 2019 version of the tool, hidden between some pages of documentation and old software. You can find it here, scrolling down to the downloads section and selecting “AVR 8-bit Toolchain v3.62 – Windows”. This problem would led us to a future one, but for now it was about the drivers, which was done pretty easily.

As I just said, the problem finding the tool led to another one which was revealed when doing the sanity check as suggested by Brian. When checking the Atmel toolchain instalation using avr-gcc --version an error message was shown of an incorrect path. This is because when I was creating the paths, I used the ones witten down by Brian in his page, without taking in consideration that our Atmel toolchain has changed and so it has it’s folder name. Once I solved this problem and all the sanity checks are correct, it’s time for building the firmware.

Thanks to Brian’s detail explanation of the process, everthing went smoothly and I haven’t had any errors during programming. Make flash, Make fuses and the last and irreversible Make rstdisbl worked perfectly.

Testing functionality⚓︎

As you can see in the images below, my FabISP is showing up in the device manager and working, so I can consider it a success. The final test will be when I have to program another board with it. Again, I want to praise the work of Brian with his tutorial, it is pure gold and it has made my work much easier than I expected.

Group assignment⚓︎

For this group assignment I have to characterize the design rules for my PCB production process: feeds, speeds, plunge rate, depth of cut (traces and outline) and tooling.

The machine⚓︎

  • Model: Roland MDX-20A
  • Software: Mods / Mods CE / FabModules
  • Max. operation area: 203 mm (X) x 152 mm (Y) x 2 9,5 mm (Z)
  • Mechanical Resolution: 0.00625 mm/step
  • Revolution speed: 6500 rpm
  • Tools: Milling bit 0,4 mm (1/64”); Milling bit 0,8 mm (1/32”)
  • Material: FR-1 Printed Circuit Board 75 x 50 mm.

Software⚓︎

Workflow for Mods CE on Linux:

  1. Open the terminal and go to the directory where mods is installed: cd Escritorio > cd GITS > cd mods clone > cd mods.
  2. Execute mods with bash mods command. The browser should open.
  3. Once in the browser, right click > programs > open program > Select the type of machine and model.
  4. Comunication parameters are pretty important. Make sure to use the black cable (right one). Socket should be open, if not, click open port.
  5. Machine parameters should be left as default if we have selected the correct machine.
  6. Cutting parameters should be configured as with FabModules.
  7. Select the type of milling bit and process.

Workflow for FabModules on Mac:

  1. Open the terminal and type fab. This would open a small wide window.
  2. In this window, select the input (.png) and output (Roland MDX-20) format. Then click noseque, and a new window should open.
  3. Select upload .png and pick your file.
  4. Choose between mill outline or mill traces acordingly to your file.
  5. Change the milling parameters as needed and then clickmake path.
  6. A preview of the milling path should load. Check out if everything looks fine and parameters one more time and click make rml.
  7. The last window should pop up with a more visual preview of the milling path. Click begin to start milling.

Machine operation⚓︎

  1. With the machine in view mode for better access, we measure our X = 0 and Y = 0 from where we want to start milling with respect to the martyr’s vertex.
  2. We move the machine to these values of X = 0 Y = 0 through the software.
  3. We take the cutter that we are going to use, raise the Z axis with the button panel controls and insert the cutter until only the head is visible. We tighten it a little, just so it doesn’t fall off.
  4. We lower the Z axis to a reasonable height where we can lower the cutter without it coming off the chuck.
  5. Unscrew and adjust the Z = 0, making a little pressure on the surface of the plate for a better adjustment, and while we tighten the cutter again.
  6. We send the file to start milling.

This is a video of part of the process described above, and a timelapse of the milling of the linetest files.

The linetest file is the perfect way to find the limits of our machine and also to get some extra practice milling with it. As you can see on the photo below, 2 of the 3 trials I made had some Z offset issues so this characterization has also let me tune the machine. The final result it’s great and let us know exactly how thin a trace can be milled before peeling off and how much clearance do we need between traces.

  • Traces can be milled as thin as 0.001
  • Clearance must be as minimum as 0.016

UPDI: hello.serial-UPDI.3⚓︎

As the ISP programmer works and it has been a satisfactory process, my instructors have recommended that I make this small board that allows programming through the FTDI cable and a UPDI connector. It will be very useful later for future boards that use this protocol to program them. I have manufactured the 3-pin version of the UPDI connector, since it was my instructor Adrian who last year added the VCC pin to it to avoid using an external power supply during programming. I am attaching the build files, a video of the soldering process where I first got mixed up the sides of the board and soldered the FTDI onto the UPDI connector pads and resistor, and a “hero shot” of the board.


Files⚓︎

  • Traces of the FabISP board (.png): file
  • Exterior of the FabISP board (.png): file
  • Traces of the hello.serial-UPDI.3 board (.png): file
  • Exterior of the hello.serial-UPDI.3 board (.png): file
  • Traces of the line test (.png): file

Last update: June 22, 2021