With the tank chassis set up, I started working on breadboarding the electronics for the robot. My plan was to salvage the motor driver from a dead MiniBot board, and use a WeMos D1 Mini as the microcontroller. Here is the part list for this build:
- Tamiya Tank Chassis w/ Gear Box and motors (see this post for details)
- WeMos D1 Mini
- TB6612FNG Motor Driver Board (taken from a MiniBot protosnap board)
- Misc: a lot of jumper wire, a breadboard, and a breadboard power supply
Unlike most of my build days, this one went pretty smoothly. The one issue that I encountered was that the MiniBot version of the TB6612FNG was a little different than the version that is more commonly sold. Fortunately, the MiniBot kit had sample code that I was able to pick through in order to properly control the motors.
Another issue I had was with the OTA updates (Over the Air). The esp8266 addon package for Arduino included sample code for enabling OTA updates. I did a few tests with the OTA code and was able to use it somewhat successfully, but I was getting some weird behaviors when I incorporated it into the tank sketch. I think the issue might have to do with how WeMos resets itself. It looks like one or two of the pins that I am using to control the motors get pulled high on reset. This causes the motors to start spinning, which could cause some power draw issues. I will need to investigate this a bit more later, but for now, I am happy with the progress and looking forward to setting the tank up so that it can be operated over WiFi.