CaTank

by BartS52 in Circuits > Remote Control

1755 Views, 9 Favorites, 0 Comments

CaTank

TanCat

In this tutorial we will build a Cat on a Tank chassis that is controlled by a mobile phone through HTTP requests. The tank is a WiFi hotspot so everyone who can login, goes to a IPaddress and can control the beast.

Getting Started

Wemos_D1_mini.jpg

Shopping List

  • Tank Chassis
  • L298N Dual Bridge DC stepper controller Board:
  • Voltage converter*
  • Wemos D1 mini
    • With pins soldered onto the Wemos.
  • Wires
    • Male to Female (2x
    • Male to Male
    • Female to Female (4x
  • Tape, black
    • For wires and connecting 3D model onto the tank chassis.
  • Paint, black oil based for metal

  • LED, Blue
    • In the tail, for connection feedback.
  • Mini Breadboard
  • 3D model that fit the tank chassis:
    • Length: 18,5cm (7,28inch)
    • Width: 4,5cm (1,77inch)

What you need


*The voltage converter has to be able to convert 3,3V into 5V. As the motors on the tank chassis use 5V, and the Wemos D1 mini uses 3,3V on output.

*Or similar software for preparing 3D models to be printed.

Installation

Installing Arduino

Install Arduino software: https://www.arduino.cc/en/Main/Software#wikitext

Install drivers: https://wiki.wemos.cc/downloads

Installing with Boards Manager in Arduino IDE

Code

Code for the Wemos D1 mini

  1. Open up the Arduino IDE
  2. Copy/paste the code onto a new sketch (CTRL+N/CMD+N). The code provided is based on the example file in Arduino IDE: File > Examples > ESP8266 WiFi > WiFi Access PointUse the correct settings to upload the sketch
  3. Upload the sketch onto the Wemos D1 mini
    Use these settings for uploading sketches onto the Wemos D1 mini:

Board: "Wemos D1 R2 & Mini"
CPU frequency: "80mhz"
Flash size: "4M SPIFFS"
Upload speed: "115200"
Port: "[your serial COM port]"*

* You have to connect a mini USB cable in the Wemos D1 and computer. If you don't see a COM port listed, the driver is not installed or there is no USB connection.

Wiring

IMG_5648.JPG

Wiring

Check out the wiring diagram (PDF) for how your wires are connected.

I made use of different type of wires:
Male to Female, Male to Male and Female to Female.

By cutting the edge of a small breadboard to have more GND and more 5V output (check photo in this step).
You don't have to cut it but all the wires will fit more easily if you do.

3D Model

IMG_5649.JPG
IMG_5651.JPG
IMG_5650.JPG
IMG_5652.JPG

If you don't want/can not 3D print

Make a model 5.5CM wide and 18.5CM in length using paper mache or buy a toy Cat to fit on the tank.

Preparing

The model of a cat I found on the internet.
Then I used blender to cut the Cat's legg's off (ouch!) and make the model hollow so the electrical parts fit inside.

The tail of the Cat is also hollow so 2 wires and 1 resistor can fit in it with the LED on top.

Printing

Use software like Cura to prepare your model for 3D printing.
You can be smart and lay the back part flat on the surface and add support (option in Cura).

Finishing

By using an electrical screwdriver you can drill a hole on the top of the tail.
You have to get rid of the support with a knife or a trench. When you use a trench you can rotate to make the whole thing easily coming off. I cut the base of the parts off so you can fit the wires and motor shield nicely inside the body.

Use oil-based paint (I used black) for steel and paint the cat black. Add whiskers by cutting off some hairs off a paintbrush. Glue them when the oily paint is still wet on the cheecks for a nice little detail.

Connecting

IMG_68FB35FBDDA5-1.jpeg

Connecting the tank

Put the batteries in the batter holder (I had to get rid of the middle part in the battery holder as the batteries didn't touch each other).

Use the red switch on the front of the chassis to power the tank.

After 10 seconds a Access Point is live where you can connect to: ? Use password 12341234.
Use a mobile web browser to go to the IP address 192.168.4.1 and you can control the tank by using the webpage.