4. Electronics Production¶
This week we saw how the PCB milling machines works and fabricated our own ISP programmer.
• Group assignment: Characterize the specifications of your PCB production process.
• Individual assignment: Make an in-circuit programmer by milling the PCB, optionally trying other processes.
Fab Lab barcelona have two different Roland milling machines:
The Roland Modela MDX-20 is a small milling machine and a 2 1/2D precision scanner. This machine is mostly used for milling circuit boards, though it can also mill in other soft materials like machinable wax. For milling circuit boards you should export you design into a black&white monocroome png. For milling out 3 dimensional molds you should export your design as .stl The second use of this machine is scanning. It uses a thin needle to gently touch the object and calculates from this a 2 and a half dimensional model. Though slow at processing, it can create a high detailed model. Work area: 203 x 152 x 60 mm From wikipedia
This machine is capable of cutting a wide variety of materials including chemical wood, acrylic, and ABS. It is also capable of a range of accuracy settings from prototype to product design. Plus its small size and fully covered design allows you to enjoy cutting more safely and with peace of mind. Work area: 203 x 152 x 71 mm from User Manual
We have two different bits to work with our PCBs.
1/64” - Used for milling the trails on the board
1/32” - Used for drilling holes and cutting the board
Our instructors recommended us to test the machines generating files from two diferent softwares: MODS and Fab Modules.
Right click program, open server program,machines, roland, mill, srm-20, PCB
Steps followed: 1. load png file 2. select trace or cut 3. change settings for the machine to origin 0,0,0 and home 0,0,5 (x,y,z) 4. delete the WebSocket module 5. add the save module instead 6. calculate path
And then you’ll get the rlm file
Download the line test document linetest.png
Open the Fabmodules: http://fabmodules.org/
Click fab modules, than index.html and open the format png-document. Select Roland mill and PCB traces.
Now we do the same procedure with the outline cut. Dropping the “linetestinginterior.png” file into the Fab Modules. Same machine (Roland Mill) and different cutting (PCB Outline 1/32).
Choose the correct mill bit for the job and insert it into the machine. Than adjust the z-axis “by hand”.
After that, set origin point for all axis
Then press “cut” to get to add the file “linetest.rml” and the job will start.
Check if the milling goes well, not to deep, not cutting air.
After finishing, just press view and it will bring the piece forward.
Then we get the milled piece.
Using the same machine, bits and board; MODS presented better results. Begin able to mill up to .005 lines when fab modules only could do .011.
So our software of choice for the rest of the process will be MODS.
For my ISP programmer I chose to follow the tutorial for the FabTinyISP.
I also customized it a little:
After we did the group assignment and run some tests we were ready to do our PCBs.
Load the Server Module that suits your machine, in our case is the Roland SRM-20.
Choose to mill traces 1/64 and Calculate to make the tool path. The only parameter that worth playing here for me is the offset number, which is the number of passes of the tool around the path to clean up.
Be aware of the origin point of the drawing to match the position of your PCB.
Milling my PCB:
Machine’s software interface:
Then you repeat the process on mods to mill outline 1/32, send to Calculate and change your mill bit to match the specific size.
My milling offset was not enough to get rid of all of the copper in the connector area of the usb so I had to finish it with a sharp blade cutter.
Gathering the components¶
Here we have lots of components, all labeled and inventoried.
Bill of materials:
Soldering the components¶
I do have some experience with soldering but I have never soldered SMD components. Using a vice, a magnifying glass, a pair of tweezers and a lot of light made it easier for me.
I think that this image from Adafruit explains a lot on how to check your solder:
I had to finish the connectors with some sand paper but in the end it worked fine in my computer.
Programming the programmer¶
This was the most frustrating process until now because it’s difficult to find where the problems are. I had issues with the connections (that I really couldn’t find where) but once I went back to the electronics bench and resoldered some points that didn’t look so well it worked fine and I could pass to the next fase. Having a multimeter to check for shorts on connections is also a good idea. The other problems I had came from not reading the tutorial very well… So pay attention and do it carefully.
I used a linux computer just to be sure that my computer wasn’t the problem (it wasn’t). The red LED from the board should light up when you plug it to the usb.
To flash my FabTinyISP I used the AVRISP programmer. Both the boards need to be connected to USB, the programmer for communicating with the computer and the programmee to be powered. Then you have to connect board to board with a 2x3 female cable. The programmer led will blink red if you connect then wrong, the same way it will be a steady green if you connected it right.
After downloading the firmware I followed the tutorial:
“Open your terminal program and cd into the source code directory. Run make. This will build the hex file that will get programmed onto the ATtiny45. When the command completes, you should now have a file called fts_firmware.hex. If the command doesn’t complete successfully, something is wrong with your toolchain installation. Consult the error messages for information that will help you debug it.”
In the Makefile you have to choose which programmer and MCU you are using, in my case was this little blue box called AVRISP. From the terminal you can edit it with nano Makefile once you are in the right folder.
If you got everything right now it’s time to flash the chip. Run make flash from the terminal and wait for it to finish. Note that I’m still in the same folder we were working since the beginning.You’ll see some progress bars and no errors messages in the end.
The green LED in the programmer should blink and the board’s green led should light up in this process.
After this you can run make fuses to set up the fuses, except the one that controls the Reset pin, which will be done after we check if everything is working. Some progress bars will de displayed and again ending without an error message.
You can now unplug the AVRISP programmer and plug your board directly to an USB port (preferable in a USB2.0).
To check if its working you should see if your board is being recognized as a new low speed device or USBTinyISP in Linux (running lsusb from the terminal. You can see what is happening running sudo dmesg -c and try to debug from there). It is possible to check from Windows and MacOS too.
Only after you got everything working what you can blow the reset fuse running make rstdisbl from the same terminal. You can now unbridge the jumper in the board to change it from programee to programmer.
The final test is using your board to program another. I tried mine when programming a FabAcademy friend (thanks [JC] (http://fabacademy.org/2019/labs/barcelona/students/juancarlos-rincon/)!) and it worked fine.
Be aware that you should change the programmer in the Makefile to use the usbtiny.
As I had some spare time I tried to make a box for my FabTinyISP.