<!DOCTYPE html> <html lang="en"> <head> <!-- Basic Page Needs ================================================== --> <meta charset="utf-8"> <!--[if IE]><meta http-equiv="x-ua-compatible" content="IE=9" /><![endif]--> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>week_04 Electronics production</title> <meta name="description" content="Your Description Here"> <meta name="keywords" content="FabLab Taipei,FabLab,Zihao Lin,FabLab SCU"> <meta name="author" content="Lin Zihao"> <!-- Favicons ================================================== --> <link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon"> <link rel="apple-touch-icon" href="img/apple-touch-icon.png"> <link rel="apple-touch-icon" sizes="72x72" href="img/apple-touch-icon-72x72.png"> <link rel="apple-touch-icon" sizes="114x114" href="img/apple-touch-icon-114x114.png"> <!-- Bootstrap --> <link rel="stylesheet" type="text/css" href="css/bootstrap.css"> <link rel="stylesheet" type="text/css" href="fonts/font-awesome/css/font-awesome.css"> <!-- Slider ================================================== --> <link href="css/owl.carousel.css" rel="stylesheet" media="screen"> <link href="css/owl.theme.css" rel="stylesheet" media="screen"> <!-- Stylesheet ================================================== --> <link rel="stylesheet" type="text/css" href="css/style.css"> <link rel="stylesheet" type="text/css" href="css/responsive.css"> <script type="text/javascript" src="js/modernizr.custom.js"></script> <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <!-- Navigation ==========================================--> <nav id="tf-menu" class="navbar navbar-default navbar-fixed-top"> <div class="container"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="index.html">Lin Zihao</a> </div> <!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <ul class="nav navbar-nav navbar-right"> <li><a href="index.html" class="page-scroll">Home</a></li> <li><a href="Final Project.html" class="page-scroll">Final Project</a></li> <li><a href="#tf-testimonials" class="page-scroll">Contact</a></li> </ul> </div><!-- /.navbar-collapse --> </div><!-- /.container-fluid --> </nav> <!-- Home Page ==========================================--> <div id="tf-home" class="text-center"> <div class="overlay"> <div class="content"> <h1><strong><span class="color">week_04</span></strong></h1> <p class="lead"><strong>Electronics production</strong></p> <a href="#tf-services" class="fa fa-angle-down page-scroll"></a> </div> </div> </div> <!-- Services Section ==========================================--> <div id="tf-services"> <div class="container"> <div class="text-center"> <div class="section-title center" > <h2><strong>Objectives</strong></h2> <div class="line"> <hr> </div> </div> </div> <ul class="about-list" class="pull-left"> <li> <span class="fa fa-dot-circle-o"></span> <strong>1)</strong> - <em>Master the method of using engraving machine to make circuit board independently.</em> </li> <li> <span class="fa fa-dot-circle-o"></span> <strong>2)</strong> - <em>Understand the testing and debugging of the circuit board.</em> </li> </ul> <br /> <div class="text-center"> <div class="section-title center" > <h2><strong>Assignments</strong></h2> <div class="line"> <hr> </div> </div> </div> <ul class="about-list"> <li> <span class="fa fa-dot-circle-o"></span> <strong>1)</strong> - <em>Group assignment: characterize the design rules for your PCB production process.</em> </li> <li> <span class="fa fa-dot-circle-o"></span> <strong>2)</strong> - <em>Individual assignment: make an in-circuit programmer by milling and stuffing the PCB, test it, then optionally try other PCB processes.</em> </li> </ul> <br /> <div class="text-center"> <div class="section-title center" > <h2><strong>Characterize the design rules for PCB production process</strong></h2> <div class="line"> <hr> </div> </div> </div> <p>For this week’s group assignment, I had to characterize the specification of my PCB production process on our small CNC milling machine (Roland SRM-20).</p> <br /> <div class="text-center"> <div class="section-title center" > <h4><strong>Roland SRM 20</strong></h4> <div class="line"> <hr> </div> </div> </div> <p>The machine in my lab is Roland SRM-20, The Machine Specs are as follows:</p> <li> <span class="fa fa-dot-circle-o"></span> <strong>Work Envelope: </strong> - <em>X axial: 200mm, Y axial: 150mm, Z axial: 50mm;</em> </li> <li> <span class="fa fa-dot-circle-o"></span> <strong>Speed: </strong> - <em>~8000 RPM;</em> </li> <li> <span class="fa fa-dot-circle-o"></span> <strong>Default collet size: </strong> - <em>~6mm;</em> </li> <div class="row"> <div class="col-sm-6 col-md-3 col-lg-3 branding"> <div class="portfolio-item"> <img src="img/week_04/Picture01.jpg" class="img-responsive" alt="..."> </div> </div> <div class="col-sm-6 col-md-3 col-lg-3 branding"> <div class="portfolio-item"> <img src="img/week_04/Picture02.jpg" class="img-responsive" alt="..."> </div> </div> </div> User interface of Panel, You can read the user manual of Roland SRM-20 from <a=herf"http://support.rolanddga.com/docs/documents/departments/technical%20services/manuals%20and%20guides/srm-20_use_en.pdf">this Website</a>. Also, I read it before operating any machine for the first time.<br/> <img src="img/week_04/Picture26.jpg" class="img-responsive" alt="..."> <p> No1. Coordinate system--Selects the coordinate system for the coordinate values to display.1) User Coordinate System: A coordinate system in which the location of the origin point can be freely changed. 2) Machine Coordinate System: A machine-specific coordinate system in which the location of the origin point is fixed. 3) G54 - 59: A workpiece coordinate system in NC code. 4) EXOFS: A coordinate system used with NC code.<br/> No2. Speed--The movement speed of a cutting tool is displayed.<br/> No3. Movement of a cutting tool--A cutting tool is moved. Holding down the buttons performs continuous movement.<br/> No4. Spindle Speed--Adjusts the spindle speed. "Adjusting the Feed Rate and Spindle Speed During Cutting" <br/> <!-- <table> <thead> <tr> <th>No.</th> <th>Name</th> <th>Function</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Coordinate system</td> <td> Selects the coordinate system for the coordinate values to display.<br/> 1) User Coordinate System: A coordinate system in which the location of the origin point can be freely changed.<br/> 2) Machine Coordinate System: A machine-specific coordinate system in which the location of the origin point is fixed.<br/> 3) G54 - 59: A workpiece coordinate system in NC code.<br/> 4) EXOFS: A coordinate system used with NC code.<br/> </td> </tr> <tr> <td>2</td> <td>Speed</td> <td>The movement speed of a cutting tool is displayed.</td> </tr> <tr> <td>3</td> <td>Movement of a cutting tool.</td> <td>A cutting tool is moved. Holding down the buttons performs continuous movement.</td> </tr> <tr> <td>4</td> <td>Spindle Speed.</td> <td>Adjusts the spindle speed.<br/> "Adjusting the Feed Rate and Spindle Speed During Cutting" </td> </tr> --> </p> <div class="text-center"> <div class="section-title center" > <h4><strong>G-code</strong></h4> <div class="line"> <hr> </div> </div> </div> <p> I have learned <a href="http://fabmodules.org/">the tool</a> that help to convert monochrome PNG file into G-code, and also I have learned the software of NX UG. The main requirement is that there should either black or white parts of on the picture. The white parts will be stay, and the black parts will be cut out by the mill. Therefore, it is important to keep the distance between significant enough so that the endmill can go between two white parts.<br /> ① Choose select PNG file. I loaded my picture of my mill traces.<br /> <img src="img/week_04/Picture03.jpg" class="img-responsive" alt="..."><br /> ② Choose the output format, as G-codes (.nc). Then I clicked on the third labeled option mill traces 1/64.<br /> <img src="img/week_04/Picture04.jpg" class="img-responsive" alt="..."><br /> ③ Then, I set some of parameters as follow:<br /> Cut speed (mm/s) =2.8mm/s; Plunge speed (mm/s) =1.4mm/s; Jog speed (mm/s) =55mm/s; Jog height (mm) =5(means that the machine will lift the tool 5mm while not cutting); Spindle speed (RPM) =7000; Cut Depth=0.1mm; Offset-overlap=50%; number of offsets=-1. Then I go to click on calculate. This option calculated my toolpath for the machine to raster my trace.<br/> <img src="img/week_04/Picture05.jpg" class="img-responsive" alt="..."><br /> ⑤ Finally, The machine is ready now just click send and the machine will start to cut. Then, I used CIMOC to check the program.<br/> <img src="img/week_04/Picture06.jpg" class="img-responsive" alt="..."><br /> </p> <div class="text-center"> <div class="section-title center" > <h4><strong>Sacrificial layer</strong></h4> <div class="line"> <hr> </div> </div> </div> <p>What you put on top of the machine in order not to break the tool. It is located on top of the work plate to protect the tool. Also, the Sacrificial layer needs to be level, otherwise when you are cutting your circuit it won't cut the deepness to the same level. So, I milling the sacrificial layer with a 6mm endmill to ensure the plane level.</p> <img src="img/week_04/Picture07.jpg" class="img-responsive" alt="..."><br /> <div class="text-center"> <div class="section-title center" > <h4><strong>Result</strong></h4> <div class="line"> <hr> </div> </div> </div> <p>This is the result of the test:<br /> <img src="img/week_04/Picture27.jpg" class="img-responsive" alt="..."><br /> </p> <div class="text-center"> <div class="section-title center" > <h2><strong>Individual assignment</strong></h2> <div class="line"> <hr> </div> </div> </div> <div class="text-center"> <div class="section-title center" > <h4><strong>What is an ISP?</strong></h4> <div class="line"> <hr> </div> </div> </div> <p> In-system programming (ISP), also called in-circuit serial programming (ICSP), is the ability of some programmable logic devices, microcontrollers, and other embedded devices to be programmed while installed in a complete system, rather than requiring the chip to be programmed prior to installing it into the system.<br/> <img src="img/week_04/Picture28.jpg" class="img-responsive" alt="..."><br/> <a href="http://fab.cba.mit.edu/classes/863.16/doc/projects/ftsmin/index.html">The FabISP</a> is an in-system programmer for AVR microcontrollers, designed for production within a FabLab. That is, it allows you to program the microcontrollers on other boards you make, using nothing but a USB cable and 6-pin IDC to 6-pin IDC cable. It's based on the USBtiny and V-USB firmwares, which allow the ATtiny44 to perform USB communication in software. Programming can be done through avrdude. <br/> </p> <div class="text-center"> <div class="section-title center" > <em> 1x ATtiny45 or ATtiny85<br /> 2x 1kΩ resistors<br /> 2x 499Ω resistors<br /> 2x 49Ω resistors<br /> 2x 3.3v zener diodes<br /> 1x red LED<br /> 1x green LED<br /> 1x 100nF capacitor<br /> 1x 2x3 pin header<br /> </em> </div> </div> <p>The schematic and PCB board are:</p> <img src="img/week_04/Picture08.jpg" class="img-responsive" alt="..."><br /> <div class="text-center"> <div class="section-title center" > <h4><strong>G-code</strong></h4> <div class="line"> <hr> </div> </div> </div> <p> ① ① Used <a href="http://fabmodules.org/">Fab Modules</a>. First, I download the traces image from <a href="http://fab.cba.mit.edu/classes/863.16/doc/projects/ftsmin/index.html">Website</a>. Then I imported the traces image, the image is in PNG format, with only black and white lines. I Choose the output format, as roland mill. Then, I choose the process, which is milling the traces. I finally press calculate to generate the toolpath and save the toolpath code.<br /> <img src="img/week_04/Picture09.jpg" class="img-responsive" alt="..."><br /> <img src="img/week_04/Picture10.jpg" class="img-responsive" alt="..."><br /> ② Then, I will import the outline image to Fab Modules. I repeat the process as above but this time I choose the outline process instead of the traces process.<br /> <img src="img/week_04/Picture11.jpg" class="img-responsive" alt="..."><br /> </p> <div class="text-center"> <div class="section-title center" > <h4><strong>Milling</strong></h4> <div class="line"> <hr> </div> </div> </div> <p> ① I fix the PCB to the milling machine plate use double side tape. I need to make sure that tape layer is smooth with no wrinkles. The surface of the material must be parallel to the x and y-axis of the machine.<br /> <img src="img/week_04/Picture19.jpg" class="img-responsive" alt="..."><br /> <img src="img/week_04/Picture22.jpg" class="img-responsive" alt="..."><br /> ② I used a 0.4mm endmill to engrave the traces on the material surface and a 0.8mm endmill to cut through the material.<br /> <img src="img/week_04/Picture21.jpg" class="img-responsive" alt="..."><br /> ③ First, I need measure the workpiece coordinate system, that is setting the origin of X axial, Y axial and Z axial(the method of try cutting).<br /> <img src="img/week_04/Picture20.jpg" class="img-responsive" alt="..."><br /> <img src="img/week_04/Picture24.jpg" class="img-responsive" alt="..."><br /> <img src="img/week_04/Picture25.jpg" class="img-responsive" alt="..."><br /> ④④ Click on Cut to output the file to the miller. You are all set. When the milling was finish, I removed the material from the material bed slowly with a palette knife. Then remove the double-sided tape on the back of the material. Then, clean the copper face of the board with alcohol to retrieve traces of grease.<br /> <img src="img/week_04/Picture23.jpg" class="img-responsive" alt="..."><br /> <img src="img/week_04/Picture29.jpg" class="img-responsive" alt="..."><br /> </p> <div class="text-center"> <div class="section-title center" > <h4><strong>Soldering</strong></h4> <div class="line"> <hr> </div> </div> </div> <p> ① Wet the sponge for cleaning the tip of the heater.<br /> <img src="img/week_04/Picture13.jpg" class="img-responsive" alt="..."><br /> ② Cut the a piece of solder from the roll to work better with it. My solder should not be thick particularly for this project, because it is a small component.<br /> <img src="img/week_04/Picture14.jpg" class="img-responsive" alt="..."><br /> ③ Start with soldering the components from starting from the middle of the board (ATtiny45), then I go to the next near to the board’s exterior. I must note the components that installed in the correct orientation:<br /> When I welding, I need to notice that don’t touch the solder directly to the tip of the iron. I need the joint to be hot enough to melt the solder when it’s touched otherwise it will form a bad connection. And also, I must note the components that installed in the correct orientation.<br /> <img src="img/week_04/Picture30.jpg" class="img-responsive" alt="..."><br /> In the previous several welding, I did not grasp the welding essentials, so some joints too much or too little solder.<br /> <img src="img/week_04/Picture31.jpg" class="img-responsive" alt="..."><br /> This is the product that failed before I mastered the welding skills. Then I tried to make second board, but I found that the green LED is not bright. So I use the multimeter, I found that I took long time to weld and the green LED was damaged. So I replaced the LED replaced. Just in case ,I made third board.<br /> <img src="img/week_04/Picture32.jpg" class="img-responsive" alt="..."><br /> <img src="img/week_04/Picture33.jpg" class="img-responsive" alt="..."><br /> ④ Final Product<br /> <img src="img/week_04/Picture34.jpg" class="img-responsive" alt="..."><br /> <img src="img/week_04/Picture35.jpg" class="img-responsive" alt="..."><br /> </p> <div class="text-center"> <div class="section-title center" > <h4><strong>Programing ISP (Windows)</strong></h4> <div class="line"> <hr> </div> </div> </div> <p> I followed the routine on <a href="http://fab.cba.mit.edu/classes/863.16/doc/projects/ftsmin/windows_avr.html">Brian’s page</a>.<br /> ⑴ Install the Atmel AVR toolchain.<br /> Download the Atmel AVR toolchain and extract the files in c:\program files. <br /> <img src="img/week_04/Picture36.jpg" class="img-responsive" alt="..."><br /> ⑵ Install GNU Make.<br /> Download Gnu Make and launch the installer. Accept the default location for the installation.<br /> <img src="img/week_04/Picture15.jpg" class="img-responsive" alt="..."><br /> ⑶ Install abrdude.<br /> Unzip the archive, and copy the archive inside to C:\Program Files.<br /> <img src="img/week_04/Picture37.jpg" class="img-responsive" alt="..."><br /> ⑷ Update my PATH.<br /> Now we need to tell Windows where to locate all of the tools you've just installed when you type their names on the command line. Go to the Start menu and open the Control Panel, then go to System. From the left pane, choose "Advanced System Settings". Under the Advanced tab, click the "Environment Variables" button.<br /> <img src="img/week_04/Picture16.jpg" class="img-responsive" alt="..."><br /> The three values to add are:<br /> C:\Program Files\Arm gnu toolchain\bin<br /> D:\Program Files (x86) \GnuWin32\bin<br /> C:\Program Files\avrdude<br /> <img src="img/week_04/Picture17.jpg" class="img-responsive" alt="..."><br /> ⑸ Install Drivers for my Programmer<br /> Download Zadig and launch it. Plug in your programmer, and select the "USBtinySPI" device in the list. (If it doesn't show up, go to the Options menu and click "List All Devices". The driver you want to install (to the right of the green arrow) is either libusb-win32 or libusb0. Click the "Install Driver" button. You should only have to do this once.<br /> <img src="img/week_04/Picture18.jpg" class="img-responsive" alt="..."><br /> <img src="img/week_04/Picture38.jpg" class="img-responsive" alt="..."><br /> ⑹ Sanity Check<br /> Everything is now installed. Let's check that it all works.<br /> Go to the start menu and search for "Git Bash" and start it. When you see instructions telling you to open your terminal in other tutorials, this is the terminal window you should use.<br /> Check to make sure that the commands we installed work okay.<br /> The first time I found an error which is could not find USBtiny device (0x1781/0xc9f). Then I search this in internet. I found that I may try write this “avrdude -c USBasp -p t45”. Because the name of my programming unit is USBasp.<br /> <img src="img/week_04/Picture39.jpg" class="img-responsive" alt="..."><br /> <img src="img/week_04/Picture40.jpg" class="img-responsive" alt="..."><br /> ⑺ Next step is to download <a herf="http://fab.cba.mit.edu/classes/863.16/doc/projects/ftsmin/fts_firmware_bdm_v1.zip">the firmware file</a>. Unzip and extract the files. <br /> ⑻ Open your terminal program and navigate to the directory(firmware) and run make command. It will generate a hex file (firmware_fts.hex).<br /> <img src="img/week_04/Picture41.jpg" class="img-responsive" alt="..."><br /> ⑼ Open the hex file and change the name of the programmer from usbtiny to avrispmkii.<br /> <img src="img/week_04/Picture42.jpg" class="img-responsive" alt="..."><br /> ⑽ Connect the board to the USB jack and programmer to the ISP header of the board. Make sure the orientation is right (MISO –> MISO).<br /> ⑾ Run make flash. This will erase the target chip, and program its flash memory with the contents of the .hex file you built before. Then Run the make fuses command. This will set up all of the fuses except the one that disables the reset pin. Last, Run make rstdisbl. This does the same thing as the make fuses command, but this time it’s going to include that reset disable bit as well.<br /> <img src="img/week_04/Picture43.jpg" class="img-responsive" alt="..."><br /> <img src="img/week_04/Picture44.jpg" class="img-responsive" alt="..."><br /> <img src="img/week_04/Picture45.jpg" class="img-responsive" alt="..."><br /> ⑿ Then, check that if the fabIsp is being detected in your windows or not. For that, connect the fabISP to your usbport and open device manager. Scan for hardware changes and look for “libusb-win32 devices”, under this you will see “USBtinySPI”. If it’s there, congrats, your programmer is ready to program other microcontrollers.<br /> <img src="img/week_04/Picture46.jpg" class="img-responsive" alt="..."><br /> </p> <div class="text-center"> <div class="section-title center" > <h2><strong>File Download</strong></h2> <div class="line"> <hr> </div> </div> </div> <p> <a href="Files/week_04/fts_mini.rar">fts_mini</a> </p> <p> <a href="Files/week_04/linetest.png">linetest</a> </p> </div> </div> <!-- Testimonials Section ==========================================--> <div id="tf-testimonials" class="text-center"> <div class="overlay"> <div class="container"> <div class="section-title center"> <div class="section-title center"> <h2><strong>contact Me</strong></h2> <div class="line"> <hr> </div> <div class="clearfix"></div> <small><em> Address: No.10, Kehua street, Wuhou District, Chengdu, Sichuan Province, China<br /> TEL: (028) 85406538 (+86)18981085882<br /> E-mail: linzihao@scuspark.com<br /> QQ: 386866966 </em></small> </div> <form> <div class="row"> <div class="col-md-6"> <div class="form-group"> <label for="exampleInputEmail1">Email address</label> <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email"> </div> </div> <div class="col-md-6"> <div class="form-group"> <label for="exampleInputPassword1">Password</label> <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password"> </div> </div> </div> <div class="form-group"> <label for="exampleInputEmail1">Message</label> <textarea class="form-control" rows="3"></textarea> </div> <button type="submit" class="btn tf-btn btn-default">Submit</button> </form> </div> </div> </div> </div> <nav id="footer"> <div class="container"> <div class="pull-left fnav"> <p>Science Park of Sichuan University Co.Ltd. All rights reserved. © 2020. Designed by Lin Zihao</p> </div> <div class="pull-right fnav"> <ul class="footer-social"> <li><a href="https://www.facebook.com/zihao.lin.7399"><i class="fa fa-facebook"></i></a></li> <li><a href="#"><i class="fa fa-dribbble"></i></a></li> <li><a href="#"><i class="fa fa-google-plus"></i></a></li> <li><a href="#"><i class="fa fa-twitter"></i></a></li> </ul> </div> </div> </nav> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script type="text/javascript" src="js/jquery.1.11.1.js"></script> <!-- Include all compiled plugins (below), or include individual files as needed --> <script type="text/javascript" src="js/bootstrap.js"></script> <script type="text/javascript" src="js/SmoothScroll.js"></script> <script type="text/javascript" src="js/jquery.isotope.js"></script> <script src="js/owl.carousel.js"></script> <!-- Javascripts ================================================== --> <script type="text/javascript" src="js/main.js"></script> </body> </html>