Skip to content

An automomously/remotely driven tank with Arduino (C++) and Raspberry Pi Zero W (Python/Node.js)

License

Notifications You must be signed in to change notification settings

OutsourcedGuru/tank

Repository files navigation

tank

An automomously/manually driven tank with Arduino (C) and Raspberry Pi Zero W (Python/Node.js) with additional remote-control Raspberry Pi Zero W

Overview

This project involves assembly of the tank kit itself, soldering to add the 3-pin header to the Raspberry Pi Zero W circuit board, 3D printing of the housing for the Pi Zero and a reasonable understanding of both C programming in the Arduino software as well as Python and NodeJS (JavaScript) programming on the Raspberry.

The tank's stepper motors are driven by the Arduino + 6612 shield combination. There appears to be plenty of examples to get this going.

The driving logic, however, are on the Raspberry Pi Zero W since it has wi-fi, a full operating system, easy access to a camera and streaming as well as robust platforms such as NodeJS.

A serial link and interface connects the two separate systems which all sit atop the tank itself. Since the communication is one-way, I've decided not to use a logic-level converter from the Raspi's 3.3V to the Arduino's expected 5V; it works as long as the baudrate is throttled at 4800.

Phase 1

[x] In the first phase of the project, a simple Python script running on the Pi will send commands over the serial interface to the Arduino for steering.

Phase 2

[x] In the second phase, a NodeJS web interface on the Pi will allow both the webcam stream to be viewed plus to control the tank, presumably from an iPhone.

Phase 3

[x] In the third phase, individual frames from the camera will be analyzed to allow a NodeJS program to automamously steer the tank around a course.

Parts

tank_01___1_-759-800-600-80

meg_03__1_-648-800-600-80

tbshd_01__1_-772-800-600-80

raspberry-3400-00

camera-3099-04

cable-3157-02

Schematic

This is a limited version of the schematic in that Fritzing doesn't yet have the OSEPP 6612 Motor Shield board definition. The shield sits on top of the OSEPP Mega 2560 R3 Plus board itself, taking in the 9V DC power supply and providing it back to each of two servo motors which drive the tracks.

schematic

Description Version Author Last Update
tank v1.1.6 OutsourcedGuru September 20, 2018
Donate Cryptocurrency
eth-receive btc-receive
Ethereum Bitcoin