JANET LIUHow to Make (almost) Anything

For this week's network and communication, I switched to using the ESP32-WROOM chips with Wifi and Bluetooth capability. This was my first time using the chip, and I went through a lot of iterations designing a schematic/traces for it. I was planning to also use this chip for my final project, so ended up including all the components in my schematics. The additional components I had were a MicroSD slot, female barrel power jack, an additional button for input control, and a power indicating LED. ## Schematic I based my schematic off of Gabby's design and Neil's basic [ESP32-WROOM](http://academy.cba.mit.edu/classes/networking_communications/ESP32/hello.ESP32-WROOM.png) board. This told me how to wire up the the voltage regulators, switch/button, capcitors, etc. In order to add in the microSD card slot, I used [this website](https://randomnerdtutorials.com/esp32-microsd-card-arduino/) to determine the wiring. I also used [this website](https://www.sunrom.com/media/content/2372/micro-sd-pinout.jpg) to figure out which pinouts corresponded to which label. I needed the jack to be flush with the edge of my board, and learned that the pins connecting to the outer piece of metal correspond to 5V. The other side of the pins is ground. I simply wired up the LED with a resistor between 3.3V and GND, so whenever there was power, the LED would turn on. Here is my final schematic: <figure><img src="../images/full/11/final_schema.png" width="500"/> </figure> ## Traces Actually wiring up the traces took many different iterations. A lot of the lines overlapped, so I used 0ohm jump resistors. But, several times I placed my resistors where it intersected with the actual components and messed up. After three iterations, I was finally successful: take one | take two | success! :---------------:|:---------------:|:---------------: ![](../images/full/11/failed_traces1.png) | ![](../images/full/11/failed_traces2.png) | ![](../images/full/11/final_traces.png) ## Fabricating I fabricated two boards, since the first was unsuccessful. The bit went in too deep, so all of the traces were really burred and weren't smoothing out with sandpaper. After soldering everything on, my board didn't connect :(. Nathan suggested it might be because the board was milled out too deep and the copper too messy. I remade it, this time fixing the overlapping resistors and spacing out the board a bit more. I also accidently broke off a few traces because the cut was so deep, so there are a few wires and missing pins here and there. <figure><img src="../images/full/11/failed_board.png" width="500"/> </figure> When I fabricated the last one, the traces turned out at a good depth, and the edges were very neat. I still burnt off a trace when I was soldering, but just used a wire to connect ground together. The barrel power jack had two pins at the bottom that I needed to manually drill out so it would sit flat. To do so, I colored the copper with a expo marker and then drilled where the hole silhouettes were: <figure><img src="../images/full/11/jack_holes.png" width="500"/> </figure> <figure><img src="../images/full/11/good_board.png" width="500"/> </figure> ## Code I first tested the board with the example WifiScan code in Arduino. It worked successfully, and was able to read all the networks around. <figure><img src="../images/full/11/wifi_scan.png" width="500"/> </figure> Then, I wrote some code to connect to my Wifi hotspot (since Harvard wifi has some weird verification issues). I based [my code](../code/wifi_connect.ino) heavily off of [this website](https://www.megunolink.com/articles/wireless/how-do-i-connect-to-a-wireless-network-with-the-esp32/). It worked! serial output | hotspot connected :---------------:|:---------------: ![](../images/full/11/wifi_connect.png) | ![](../images/full/11/hotspot_connect.PNG)