<topbar style="display:none;"> <item><a href="../index.html">Home</a></item> <item><a href="../about_me/about_me.html">About</a></item> </topbar> <!-- This is a comment, it is ignored by the compiler/interpreter --> <style> h0 { font-family:; font-size: 30px; color: #414040; margin-top: 50px; margin-bottom: 6px; word-spacing: 5px; } </style> ##week9: input devices <br> **Note: I failed to complete this week, but managed to make it work for [my final project](https://fab.cba.mit.edu/classes/863.21/Harvard/people/takeotokunari/final/final.html "Final").** <br> ####Objective <br> measure something: add a sensor to a microcontroller board that you have designed and read it. I decided to make a thermosensor using a 10k thermistor and a 10k resistor. ####Metrics <br> **A. Designing part** <br> * Base design: USB-D11C-serial using ATSAMD11C14. Datasheet: <br><img src="./samd11c_datasheet.png" alt="laser_module" width="400"/><br> * Software: Eagle in Fusion 360 (electronics design) **B. Milling part** <br> * Milling machine: Roland MonoFab SRM-20 * Endmills: 1/64 endmill for cutting the copper, 1/32 endmill for cutting out the PCB * Material: Single-sided copper board * Software: mod **C. Coding part** <br> * Bootloader: openocd * Software: Arduino IDE ####Protocols and results <br> **A. Design part** <br> 1. Hand-draw a schematic design for the components I wanted to add. <br><img src="./sketch.jpg" alt="laser_module" width="500"/><br> 2. Draw a skematic design on Eagle. The PCB I made for embedded programming (SAMD11C + LED + button) worked well after some (no, many) struggle, so my tactics here was to integrate the new components to this existing PCB design that I knew should have no problem if soldered well. Blue dotted lines are the part I newly added. <br><img src="./eagle.png" alt="laser_module" width="800"/><br> 3. Export the trace design and the outer design. <br><img src="./TEMP_202111082013_trace.png" alt="laser_module" width="100"/><br> **B. Milling part** <br> 1. Use the above-mentioned sketches. 2. Put the copper board onto the milling machine. Now that I am becoming used to this process, I decided to use a smaller copper board to minimize waste. 3. Mill the copper layer of the circuit (trace with 1/64 endmill and line with 1/32 endmill). 4. Cut out the PCB. I tried 1/16 endmill as I could not fine any 1/32 endmills that are not too old to cut. I expanded the scale of my line sketch by 5% to accommodate the bigger diameter of the endmill. It worked. <br><img src="./Milling.JPG" alt="laser_module" width="400"/><br> **C. Stuffing part** <br> 1. After milling, first cut the unneccesary copper foils with knife. 2. solder the components one by one. <br><img src="./PCB_Temp_fail.JPG" alt="laser_module" width="400"/><br> **D. Bootloading part**<br> 1. I used the openocd bootloader for D11C. It worked perfectly and I felt so happy as this is the part I was stuck with for hours last time. <br><img src="./Bootloading_success.JPG" alt="laser_module" width="800"/><br> **E. Coding part** <br> ...But, the problem arose: my Arduino IDE on MacBook did not read the new PCB. That is, on my IDE, port did not show up. Nathan was trying to help me out, but it was not read either on his computer (MacBook) or the desktop in the lab (Linax?). This was even more confusing than the embedded programming week when I could not complete the bootloading process (in this case at least I can doubt my soldering or the whole PCB design). I asked Brian and Nathan to check out my skematic design for sanity check, and they saw nothing wrong on my board. I tried to de-solder D11C and the 10-pin SWD and replaced them by a new one for each, but it did not solve the problem either. What do I do next? <br><img src="./Reading_PCB_fail.JPG" alt="laser_module" width="800"/><br> <br><img src="./arduino_fail.png" alt="laser_module" width="800"/><br> [original files](https://hu-my.sharepoint.com/:f:/g/personal/ttokunari_mde_harvard_edu/Eo_MW5iJhp1GvL7Oqn-jOrYB6G4nvFlrPQ0QWN5hT0okVg?e=J0TZIo "original files") <br>