<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> ##week12: interface application and programming <br> ####Objective <br> individual assignment: write an application that interfaces a user with an input and/or output device that you made <br> group assignment: compare as many tool options as possible <br> ####Metrics <br> **A. Designing part** <br> * Design concept: an ESP32 board that takes commands from web server (local host via WiFi for this time) to turn on/off LED (to confirm the functionality) * Base chip: ESP32-WROOM. I referred to the base design of the board on [HTMAA website](http://academy.cba.mit.edu/classes/networking_communications/ESP32/hello.ESP32-WROOM.png "HTMAA_ESP32"). <br> Pin information from the datesheet: <br><img src="./ESP_DS_1.png" alt="missing" width="400"/><br> <br><img src="./ESP_DS_2.png" alt="missing" 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> * Software: Arduino IDE * Web browser: I tested with Google Chrome and Brave, but other common web browsers should work ####Protocols and results <br> **A. Design part** <br> 1. Draw a skematic design on Eagle. I modified the one I designed for the Network week: ESP with Arduino-ish pin extensions. I made two corrections: (1) put a 10k-ohm pullup register between EN and +3V3, and (2) avoid putting routes close to the holes around the switch to avoid damage to the routes. <br><img src="./eagle_schematic.png" alt="laser_module" width="500"/><br> <br><img src="./eagle_route.png" alt="laser_module" width="500"/><br> 2. Export the trace design and the outer design. <br><img src="./ESP32duino_20211130_trace.png" alt="laser_module" width="300"/><br> **B. Milling and stuffing part** <br> 1. Use the above-mentioned sketches. 2. Insert one trick on mod. I knew from the past failure in Input Devices week that the milling machine would not cut through if the width is too tiny (and that is the case for the trace between two pads of ESP32). While still using 1/64, I changed the cut diameter from 0.154 to 0.1 and it worked. 3. Mill the copper layer of the circuit (trace with 1/64 endmill and line with 1/32 endmill). 4. After milling, first cut the unneccesary copper foils with knife. 5. Solder the components one by one. Last time I had a problem upon programming part caused by my poor soldering around ESP32, so I did this part more carefully using a thinner soldering wire and soldering braids. 6. Separately from making this ESP32-duino (it was to reiterate what I did with the help of Chris, Rosalie and other people last week), I decided to use (a.k.a. resort to) a breadboard to quickly test the functionality with two LEDs. I plan to use other types of input/output devices connected to a web for my final. <br><img src="./board_bread.JPG" alt="laser_module" width="300"/><br> **C. Coding part** <br> 1. For application, I followed [This](https://randomnerdtutorials.com/esp32-web-server-arduino-ide/ "ESP32") tutorial, shared by Gabby. (Thank you!) 2. Program uploading onto my ESP32 board went smoothly this time. However, I struggled a bit to gain stable WiFi access at the beginning. At the end what I realized was (1) rather than the hard-reset switch, I should simply unplug and replug the USB cable to restart the program on ESP board, and (2) I have to keep my iPhone tethering hotpoint open frequently as the WiFi connection was gone as soon as my phone screen went to the sleep mode. <br><img src="./arduino_wifi.png" alt="laser_module" width="300"/><br> 3. After several failed attempts, I used multimeter to check if the voltage on my particular ESP32 pins (two of them) changes after I hit ON/OFF on my browser. It did change. At the end, the last roadblock was that I did not put a GND wire from breadboard to my board. Voila, it worked! <br><iframe width="560" height="315" src="https://www.youtube.com/embed/RlSkomOz12E" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe><br> [original files](https://hu-my.sharepoint.com/:f:/g/personal/ttokunari_mde_harvard_edu/Eo_MW5iJhp1GvL7Oqn-jOrYB6G4nvFlrPQ0QWN5hT0okVg?e=J0TZIo "original files") <br>