Intro: Makeblock Tank With Obstacle Avoidance
This tutorial is for the construction of the Makeblock tank and an upgraded program that allows it to avoid objects in its path. I saw ways that the original robot could be improved and that was the basis for the changes that I made.
I also wanted to make this tutorial simple and open ended, similar to the Makeblock starter kit, which is easy to build and modify but gives you tons of options for what to make or code.
To start off, I built the default tank using the instructions that came with the starter kit. Originally, I did this just to get familiar with Makeblock and what it could do. After building it, I liked the look and overall function of the small treaded robot. However, there were some issues such as: The turning was slow or sometimes didn't work, the default obstacle avoidance wasn't that good, and the wires were sticking out from the main board.
Step 1: Modifying the Robot
After getting the tank built I started out on programming a better obstacle avoidance system.
Makeblock uses scratch programming and this made it much easier to tell the robot what I wanted it to do. I included a picture of the code used for the new obstacle avoidance. It's fairly simple, but allows for the robot to sense when something is in front of it, back up, turn a different direction, and then keep going.
You could probably look at the code and figure out what each piece does, such as "read ultrasonic sensor" which just takes the value given by the sensor. That's how the robot can tell when there is an obstacle in its way.
Now that the programming was done, I wanted to protect the wiring components of the tank. I took an small cardboard box and screwed it onto the top of the tank. While doing this, I also moved that ultrasonic sensor lower, so that it could better detect objects low to the ground. After putting the box, I once again re-positioned the sensor so that it was higher up, but pointed down at an angle. The reason I did this was to allow the tank to climb over small obstacles without the sensor getting in the way, while still detecting objects right in front of it.
Step 2: The Finished Product!
Although it isn't completely different than the original tank, my upgraded robot has some very helpful changes compared to the old one. You don't have to reinvent the wheel to create something really interesting!