5. Electronics production¶
Assignment¶
- Group assignment
- characterize the design rules for your PCB production process
- Individual assignment
- make an in-circuit programmer that includes a microcontroller by milling and stuffing the PCB, test it, then optionally try other PCB processes
Group Assignment¶
The Machine¶
In the laboratory, the machine Roland Monofab SRM – 20 is used to produce both circuit boards and small parts through milling. The machine has the following specifications:
-
Work area: 152 x 206 x 60
-
Maximum load supported: 2 kg.
-
Working speeds:
- Drill drive speed: 6 mm - 1800 mm/min
-
Drill rotation speed: 3000 – 7000 rpm
-
File format: RML
-
Materials: Modelling wax, Chemical wood, foam, acrylic, PCB.
Preparing the File¶
For the test, the linetest and the board’s Outline given by Neil in class was select, with both of the files ready I started to use fabmodule
To generate the rml file, a format recognized by the machine, the platform fabmodule.org was used. The procedure how to use this process is very linear and simple, as I explain below step by step.
- Select the SVG or PNG file containing the desired circuit’s image and load it.
- I usually make the file loading in SVG format because through the Inkspace, I can check its dimensions.
- Select the output in rml format.
- Select the right process according to your aim. That defines the cutting properties automatically. In this case, I selected “traces 1/64”.
- After that, it is necessary to select the machine to be used, in this case, the SRM-20 and finally set the coordinates according to the circuit’s image, because this way, they will coincide with the same configured coordinates on VPanel.
- Finally, click in “calculate” to save the file in the desired format, verifying the configured dimensions before saving the file.
- The cut depth (mm) process is set to 0.1 mm to prepare the circuit board traces and to prepare the board outline we use the value 1.6 (standard PCB thickness measurement)
- The tool diameter (mm) depends of the drill size. In the lab I have a 0,4 mm drill.
I good config if you are having trouble in soldering is add more in the “number of offsets” parameters. This will help the soldering process.
The Milling¶
For this procedure, I use the VPanel because it allows me to adjust the position origin points, drill drive speed and rotation speed.
- Use the marked directional browser to move the tool until the point to be considered as origin.
- Whereas that you have used the FabModule to produce rml files, this origin lies on the lower left corner of the image, on the material’s surface.
- To adjust the z-axis: place the drill further up inside of the fit and fix it, after that, approach the drill of the material’s surface to be used in the work, WITHOUT TOUCHING IT, in the end, release the drill softly until it touches the surface and then, fix the drill again.
- Adjusting the axes, click in “Cut” to open the production list.
- Click in “add” and search for your file to add it to the production list and then, click in “Output” to start the production.
Production Tests¶
The line test was made a few times before I get good result. I did some mistakes on the configuration of the rml file previously, I’ll explain below.
- The drill thickness selected on fabmodules.org first was 0.5 mm when the thickness used was 1/64’’ or approximately 0.39 mm.
- The drill tip has broken but I have not paid attention to this during the axis adjustment, as a result the borders of some parts in the produced board were damaged according to the picture.
- This time, I took the opportunity to try the opposite and use a drill in the mod with half of the real thickness.
Result¶
Individual Assignment¶
For the development of this activity, the circuit ATtiny45 was selected. I found in the Alex’s circuit fablab page a very good tutorial to how to draw the circuit diagram of the USBtinyISP PCB:
To make the schematics, I choose the Software Proteus, which is a simulation software that I have access and have experience, although for the next activities, I intend to use KiCad because its a open source program with a powerful tools that we can do the schematic, the PCB Layout and 3d Viewer, and there are no paywalls to unlock features.
In Proteus, the interface used to make the schematic is called ISIS. To create a schematic, I follow the steps below:
- Selection and addition of the components;
- Positioning of the components;
- Connection between the components;
- Simulation.
Selection and addition of the components¶
Push “P” to Add component
As the components are selected, they are added to the component list below the button, and after that, just put them on the workspace. With the components being listed, just select them, and click on the workspace to add them. Then, make the connection between each terminal
Positioning of the components¶
To add the components on the workspace, just leave selected the desired component, click anywhere on ISIS workspace and the selected component will be positioned in that place as previously stated. The component can also be moved freely when the user wants. You can change the values of components like a resistor, a capacitor or an inductor clicking 2 times in the component or clicking with the right button and selecting “edit properties” or just pressing “ctrl+E” on the keyboard.
It is worth the note that the important thing in this case is that the MISO, MOSI, SCK and RESET connections of the chip as well as GND and VCC are made correctly.
Components being placed
Connection between the components¶
Once the components have been positioned, it is necessary to connect them, for this it is simply position the mouse on the tip of the component (as indicated by the red square in the image) and click, then move the mouse to the point or node which must be connected to that terminal. Repeat this process for each one of the components used.
Simulation¶
This step was not necessary for this task, because Proteus does not allow to simulate this, and for the fact that I had to create a schematic package for the ATtiny45 because the original from Proteus had less pins than its footprints, so I wanted to make a simpler package. - If you want to learn how to create components, I recommend these 2 good videos:
Then, the schematic PCB was made
PCB Layout Production¶
In the Ares interface in the Proteus software is possible to do the PCB layout
To create this design, I follow the same step-by step instructions for creating the schematic, the components are imported form the ISIS workspace, making them already added to the list of components of ARES.
The green lines indicate the connection between each component terminal.
Select the route option to make the connections between the terminals of the components indicated by the green lines.
Finally, the board zones are replaced to save time and material. It is worth mentioning that despite the idea of saving material, I choose to make the board with components that are considerably spaced apart because I do not have much experience with welding SMD components.
It is possible to visualize the 3D board pushing the bottom as show below:
Having completed the circuit’s design, the following steps were taken to produce the rml file.
- Generate the design output file, in this case, I use the SVG file by going to Output > Export graphics > Export SVG file. It is also possible to export the PCB file to a gerber format in the Output.
To export the PCB file in the right way, you have to mark the Top copper optionally
- Then, using the Inkscape program, generate the two files to be produced, ones being the Circuit Board Traces and another Board Outline, I also choose to add the name of the project on the board.
- Having made the 2 files in .SVG format, they are uploaded to the website “fabmodules.org” where the path files are generated in rml format, which is recognized by the machine. To generate the rml file, I followed the following steps:
- Load the svg files by going to Input Format > drawing(.svg) > Output Format > roland mil(.rml) > Process > PCB traces (1/64)
- With the images loaded and the settings configured, before proceeding it is necessary to invert the colors. On the platform itself, there is a button that does it for me, which facilitates a lot the process:
- Then, the machine to be used was chosen in machine > SRM-20 and the coordinates have been configured to coincide with the origin of the machine’s user coordinates. So, it was pressed in “Calculate” and then a route demonstration must be shown in the interface. I always check because in some cases, the traces are thinner than what can be identified by a certain drill and in this case, it is necessary to readjust that trace in the electric software, which is not the case though.
The production¶
Having made the rml file, the next step is milling. For personal problems it was not possible to me to make the characterize test and the PCB production in the same day. Unfortunately, on the PCB production day I forgot to take the double-sided tape normally used to complete this process, for this reason, I had to improvise with a bench drill and some screws. I ended up forgetting to take pictures of this preparation, but the result was satisfactory for the production (despite the visual).
Then, after adjusting each axis and following the production processes and rules, I loaded the rml files through the VPanel program according to the following steps: - I selected “Cut” and in the open menu, I selected “Add”, searched for the files, and added them to the production list. - After organizing them in order, I selected “Output” and the process started.
In this step is possible to set the process order, it is important to first prepare the “Circuit Board Traces” than go to “Board Outline”. If you need to chance the drill you can mark the option “Pause at Each File”.
I had to pay attention to the end of the production to prevent the drill from damaging the board. I also choose to use an emery to smooth out the edges of the board because, was not possible to do this step in the SRM-20 machine due to the board was not fixated with double-sided tape. Another mistake done was to not change the drill to cut the edges of the board. Because of that I almost broke another drill.
Of course, I do not recommend this to anyone. The Monofab finish quality is much superior using a double side tape to fixate the phenolic board.
Unfortunately, because of the Pandemic the electronic component are late. For this reason, the final circuit is delayed, but the board is already done, just waiting for the welding. (Update- Please read in the end of this page the status)
In resume, the step-by-step to execute this production would be:
- Generate the .SVG file.
- Edit the “ends of the board” and “track” files.
- Generate the path file, .rml format.
- Place the appropriate drill for the service.
- Adjust the machine axes.
- Load and organize the path files in order to the machine.
- Start the process.
I good tutorial video to how to use this machine can be found in the Aalto Fablab YouTube channel.
Update: As I said before, because of the pandemic the component in my lab arrived late and it was not possible to get the SMD components, only the ATtiny45 was SMD, all others were PTH.
So because of that I need to redraw the PCB board and do the milling again. Using the same steps described before.
The first milling process went very well but because of my lack in soldering skills I destroy the circuit traces of the PCB, it is possible to check in the picture below.
The second PCB the milling was also good and the soldering went well. When I put that new PCB in the USB port the PC recognized the PCB. But 2 min later when I started to install the program in the PCB the PCB started to burn.
So using spiral management as a guide and not want to delay the next week assignment, I decided to stop this activity for now and later I will debug the in programmer pcb to find the possible error.
UPDATE AFTER THE NEW COMPONENTS (PANDEMIC ISSUE) ARRIVED
Production of the eletronic board¶
This time, the execution was inspired in the model shown in “Building the FabTinyISP” by Neil. See the following electrical schematic:
However, some difficulties had appeard, for example the absence of some components in SMD and also the addition of I/O terminals. In reason of that, some adaptations were made resulting in the following schematic:
Finishing the eletrical schematic, the next step was the creation of a design to make the board be able to be saved in .SVG and finnaly sending it to mods following the same configurations of the previous boards.
During the welding was noticied na error in the configurations of he PCB Layout, however it can be easily fixed:
Programming¶
This time, I’m using a USBASP arduino avr recorder to program my board, following the steps provided on “Using the GNU AVR toolchain on Windows 10” section on the Fab Academy site.
First I downloaded all the softwares listed down below:
- Git
- Atmel GNU Toolchain
- GNU make
- avrdude
Then updated the PATH to all the softwares downloaded on the advanced system settings. After updating the PC drivers, I used the Zadig Software to install the drivers related to the operation of the board. To make this possible, the AVR recorder must be connected to an USB port of the computer while the SPI connection is linked in the Tiny 45 board, If all the PATH are updated with success the program should show the board. At this point the “Install Driver” should appear, after clicking it it took me 1-2 minutes to make it. Finally, connecting the board to the computer, was noticed the devices that were connected to it. That time, the USBtinySPI had appeared.
How to make Drill holes for PTH components using SRM-20¶
I had a meeting with my international evaluator and we have a very nice chat how to improve this week adding information about “How to make Drill holes for PTH components using SRM-20”
Due to the lack of components in SMD packages, having only PHT components, it was necessary to drill holes in the board. However, the only way of doing that using the machines in the lab so far would be using a manual plate punch whose hole is 1.25mm while the holes needed were between 0,5mm and 1mm. Therefore, a method of making these holes using the milling method itself was thought.
Process¶
Firstly, using the software Inkscape, the SVG mask of the circuit was edited, leaving only the visible holes highlighted.
With this file, the next step was to edit the RML file in Mods. In this step, it is necessary to observe the plate thickness (1.6mm) as milling less than the plate thickness causes the hole to not be finished and milling to much has the risk of damaging the drill or damaging the hole.
It was also necessary to make the process in 2 depths and to obtain these values I used the option “mil outline (1/32)” in the block “set PCB defaults” in Mods.
So, just fill the Fields of the “mill raster 2d” block with the information obtained and save the file in RML, with the other options configured as needed following the default settings of “mill outline (1/32)”.
It is worth mentioning that in some cases, it is necessary to use 2 files (one for each hole diameter), separating them when editing the SVG file.
Once the steps described are completed, just follow the standard process for PCB production described previously.
Conclusions¶
The PCB for the USBtinyISP is done¶
- All the Proteus and Illustrator files done in this week assignment can be find in the repository
MEMO: What I wanted to learn more¶
-
In the next weeks I will try to use mods in the SRM to compare the results
-
Using spiral management I will also try using the KiCad Software.
Disclaimer: due to pandemic and lockdowns I had limited lab access and resources.