The goal of this project is to create low cost hardware and guides that will enable high school robotics teams to make use of their old parts, either for resurrecting old robots or making new off season projects.
There's a lot that makes up a high school competition robot:
- robot controller
- radio
- power supply
- main power switch
- power distribution
- motor controllers
- motors
- gear boxes
- drive train
etc....
Teams often have a lot of these things laying around the shop, but often a key component will be missing or the hardware is old and they just don't know how to use it. Through this project, I'll be going piece by piece, outfling how to use old hard ware or replace it with new
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.
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?
You might like this firmware: https://github.com/platisd/smartcar_shield