• Update 1: Esp32 robot controller prototype

    David05/04/2022 at 14:20 0 comments

    For the robot controller, I'm planning on basing it off an esp32 to make use of the easy to implement wifi communication and its memory and processing power. The standard esp32 arduino libraries already have examples for making a wifi server, using the I2C lines, and even updating code over the air. (I'm super excited about that last part) 

    To give it a test run, I built a prototype robot using the Adafruit motor shield, and some tt-motors. 

    See this link for the relevant files: https://drive.google.com/drive/folders/18_ZqdwHIcho09ZSiknK9n_TMSJX7CQIy?usp=sharing

    I set the esp32 into access point mode and had it listening for UDP messages. I then created a python script that reads the values from a usb joystick and then sends messages over to the esp32. The python script currently expects the ESP32 at a static ip address. I also implemented a timeout system on the esp32 so if it doesn't receive a new message it will automatically shut it's self off.

    I am having a couple problems, I can't run the esp32 off the same battery as the motors due to the esp32 needing at least 6 v input and the motors need a max of 6V. This at first glance sounds perfect, but when the motors start up they cause a massive dip in voltage which will reset the ESP32. I'm currently running the esp32 off it's own 9V battery, but even with that it's will still randomly stop running the motors. It doesn't appear to be resetting because it stays connected to computer the whole time, so maybe it's a problem with the motor shield?