Internet Motors

This week I wanted to continue my work toward getting my table walking, which meant powering it with motors, which meant figuring out how to get my computer to communicate to those motors wirelessly, which meant a perfect excuse to kill two birds with one stone for this assignment.

Placeholder Image Placeholder Image

With amazing help from Anthony, I designed a simple PCB in which a XIAO ESP32C3 would receive signals from my computer before connecting to a set of motor drivers, which would then connect to a set of two DC motors, one to power each set of table legs.

Placeholder Image

Milling the PCB was a bit difficult; up until this point I had been mooching off of CBA's fancy Carvera, and the downgrade to the MonoFab was much less straightforward than I had hoped. Thanks to Nour, Sergio, and Javier for the help getting my dream from KiCad to in my hands.

Placeholder Image Placeholder Image Placeholder Image

The code for my microcontroller came about with a lot of assistance from Alec and ChatGPT. Ultimately, I used a combination of C++ in Arduino IDE and Python in VS Code to connect my ESP32 to the EECS WiFi, set up a web server for my microcontroller and computer to join, and change the behavior of my motors by typing different letters into the URL. Here, W means forward, S means backward, A means left, D means right, E means stop, and Q means quit the program.

With some further modifications to the code, I was able to more seamlessly and efficiently control the motors right in VS code!