5. Electronics production

This week I worked on PCB manufacturing using the Roland SRM-20 Milling machine to manufacture the board and later on soldered the components to make a working Programmer.

PCB Manufacturing

Getting Design files for the Milling Machine

  • First I downloaded the Pcb image from here and went to traces to download the image of the design like that We downloaded 2 more images(shown below) one for the calibration and the other for the outline of the design. PCB schematic Outline Calibration

  • After this, we opened mods website and right click>programs>server>SRM20>PCB png then go to view and set different design characteristics for the milling machine As shown in the pictures. First, we created a new block called “save file” and connected it with the “Roland SRM-20 milling machine” by right click>modules>open server module>file>save after creating the module I connected the output of the previous module to the current save file module block. Next, for the main design traces we first inverted the design because the copper area should be white and in our picture it was black, then we selected mill traces in PCB defaults module and then in the miller Raster 2D module we set the tool diameter to 0.23 mm, cut depth of apprximately 0.1 mm and an offset number of 5 we did the same for the calibration but for the outline we selected mill outiline in PCB defaults module and. in the miller Raster 2D module we changed the settings to tool diametr of 1mm, cut depth of 0.6mm and maximum cut depth of 1.7 so that it cuts 3 times. Settings for the Traces Settings for the Outline Settings for the Calibration

  • One caution in mods is to remove offsets from Roland SRM-20 milling machine for the tool to start from a set origin.After setting all the settings I clicked on calculate in the Miller Raster 2D module and the tool gave output of 3 .rml files(corresponding to Traces, Outline and Calibration files) which contain instructions for the milling machine for our design and in the “save file” module when I clicked view A layout path shows how the milling machine will perform the cuts and how much it goes through all the cuts. As shown in the images below Layout for the Traces Layout for the Outline Layout for the Calibration

Board preparation

  • First, I cut a piece that could fit my design then I removed the glue at the bottom of the material by using isopropanol (someone had used the board and the tape glue was still there).The glue should be removed because it might prevent the board from being flat in the milling machine and hence produce cut irregularities.
  • Then I taped the bottom of the material with double sided tape to make sure it doesn’t move in the milling machine. Taped board
  • After That, I put the material in the milling machine and made sure that the tapes stick on to the base so that it lays flat, then adjusted a 0.2-0.2 mm V-milling bit inside the milling machine by using the hex key(shown in picture). Board Placed in the milling machine
  • I first started with calibration in order to make sure that the cut depth is right. For this, I Opened the Vpanel for SRM-20 software, then lowered the bit but made sure it doesn’t touch the board and then moved it to the desired x/y starting position,then from there I loosened the bit and allowed it to touch the board and from there the starting position was known. Lowering the bit Loading the file
  • Next we moved the bit 0.3mm up, reset the Z origin and opened the design for calibration and loaded the calibration rml file and then pressed output, the machine started cutting but without touching the borad afterward we lowered the z axis slowly till the bit started cutting the board and reset the Z orign again.
  • At this point we analysed the result of the cut and adjusted the screws in case the edges of the calibration weren’t cut evenly.
  • After, getting good results from calibration I then loaded the traces file and started cutting the design. When the design was fully cut then I proceeded. when the cutting was done I then started cutting the outline by changing the bit to a 1mm and the loaad the outline file. Cutting the outline Cutting the outline
  • After this I removed the board from the milling machine and scrubbed it (using a steel scrub) to remove any materials on the copper layer. I also used a knife to remove a copper layer around the USB head.

Product after milling ands crubbing

Soldering

  • The next step was to solder the components on to the board.First, I collected the components necessary for my ciruit and then used a reference board to solder the components on my board.To do this I used a soldering iron(to transfer the heat required to melt the solder), Solder(when molten by heat joins components and the board) and the desoldering copper(to remove unwanted solder) Solder Iron Solder Desoldering Copper
  • After a few hours of soldering the final product was obtained.Next I also added a little bit of solder on the USB pins and later removed it but making sure to leave a residue of the solder. This is done to increase the conductivity of the coppper on the pins because when copper is exposed to air, it oxidises and doesn’t conduct well electricity. The final product after soldering looks as shown in the image. Final Product after soldering

Testing

  • After soldering I made sure there were no short circuits on the board by using a multimeter.
  • The first, test was to load the bootloader on our board and test if it can be programmed as a normal microcontroller. To achieve this we used another board to load the bootloader on my new board. I used the Arduino IDE which can be found here in there I went to tools then slected board as Arduino Nano(the board to be programmed) then processor is Atmega 328(old bootloader) and selected the COM port corresponding to where I plugged my device(this can be easily checked in device manager). Then finally, I selected the programmer board I’m using which is USB tiny ISP and then clicked on Burn bootloader.

Bootloader Hardware Setup )

Settings to load bootloader

  • At this stage my board had the bootloader then I unplugged the USB tiny ISP so that only my board was left.Next, I needed to test if it can act as a normal microcontroller,for that I used an LED blinking example program to test if it can now behave as a programmable microcontroller(in the program the blinking was made fast). I opened >examples>Basic>Blink and then in the new window I went to Tools and only changed programmer to the default Arduino IDE programmer “AVRISP mkll” and then clicked upload and the LED started blinking faster.
  • After confirming that the microcontroller worked, then the next step was to program it as a programmer to program the ATtiny 412 MCU, to do this I downloaded the jtag2updi folder in my laptop and opened jtag2updi.ino file and create a directory where I copied all the files in the same folder.when the ino file is opened in Arduino IDE with all the files included it looks as shown in image below. The jtag2updi uploads a firmware on the ATmega 328 which allows it to act as a programmer and be able to program the ATtiny 412 MCU. to upload the program I went to Tools>set Board as Arduino nano>processor as ATmega 328(old bootloader)>Chose the Com port where my board was connected>chose programmer as AVRISP mkdll and then clicked on upload.

Uploadingprogrammersoftware

ATtiny 412 MCU

  • In order to get the ATtiny board configuration in my IDE I went to download Arduino Board manager to make installation of new boards easier,for that I went to File > Preferences from preferences I went to additional Board Manager URLs text box, I entered http://drazzy.com/package_drazzy.com_index.json and clicked OK.Next,I went to tools>Boards>Boards manager and typed megaTinyCore and clicked install. Finally,again I also searched Arduino megaAVR board package and installed it. Arduino board manager installation Tiny core installation picture source

  • After uploading the firmware our board was ready to program the ATtiny MCU. Before that I had to cut a connection(see image) which preventes the FTDI chip from accessing the reset the rest of the ATmega 328 which is necessary for it to act as a programmer. then I made connnections with the ATtiny MCU as shown in the image below. Next I had to find a test program to program into the ATtiny chip via my programmer. This test program was found here. The program takes input from the keyboard and prints the typed keys in a terminal. I copied this in the Arduino IDE,then went to Tools>selected board as ATtiny 412>the programmer this time was “jtag2updi”.I then uploaded the program. Connection to cut Connectionsetup Program upload

  • The last step was to test if the programmed MCU was programmed successfully. For that I downloaded Putty installed it and changed the settings to serial and chose the speed to 115200 as per the program and COM port where the ATtiny MCU was connected and pressed Ok and I started seing the output in the terminal confiming that my programmer works. Connection setup for ATtiny 412 MCU Putty setup Terminal output

Group work

In the group work I had the opportunity to learn about milling and how different bits should be setup to obtain a good final cut. The group documentation can be found here