My Cart:

0 item(s) - £0.00
You have no items in your shopping cart.

Build A Klawsome microbit Controlled Tank

Kitronik Technical Director Dave Sanderson can often be found taking to twitter and sharing the goings on in the design and development office at Kitronik HQ. Whilst testing an upcoming product called the Klaw, he's tweeted progress a number of times and each time the response has been positive.

tank-zumo-claw-fidget-spinner-microbit-870

The tweeting has prompted a good number of requests for a tutorial on how to make the tank and how to control it. Dave did a new build and recorded the process. There are also downloads for the DXF file and code that Dave produced. Over to you Dave...

 

Build A Klawsome microbit Controlled Tank:

Although our Klaw hasn't yet been released you can still build the tank minus the Klaw and add it as and when it becomes available (as and when = it's almost here). You'll still have a totally awesome tank that can be controlled with a mobile or tablet.

 

You Will Need:

 

Howto Build:

First I needed to laser cut the tank chassis. I added 4 holes to the DXF (Download the DXF here.) to mount the motor driver board, and a couple to allow the KLAW to bolt on.

 

Amending The Design:

cad-design-870

Cutting it out on the laser cutter:

laser-cutting-top-plates-870

Once the parts were cut it was a case of following the tank building resource instructions from here.

 

Mechanical Assembly:

Starting with the bag of bits:

tank-parts-pre-build-870

I retrieved all of the track parts from the bag of bits and assembled the tracks.

tank-tracks-pre-build-200 assembling-tank-tracks-200 assembled-tracks-200

Once I'd assembled the tracks, I then built the chassis, still following the instructions from here.

tank-kit-undeside-870 driver-wheels-870 top-view-built-870

The Klaw has a premade set of mounting holes. I screwed it into the 2 additional holes I added to the bottom chassis plate.

fixing-the-klaw-870

 

Wiring:

That's the basic mechanical build done, now onto the wiring.

ready-for-top-plate-1000

Note that the mechanical kit doesn’t come with a battery box, which comes with the older motor driver that the tank was originally designed for. I used a 4xAA box instead.

the-battery-box-1000

This box has an on off switch. I’m using the switch mounted on the Tank chassis, so I made sure this one was set to on before sticking the box down with double sided foam Pads.

battery-box-sticky-pads-1000

Each motor has a + marking on it, so I made sure the coloured wire was soldered to that terminal.

motor-terminals-1000

I twisted the wires for neatness and routed them to the motor driver board.

motor-driver-board-1000

The Battery box is connected to the power input of the motor driver board, with the positive lead going via the switch that is mounted on the chassis.

I cut the servo plug on the Klaw servo off, so it could be wired into the motor driver board. You could also make it plug in using a servo extension lead to wire to the motor driver board. The servo power and ground go to the power connection, and the signal (orange on this servo) goes to the P1 breakout terminal on the motor driver board.

Notice that I have the motors wires with the black leads in the middle (yellow, black, black, red). The “Yellow” motor is at the “Rear” of my tank, and the “Red” motor is at the “Front”, where the Klaw is mounted. Because the motors are mounted on opposite sides of the tank to drive ‘Forwards’ on motor spins clockwise, and one anti-clockwise.

 

Coding:

With the wiring in place its time to write some test code.

Kitronik has created some custom blocks for the microbit Javascript Block editor. These can be found in the Kitronik github. For the motor driver board, the address is:

https://github.com/KitronikLtd/pxt-kitronik-motor-driver

In the JavaScript Block editor click the ‘Advanced’ button in the toolbox, then click the ‘Add Package’ button and type in the github URL. Press the search magnifying glass and the package should appear:

add-motor-driver-package-1000

Simply click on it to add it to the project. You will now have access to the following blocks:

kitronik-motor-driver-blocks-1000

The tank will stand on its rear, which is handy for developing the test code, as it stops it driving away, and allows access to the microbit buttons.

tank-testing-1000

Create the following test code:

test-pxt-editor-code

This code will drive both tracks forward when button A is pressed, and stop them when button A and B are pressed. It also opens the Klaw when button B is pressed and closes it when button A and B are pressed.

Use this code to make sure that your tank is built correctly – for instance, I had to loosen the track slightly as it was too tight.

 

Bluetooth:

blutooth-control-code-1000

With a little code, it is possible to control the tank over Bluetooth using the bitty software gamepad on a mobile device, you will need to download the App:

You can download the gamepad tank control code here.

Resources
← Previous Post Next Post →

3 thoughts on “Build A Klawsome microbit Controlled Tank ”

  • ioan June 23, 2017 at 5:42 pm

    Where can I buy the bag of bits from?
    As I am looking to build this myself

    Reply
    • Mark Donnison July 5, 2017 at 12:33 pm

      Hi Ioan, The tank is available here: https://www.kitronik.co.uk/2125-laser-cut-it-yourself-tank-kit.html (<strong>Note</strong>: the kit isn't supplied with the perspex plates, these have to cut separately, the files are included on the page.)

      The Klaw kit is available from here: https://www.kitronik.co.uk/2588-klaw.html

      I hope this helps.

      Reply
      • ioan August 2, 2017 at 11:49 am

        hello mark i am currently coding the tank as my school has a laser cutter.i am thoroughly enjoying this tank kit.thanks.

        Reply
Leave a Reply