Robotic tank

Build your own robotic tank that moves, lights up, and reacts to obstacles! Learn the basics of programming, electronics, and mechanics in a fun way - ideal for teaching and home DIY.

Description

The Robot Tank is a versatile and robust kit that offers an ideal introduction to the world of mechanics, programming and robotics. Thanks to its construction of solid 3D printed parts and a tracked chassis, the tank is ready to handle even more demanding terrain and tasks. It is controlled by a micro:bit and an expansion board that allows precise control of motors, LED strips or other connected modules.

This tank chassis serves not only as a great teaching aid, but also as a basis for your own improvements and experiments - whether it is remote control via joystick or mobile phone via Bluetooth. The kit develops technical thinking, fine motor skills and creativity of students and hobby designers. Thanks to compatibility with the MakeCode, Python or JavaScript environment, it is suitable for complete beginners and advanced users. The tank can be easily expanded and adapted to specific educational or competition projects.

Connection

We recommend using high-quality alkaline batteries for the proper functioning of the robot tank. Using rechargeable batteries will cause the tank to not function properly and may cause problems.

MB1

It is important to connect the continuous servo motors to pins 0 and 1. If the tank moves in the opposite direction after resuscitation, we recommend changing the connection of the servo motors. We will make the change by swapping the cables of both motors. Insert the batteries into the holder only after the tank is completely assembled. The connection is for illustrative purposes only and the tank must be assembled first. After the tank is completely assembled, you can connect the electrical components to the control board.

MB2

It is important to connect the continuous servo motors to pins 0 and 1. In case the tank moves in the opposite direction after reviving, we recommend changing the connection of the servo motors. We will make the change by swapping the cables of both motors. Connect the battery to the expansion board only after the tank is completely assembled. The connection is for illustration only and the tank must be assembled first. After the tank is completely assembled, you can connect the electrical components to the control board.

MB3

It is important to connect the continuous servo motors to pins 0 and 1. If the tank moves in the opposite direction after resuscitation, we recommend changing the connection of the servo motors. We will make the change by swapping the cables of both motors. Insert the batteries into the holder only after the tank is completely assembled. The connection is for illustrative purposes only and the tank must be assembled first. After the tank is completely assembled, you can connect the electrical components to the control board.

Program

Programming a robotic tank is divided into three parts: basic structure, joystick control a control via Bluetooth. First, you set the correct version of the expansion board using the block Init tank version. You can use for remote control joystick with second micro:bitwhere it is necessary to reconcile radio group between the controller and the tank. Alternatively, the tank can be controlled by mobile phone via the b application using Bluetooth - just upload the prepared program and connect without a pairing code.

Basic structure

Here you will find a project with libraries adapted precisely for controlling and steering the tank. To open the program, you must start editing the project in the Make code environment. You can access the environment using the icon in the upper right corner of the program window. Before you start completing tasks and learning to program, you must set the correct version of the robotic chassis. The settings are made in the "Init tank version" block.

Joystick control

Joystick - controller

Here you will find a project for programming a Joystick so that you can control your tank remotely. You can open the sample program using the program editing icon. If there are multiple controllers in the room, it is necessary to change the radio group so that they do not interfere with each other in the room. Changing the radio group is done in the "Radio set group" block

Tank - receiver

Here you can find the program for the tank so that you can control it with your remote. You must set the same "Radio set group" in the program as the one set in the remote program.

Control via Android/iOS mobile device

Micro:bit has built-in Bluetooth, which allows you to control its movement from a tablet or mobile phone. Connecting is very simple, just have Bluetooth turned on on the device and follow the instructions.

EV-micro:bit controller

The application is used as a controller EV-micro:Bit z Google Play or AppStore.

  • Before connecting the micro:bit in the EV - microbit application, it is necessary to download the program below to the micro:bit.
  • The receiver program is set up so that it is not necessary to enter the pairing code from the micro:bit display.
  • If you are unsure how to connect the micro:bit, you can find instructions at the very bottom of this page.
ev microbit app

Tank - receiver

Here you can find the program for the tank so that you can control it using your mobile device. After a successful connection, you can immediately start controlling the tank.

Tasks

Task 1: First ride

Get to know the blocks for controlling the tank. In the tab OMG_Tank Find the basic blocks for controlling the speed of the motors. Some blocks allow you to set the time for how long the servo motor should be on.

Task 2: First turn

Learn to use a notebook RotateFind out what time you need to set when turning to make the tank turn 90°, 180° and 360°.

At lower speeds (25-75% of speed), you can achieve greater precision with the motors. The tracks will not slip and the rotational inertia will not be as great.

Task 3: First straight run

Try to drive your tank along a straight path that is exactly 1 m long. To complete the task, you will need a notebook. driveYou may need to set different power settings for the right and left motors to achieve maximum precision.

Once you have mastered driving along the 1 m line, try adding a reverse drive to the program. At the end, the robot will turn 180° on the spot and return to the starting point.

Task 4: First accurate ride

Try to draw a square with your tank. You have already mastered the rotation of the robot, as well as precise driving along a line. Therefore, you will also be able to drive along a given geometric shape.

Program the robot tank to draw a square on the ground. You can choose the size of the square yourself. If you can program the robot to draw a square, you can try drawing an equilateral triangle with the robot.

Task 5: Driving in a circle

Try to set the correct motor speeds so that the tank drives around the circumference of an imaginary circle with a diameter of 40 cm.

Adjust the program so that your tank completes exactly one lap.

Task for MB1: Neopixel Library

Notebook library Neopixels allows you to control the LED lighting of the robotic tank. This peripheral is only available on tanks with the MB1 expansion board.

At the beginning of the program, we need to initialize the LED strip:

set "strip" to Neopixel at "P16" with "8" Leds.

We can then experiment with different ways to light up the LED strip. Blocks that contain the inscription Show directly turns on the LED strip. If we use a block that does not contain the word show, we must display this change on the strip using a block:

show strip

There are two ways to turn off the LED:

strip show color "Black"
clear strip
show strip