<topbar style="display:none;"> <item><a href="../index.html">Home</a></item> <item><a href="../about_me/about.html">About</a></item> <item><a href="../week_x/index.html">Final Project</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; } a { color: #e479f1; } </style> ###Week7: Embedded Programming /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ ###Board Design - ####Design1 According to <a href="http://localhost:63342/people/rosalielin/week_5/index.html">last time's failure</a>, which the orientation of microprocessor, samdD11C, is up-side-down, so I made a significant change on my board design to get the right orientation. <img src="02-a-0.jpg" alt="strandbeest" width="1000"/> <img src="02-a-1.jpg" alt="strandbeest" width="1000"/> ####Design2 Since the design1 is too compact, it's easily connected to other wires while soldering, thus I made another iteration to separate the circuit apart. The other change I made is moving the switch/button to anywhere but not RESET pin to simplify the routing. Turns out, the outline wasn't cut through, even though I made an 'invert' change in MODs. Thus, I manually cut the board, which was unexpectedly easy. <img src="02-b-1.jpg" alt="strandbeest" width="1000"/> <img src="02-b-2.jpg" alt="strandbeest" width="1000"/> <img src="02-b-3.jpg" alt="strandbeest" width="1000"/> ####Board Iterations Perhaps I'm the one who encountered all kinds of bugs in my session. For board1: The main failure was I used the wrong pin of the regulator.The voltage never downgraded from 5V to 3.3V, thus the board got overheated when powered. For board2: I changed the regulator from <a href="https://www.digikey.be/product-detail/en/onsemi/NCV1117ST50T3G/NCV1117ST50T3GOSCT-ND/1967231">NCV1117ST50T3GOSCT-ND ,output 5V</a> to <a href="https://www.digikey.com/en/products/detail/texas-instruments/LM3480IM3-3-3-NOPB/270720">LM3480IM3-3.3/NOPBCT-ND,output 3.3V</a>.To avoid re-milling and soldering the entire board, I used the jumping wire to rewire the circuit. For board3: Unfortunately still not working, Nathan, Cedric helped me debugging all the wire connections using multimeter. For board4: This was at the uploading Arduino stage, where the connection was not so stable, thus adding the pre-made USB to solve the issue. <img src="02-c-1.jpg" alt="strandbeest" width="1000"/> ####Failure Highlight <img src="02-c-4.jpg" alt="strandbeest" width="1000"/> ####Regulator Comparison <img src="02-c-2.jpg" alt="strandbeest" width="1000"/> <img src="02-c-5.jpg" alt="strandbeest" width="1000"/> <img src="02-c-3.jpg" alt="strandbeest" width="1000"/> ###Bootload First, I followed along the <a href="https://mtm.cba.mit.edu/2021/2021-10_microcontroller-primer/edbg/">EDBG install guideline</a> that provided by TA team to install EDBG on my MAC. Having trouble installing Homebrew at the beginning, Cedric guided me to go through terminal tricks to finally install Homebrew and EDBG in my terminal. After the software issue was resolved, we then inspected the hardware side, checking all the connection, schematic of the components. In the end, there was still no luck. The next day, I asked help from Nathan and Rob, and they suggested my to use <a href="https://mtm.cba.mit.edu/2021/2021-10_microcontroller-primer/openOCD/">opendOCD</a> which was pre-installed in some computer at Harvard Science Center for now. The bootload process went well after carefully inspecting all components' connection. You can't imagine how happy I was when seeing the 'Programming Finished' and 'Verified OK' in the terminal! The next step is to get <a href="https://mtm.cba.mit.edu/2021/2021-10_microcontroller-primer/tools-cmsis-dap/">CMSIS-DAP Devices</a> forming the connection/bridge to transmit the bootloader through <a href="https://mtm.cba.mit.edu/2021/2021-10_microcontroller-primer/edbg/">EDBG</a> or <a href="https://mtm.cba.mit.edu/2021/2021-10_microcontroller-primer/openOCD/">opendOCD</a> to the device(D11C) and PC, thus the device can understand the language of Arduino IDE. How I understand bootloader is shown below: <img src="boot1.jpg" alt="strandbeest" width="500"/> <img src="boot2.jpg" alt="strandbeest" width="500"/> <img src="01-1.jpg" alt="strandbeest" width="1000"/> <img src="01-2.jpg" alt="strandbeest" width="1000"/> ###Arduino Follow along <a href="https://mtm.cba.mit.edu/2021/2021-10_microcontroller-primer/fab-arduino/">Fab Arduino SAM guide</a>, I now can program my Fab SAM board D11C14A from arduino IDE!! The next step is to check the PIN name of D11C in Arduino through <a href=https://github.com/mattairtech/ArduinoCore-samd"">ArduinoCore-samd</a>. For the arduino step, Takeo and I kind of formed as teammates, since we were using the same board(D11C) and the same software(Eagle). It was amazing to have a paired buddy though we are both not good at electronics, we can still overcome most of the obstacles together. Seeing the board blinking is for sure the HAPPIEST moment of this exhausting week! <img src="03-1.jpg" alt="strandbeest" width="1000"/> <img src="03-2.jpg" alt="strandbeest" width="1000"/> <img src="03-3.jpg" alt="strandbeest" width="1000"/> <iframe width="1000" height="600" src="https://www.youtube.com/embed/YQC7MpsLZBQ" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>