5. Electronics production¶
Group assignment¶
Together with my fellow students we characterize the design rules for the PCB production process. To realize this test We had to get acquented with the mods software and the roland MDX 20. This is a milling machine used mostly for the production of pcb circuits.
Overview of the MXD 20.
The machine has a max operation area of X:220mm by Y:160mm by Z: 60.5mm
It can work with wood, plastic, resin and copper plates. The spindle speed can go up to 6500 rpm. It can mill 2d and 2.5d objects and is able to scan a object. At fablab Amsterdam the machine is mostly used for making pcb circuit of copper plating. More information can be found here
The Test is is mend to show how precise the machine is able to create a circuit. The ofset between the paths and the minimum size of the path it self. The test is a png file with 5000 DPI (Dots per inch). To be able to work with the png file the max DPI should be 1000 DPI. We tried to convert the PPI using Gimp installed on the computer. The problem we encountered was that the file changed size by changing the DPI. With the Help of Anne we uploaded the png file which was converted in Illustrator. Having now the right dimensions and Pixel size we now could upload the picture in MODS.
MODS is a online program which can be opened by open the browser designed by MIT to control different computer driven machines. The program allows you to have good control over the different settings. Other then most programs you have to upload a png file with 1000 ppi to the program. The line test can be found on [line test]http://academy.cba.mit.edu/classes/electronics_production/linetest.png
When you enter the website you have to open the correct program. This you do with the following.
right click - programs - open server program - roland mill - mdx 20 pcb
Mods modules and roland mrx 20¶
read png In this box you can select the png picture you like to upload to thee program. For the machine to read the ppi has to be 1000 bpi.
set pcb defaults In this module you decide if you want to do traces (engrave) or cut the outline. The numbers of the mill are here indicated in inches. When you have the correct settings in the next module you can adjust the numbers here.
Overview of mods to read png and set the pcb default
mill raster 2d In this module you decide the mill you want to use. Further can you adjust the ofset and stepover. Ofset is the amount of traces you want to use to isolate the the trace.Stepover tell the machine to redo a trace by for example 50%. The next tracee will cross the previous trace by 50 % When working with milimeters you can adjust the settings here. When necessary adjust the setting in inch in th pcb default module
Roland mdx 20 milling machine In this module you adjust the settings of the machine. Decide were the machine starts the job. Good to remember that a job always start from the left bottom. This you set with origin. Further the speed the mill moves you can adjust here and how far the machine retract when moving to a new trace. To be on the safe side when use for tghe inside engraving with the .4 mm mill speed 1 mm per second and for the .8 mm mill for the outline speed 4 mm per second.
Machine settings
Websocket serial To connect the software to the machine you have to connect with the terminal. You open the terminal first on the desktop. Serialserver.sh When the terminal is opened you can connect the software to the machine by first open the serial device button and then by selecting the open button of serialserver. Now you should be able to see changes in the terminal. Now you should be able to control the machine with the software..
The line test we did with a .4m two flute mill. So when uploading the picture and selecting trace we adjusted the settings in the mill raster 2 d to .4 millimeter. The cut depth was set as default on 0.1016 and we used this setting. Stepover remain also on default 0.5. We changed the settings in pcb default so the numbers of the mill corresponded with eachother. The speed of the machine we changed to 2 mm per second to not overstress the small mill. After we altered the settings we connect the machine to the software trough the terminal. Now we are able to control the machine trough the software.
With all settings in place we needed to set the origin and place the mill in the machine. When pressing move home and stop in the machine module the drillbit of the machine travels to the left back so you can place the mill in the machine. The millbit is small a fragile and need to be placed with care. Place the mill and tighten it with a allen key. Keep the mill with two fingers and place it as high as you can before tightening.
Then it is time to configure the z axis. We did this by pressing origin in the roland mx 20 menu. The reason why you place the mill as much in to the socket it that the machine move to the origin and lower the z axis. You do not want to damage the mill in this proces. When the mill is on its origin we lower the z axis to Maximum and then higher one bit. This is done on the machine itself. When you have the correct hight you unscrew the mill gentle and lower it till the drill touch the copperplate and then tighten it again. By rotating the mill by hand you remove potential dust and make sure the drill have good contact with the copper.
Placing the correct mill
Now you can change the origin to the desired workfield in the machine module by changing the X and Y axis. After setting the software and the machine we pressed calculate in the software. Now MODS calculate the path of the traces and show the trace path in a pop up menu.
the path the machine will take for the line test
When not happy with the result you can keep changing setting til you have the desired path. We were happy with the trace path and pressed send file in the websocket module. The machine now starts milling the copperplate. We placed the plastic cover in front of the machine to prevent copperparts flying of the machine. The test took around twenty minutes.
Next step was to cut the outline. In the pcb default module we changed from trace to outline. We changed the .4 mill for a .8 mill with the same procedure as before. In the mill raster 2d module we changed the settings to .8 milimeter. Again we used the default of cut depth to go though the material. Before sending the file to the machine we double checked if the origin was still the same.
Final result line test.
final result
In the outline setting we used invert in the read. png module. This resulted that the outline was not set perfectly. Since we are still able to see the testreults we did not redo the proces. The traces of the line test were nice and smooth. We used a .4 milimeter for the test and you can see that from .4 mm the lines will be visible.
Making the in circuit programmer¶
With the use of Roland MX 20 i made the circuit for the micro controller. To do this we make use of fr 1 copperplate which consist of a top layer of copper to conduct the electricity and a bottom layer of glued paper. With the machine you create pathways in which electricity will flow to create a function for the in circuit programmer.
First step is to prepare the copperplate to place on the milling machine. This you do by using double sided tape to ensure the plate is fixed in the workfield. I used a copperplate which was used before and to make sure the plate is steady and horizontal on the workfield i used sticker remove to get rid of residu on the plate. When the surface was without residu and clean i placed the double sided tape on the bottom of the plate. The tape i put on with pressure to be sure there was no unevenness around the plate. Between every layer of tape i left a small area uncovered so that the tape was not crossing each other which might effect the balance of the plate.
After this was done i placed the plate on the sacrificial layer. I removed the sacraficial layer by unscrewing the to bolt on the front of the machine. By using allot of pressure with hand to connect the plate i made sure that the plate was solid on the working field. Then i placed the plate back in the machine and used the bolts again to position the plate.
Then i opened the mods software and imported the png file of the circuit. [traces]http://fab.cba.mit.edu/classes/863.16/doc/projects/ftsmin/index.html First i had to do the traces. I imported the png file of 100 ppi in the mods software. In the set pcb default module i selected mill traces. To make the circuit i used the .4 mm two flute mill. This i adjusted in the mill raster 2d module. The rest of the settings remained in default mode.
- Tool diameter: 0.4 mm
- cut depth: 0.1016 mm
- max depth: 0.1016 mm
- offset number: 4
- offset stepover: 0.5
The cut depth decides how far the mill goes in the material with each run. The max depth is the maximum the mill will go through the material when it have multiple passes to take. The offset is how many copper it will mill away around the traces. And the stepover ofset is for how much of the previous path the next path will cross. with a setting of 0.5 the next path will cross the halve of the previous path. The lower the number the smoother the result.
In the module of roland mdx 20 milling machine i changed the speed of the machine. In previous use some of the mills broke and lower the speed result in less pressure on the mill. To decide were the origin will be i connected the software to the machine on the fifth module with the use of the terminal.
I placed the mill in the machine with a allen key and put the drill a high as possible. Then i moved the machine to the origin in the software. Since the plate was already used before i had to find a empty spot to make the new origin. X: 92 y:50. When the mill was on the new origin i lowered the machine to almost maximum. The i loosened the mill till it touched the copper plate and then tightening again. One spin to remove potential dust and the machine was set to run.
In the software i calculated the trace in the mill raster 2d module. A pop up show of the circuit including all the ofsets. After double checking all the settings i pressed send file in the websocket module. And the milling proces started.
path of the mill to create the circuit
After two minutes in the process i pressed the view botton to check if the drill were actually going through the first layer. View bottom is like pausing the machine./ When pressed again the job continues. The traces looked good and i continued the milling. More then halve way the proces i checked again and the mill still broke with speed setting 1. To cancel the job i pressed view again and hold both up and down bottom fixed for a few moments. Then i pressed again and the machine went to its home position.
after pressing view keep up and down botton pressed for cancelation
After replacing the mill and selecting a new origin i restarted the whole process. This time there were no issues and the traces were placed nicely. Now it was time to cut the outline. For cutting i used the .8 mm drill. After changing the mill i imported the outline file which is on the same page as the traces. This time i choose mill outline and change the diameter to .8mm. Since the cutting is done by a bigger mill i changed the speed to 3mm per second. The rest i left on default
- Tool diameter: 0.8 mm
- cut depth: 0.024 mm
- max depth: 0.072 mm
- offset number: 1
- offset step over: 0.5
The offset is in this case not of importance since you mill through one line multiple times till you reach the max depth. When everything was set and choose the correct settings and the correct origin i started the cutting proces.
When the job was finished i noticed that the cut was not deep enough to remove the circuit board. I changed the max depth to 0.096 and redid the cutting proces. Again it did not go through. Soon i realized that when placing the new drill i place the z axis to low to get through. I changed the z axis to a higher position and lowered the mill again till it touch the copper surface. Now i redid the cutting with the default setting and now the mill went through the material and i could remove the circuit.
milling result
Soldering the parts¶
Before starting soldering the copper circuit need to be free of oil. When touching the plate with your hands the circuit becomes greasy, this effects the copper which erodes quicker and might effect the efficiency of the circuit. By using simple handsoap you can clean the board. With water you remove the soap residu from the board. With a tower you clean and dry it afterwards. Make sure you don’t touch the front side of the circuit again with your hands.
handsoap to clean the circuit
Before you start soldering it is wise to check the paths on the circuit for errors and shorts. With the use of a multimeter you can check if the paths conduct electricity. There is a continuity option on multimeters to check this. This is indicated with a symbol. This site i found helpful in checking what to measure. [Multimeter]https://itstillruns.com/short-multimeter-12204907.html
When the circuit seemed functional i taped the board on a piece of paper. This to prevent the board moving while soldering. The paper helps as a underground since you can rotate the paper while soldering to have good access to the part that needs soldering.
When this was set up i opened the instruction page on fabacademy to see where all the different parts belong. http://fab.cba.mit.edu/classes/863.16/doc/projects/ftsmin/index.html This provided me a very clear instruction in how to solder. I turn on the soldering machine on and placed the settings on the recommended 70. When the machine have the rght temperature the ight starts blinking.
Settings on 70 on solderingmachine
I first took the ATtiny45 to solder on the plate. Working with the concept inside - outside and low - high. Starting with the more complex items in the middle and working your way around.
First i places the soldering tip on one point and added soldering wire till it melted on the surface to connect one of the pins of the ATtiny45. Then i placed the ATtiny45 and held the hot tip close to the solder, then it melted one pin together with solder. On this component you have to put the component in the correct angle indicated by a little round spot. Now the component was stuck on the circuit and i soldered the other pins to the desired positions. After fixing all the pins i moved on to placing the resistors.
I started of by just picking one resistor at the time to be not confused by the many small parts. For resistor it does not matter in which order you place them. These parts i found hard to place in position. They are so small and i had to use the magnifying glas to see what i was doing. I tried the same procedure to keep the resistor in place but it took quite a effort to keep them locked in the right position. I used tweasers to make sure the part was not moving. Still i had to redo a few soldering parts because the part moved when putting the soldering tip there.
The diodes were a challenge to my eye. They have to be placed in a specific order and the component is small and the lines even more so. With a traditional LED there is the cathode which has a shorter pin (gnd) and the anode which pin is longer (vcc) had to look at the datasheet to figure out which direction is should place them. datasheet The cathode side is indicated with a smal green line and should be place towards the gnd. i picked them up with the tweaker in the right way realizing i forgot to solder the plate first and had to find the line again.
Starting with th ATtiny45 and working around with small low parts
The instructions of the whole process was pretty clear so besides redoing a few solder connections it went quite smooth. The last part connected was the 2 x3 pin. This part was done last because of the hight. It would have been in the way in the soldering proces if i would have done this before. Then i connect the bridge to the jumper by simply soldering a little tin to connect the two paths. Last part was to make a usb connection by soldering the end parts in 4 soldered strings. I kept adding soldering till it had approximately the good hight. With a grinder a made the four solder parts smooth and of the same hight. After i was done i redid the test with the multimeter to check for shorts. Everything was good and i was ready for the next step.
Building the FabTinyISP¶
To program the programmer i had to install some programs. As indicated this was more complicated on windows 10. Had to install 4 programs and adjust my windows setting. http://fab.cba.mit.edu/classes/863.16/doc/projects/ftsmin/windows_avr.html
-
Atmel GNU Toolchain: Program used for micro controllers. It consist of libraries and tools you can use to program the micro controller Had some difficulties navigating through the www.microchip.com site. In the end i found the Toolchain and i installed version avr 8-bit GNU Toolchain 3.5.4 and safed the program in my program files directory. Firmware
-
GNU Make: Program used to execute orders. In this case to program the micro controller downloaded straight from the link and safed the program in my program files(86) Link for download
-
AVR dude: is a program for downloading and uploading the on-chip memories of micro controllers downloaded also from the link and i navigate the program to my program files. Link for download
-
Zadig: *A windows program that installs usb drivers so that it will be recognized by the device * Zadig
When the programs were installed i had to update my path. Make a navigation so windows knows these programs works together. This setting you change in:
control panel - system - advanced system settings - environment variables -path -edit
Under my userprofile i had to add the directories of gnu toolkit,gnu make and avr dude.
adding the path for windows 10 users
Next step was to recognize my micro controller for usb ports. For this i used Zadig. For this step i connected my micro controller though the 2 x3 pin to a working controller. This device i plugged in my usb port. Zadig recognized the USBtinySPI and i installed the libusd-win32 driver.
Now everthing neccesary was installed and it was time to check if it worked. This procedure you do in the bash terminal. i tried the following commands:
make -v avr-gcc --version
No reaction.. Luckely the instructions shows were the error might exist. Something went wrong in the paths. So i checked my path in the environment variables and realized i made a type error. After fixing the paths i used the commands again in the terminal and this time it worked.
recognized make in terminal
Now i installed the programs correct for windows 10 and could proceed to verity the firmware source code. For this i had to install the source code and extract the file. With make command i could build the hex file to program on the ATtiny45. Here i got confused. I went to the fimware source code directory but the make command did not seem to work. Being not a expert in terminal i found myself getting frustrated and looking for wrong answers. I might have lost a hour with a 2 minute procedure. With help i managed to find the correct location. I was in fts_firmware_bdm_v1 but did not see the file had sub directories i had to navigate to. Finally i wen to the correct directory and pressed make and the hex file was made.
Now it was time to program the micro controller with the use of the microcontroller of our instructor. The purpose of the usbtiny is to program other boards but before it can do this it needs to be programmed using a other isp controller. I had to navigate to makefile to edit the file. The editing took place in vim editor which is installed on git bash. By entering the existing micro controller to the usb and connect my programmer though the 2 x3 pin in reverse a red light appeared on both devices. With the command make flash my device started blinking green. This resulted in programming its flash memory with the hex file content.
Relieved to see this happening.
Next step was the make fuses command and the terminal showed the following:
Ruter Oomkes@DESKTOP-EOE8KDL MINGW64 ~/Downloads/fts_firmware_bdm_v1/fts_firmware_bdm_v1 $ make fuses avrdude -p attiny45 -c usbtiny -P usb \ -U lfuse:w:0xE1:m -U hfuse:w:0xDD:m \ -U efuse:w:0xFF:m avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.01s avrdude: Device signature = 0x1e9206 avrdude: reading input file "0xE1" avrdude: writing lfuse (1 bytes): Writing | ################################################## | 100% 0.00s avrdude: 1 bytes of lfuse written avrdude: verifying lfuse memory against 0xE1: avrdude: load data lfuse data from input file 0xE1: avrdude: input file 0xE1 contains 1 bytes avrdude: reading on-chip lfuse data: Reading | ################################################## | 100% 0.00s avrdude: verifying ... avrdude: 1 bytes of lfuse verified avrdude: reading input file "0xDD" avrdude: writing hfuse (1 bytes): Writing | ################################################## | 100% 0.00s avrdude: 1 bytes of hfuse written avrdude: verifying hfuse memory against 0xDD: avrdude: load data hfuse data from input file 0xDD: avrdude: input file 0xDD contains 1 bytes avrdude: reading on-chip hfuse data: Reading | ################################################## | 100% 0.00s avrdude: verifying ... avrdude: 1 bytes of hfuse verified avrdude: reading input file "0xFF" avrdude: writing efuse (1 bytes): Writing | ################################################## | 100% 0.00s avrdude: 1 bytes of efuse written avrdude: verifying efuse memory against 0xFF: avrdude: load data efuse data from input file 0xFF: avrdude: input file 0xFF contains 1 bytes avrdude: reading on-chip efuse data: Reading | ################################################## | 100% 0.00s avrdude: verifying ... avrdude: 1 bytes of efuse verified avrdude done. Thank you.
After this i removed my programmer and checked if the computer recognized my device. The board was to small and by adding carton on the back with double sided tape i could place it in my usb port. My laptop made a connection sound but i could not see the device appearing in the screen. I checked on a different computer and it recognised the device.
Last step is to blow the reset fuse. typing the command make rstdisbl did not seemed to work. After carefull reading the instruction again i realized i had to connect the isp programmer once more. Now the command was successful and had my own working micro controller.
final step
When you have the micro controller ready you can use it to program other boards which you make during the fab academy. The picture underneath shows a board i made later in the fabacademy connected to the usbtiny.
Programming other board with the usbtiny
What i learned and what went wrong.¶
I was happy to start working with the Roland mrx 20. This is the one machine i haven’t used before in the fablab waag. This assigment was perfect to get the basics of the software and the machine. Further i was my introduction with electronics and soldering. There can be lots of improvement made with soldering circuit but i am content i got the parts correct the first time.
What i did wrong was mostly with installing the software and reading the instructions. I got frustrated in the process and as a result i started looking at the wrong things to solve the problems. I spend most of the time in this weeks assigment programming the device. Need to get a better understanding how the terminal works and how to manage programs in the terminal.