RC Tank Assembly Instructions

Introduction
These are remote control battle tanks that use infra-red cannons to tag the another tank. The brain of the tank is the Arduino RP2040 which has on-board blue-tooth communications to all the tank to be controlled with a Bluetooth game controller. I have fully tested the X-Box one controller but design and program should be compatible with other Bluetooth controllers.  The tank has a 6 wheel, drop center, drive train which is really fun to drive. In addition, the player can control the turret position moving to through about 350 degrees of rotation. The tanks also have a speaker system that plays sounds and music.

3D Printed Components
All parts can be printed in PLA or PETG, except for the “DriveWheelTread” which will need to be printed in TPU.  It is recommended to increase infill density around square nuts.
You will need qty 1 of all parts with the following exceptions:
SonicHubRLM 6mm Clearance Hole – Qty. 3
SonicHubRLM 6mm – Qty. 4
DriveWheelCore_r3 – Qty. 2
DriveWheelTread – Qty. 2
IdleWheelCore – Qty. 4
IdleWheelSpacer – Qty.4 
LED_Holder5mm – Qty. 6
SideReceiverAdapter – Qty. 2
Spacer6mm – Qty. 3

Other Fabricated Parts
You will need to make a qty. 4 of the idle wheel shafts from the 6mm solid rod.  These should be cut to a length of 40mm.
You will need to make one hollow steel 6mm tube for the turret shaft.  This needs to be cut to a length of 40mm.

Assemble the PCB
Screw power wires and motor wires to motor drive boards before mounting in the base.
Install circuit boards inside of base (main board and 2 motor driver boards).
Place 2 bearings in each passive wheel.
Place TPU drive wheel tread on drive wheel hubs.
Gerber files and the schematic are included for the main circuit board.

Software 
The Arduino files are included.  You will need to install the Nina bluetooth firmware on the Arduino so the game controller can talk to the Arduino.  Follow the “Instructions for Flashing Nina” document. When compiling and downloading the Arduino program you will need to change the variable “tankNo” to 1 for the first tank and 2 for the second tank.

Wiring
Solder wire leads to each of the receiver photo diodes, cannon LED and pair LED.  Make sure the cannon LED is long enough to go through the barrel, turret, turret tube and has extra length to all the wires to be screwed into the terminals on the main PCB with the top plate off.  Solder 2 pole JST connectors on the ends of the leads for the 4 receiver photo diodes and the pair LED so they can be plugged into the main PCB.  Create the power wiring harness with leads extension for the battery that is long enough to go through the battery shelf hole and to the power switch location.  The battery ground connection will need have splitter soldered so the ground can go to both ground connection on both motor controller boards (turret motor and the drive motors).  Create a 5vdc connector using one of the 2 pole JST connectors and extension wire where the flying leads can be placed in the screw terminals on the drive motor controller (ground and 5vdc terminals).  I would suggest soldering the two ground connections that will go into the drive motor controller ground terminal. Coming off of the power switch, solder a lead wire and then solder a splitter to take the 12vdc to the 12vdc terminals on both of the motor controllers.  I used a 2 pole JST header with fly leads on the motor output on the turret motor controller and wired a 2 pole JST plug on the turret motor so it can be easily plugged in on final installation. Make up connectors with JST on one end and pin connectors on the other end for the motor controller control wires (PWM and direction).

Wheels and Drive Motors Assembly
Place square nuts in sonic hubs for the wheel mounts. Place the clamping screws in the sonic hub.
Pre-tap mounting holes on sonic hubs for the wheel mounts.
Place passive wheels on shaft. Place spacer on shaft between wheel and base. Place shaft collar on other end and tighten set screw.  Place sonic hub on inside of base but do not fasten to the base.  Adjust shaft position in sonic hub and tighten one clamping bolt on the sonic hub.  Spin the sonic hub and tighten the other clamping bolt. Loosen and remove the shaft collar, remove the wheel and install screws into sonic hubs. Repeat for the other 3 passive wheels.

Battery Door Assembly
Pre-tap the battery door knob.  Install the knob on the battery door and use a screw from the back size of the door to secure the knob.
Use hot glue to place 2 magnets in the base for the battery door.  After the glue sets, place two magnets on the first two magnets.  ut hot glue in the magnet pockets on the battery door and immediately place the battery door on the base so the 2nd set of magnets lines up with the pockets on the battery door.  This method will ensure the proper polarity of the magnets.

Turret Assembly 
Pretap holes in turret head for sonic hub mount. Install square nuts in the sonic hub with clearance holes. Insert the two clamping screws in the sonic hub. Place the 5mm metal tube into the sonic hub so that the tube is flush on one side and tighten the clamping screws 
Place the cannon LED in one of the LED holders. Thread the wire for the barrel and the hole in the turret.  Seat the barrel in the turret.  Seat LED holder in the end of barrel while pulling the wire slack from the turret. Then tread the wire through the steel tube.  While pulling the wires through the steel tube seat the sonic hub in the turret and fasten the hub to the turret with at least 2 screws. Place a screw in the hole in the bottom of the turret.  This screw will ride in the slot on  the top plate and act as a positive stop for the turret so that it can not rotate in a full circle.

Top Plate Assembly
Install square nuts in the TT-Turret mount.  Run screws through the holes to make sure the square nuts are properly seated.  Install the small gear on the turret motor.  Prep one of the sonic hubs by taping the mounting holes, installing two square nuts and camping screws. Install a sonic hub on the large gear.  Mount the turret motor to the tt-turret mount with 3 screws and nuts. Attach the turret mount to the top plate using 4 screws. Press in one flange bearing into the hole on the top of the top plate. Place two spacers on the turret metal tube.  Thread the cannon wires through the hole and flange bearing on the top plate.  Place the turret steel tube through the hole.  Place another spacer on the turret steel tube from the bottom side of the top plate.  Do not insert the steel tube all the way through the hole, just enough to go through a little past the spacer.  Thread the cannon wire through the large gear, mesh the large gear teeth with the small gear teeth and push the turret assembly so the steel tube goes through the sonic hub on the large gear.  Tighten the clamping screws on the sonic hub of the large gear.

Final Assembly
Thread the power switch wiring harness from the outside to the inside of the tank base and press the power switch into the power switch hole. Place the 12vdc and ground wires in the motor controller terminals and tighten terminal screws.  Place the 5vdc and ground wires in the drive wheel motor controller terminals and tighten terminal.  Plug the JST connector for the 5vdc into the connector on the main PCB.  Install cables for the motor controller control signals (PWM and direction).

Install the photo diodes and pair LED into the 5mm LED holders.  Thread the wires for the Front Receiver, Rear Receiver and Pair LED through the holes in the tank base, press the LED holders into the base and plug the JST connectors into the main PCB.

Place the side receiver wire holders in the holes on each side of the tank base.  Thread the side receiver wires through the holes  and plug the  JST connectors to the main PCB.

Make the final connections for the turret motor to the turret motor controller and place the cannon LED wires on the terminals on the main PCB and tighten the terminal screws.

Place square nuts in the 4 corners of the main base.  Run a screw through the hole to make sure the square nuts are properly aligned in the slots for the square nuts. 

Install the battery shelf and thread the 12vdc power leads through the old in the back of the battery shelf.

Thread the side receiver photo diodes with LED holders through the holes on the side of the top plate.  Slide the sider receiver wire through the slot on the SideReceiverAdapter and press the LED holder into the SideReceiverAdapter.  Place the top plate assembly on the tank base, making sure to not pinch any wires between the top plate and the base.  Install screws in the 4 corners of the top base.  Push the wires side receivers into the side receiver wire holders and press the side receiver photo diode assemblies in the holes on the top plate.

Game Play and Gamepad Controls
Gamepad Controller Pairing
When the power switch is turned on the opening game start music will play.  When the start music has ended the Pair LED will flash until a gamepad controller is paired.  When the Pair LED is flashing the tank controller will be in pair mode.  If you have not paired a gamepad, place the gamepad in pair mode.  Note: only pair one tank at a time. When a gamepad controller is paired the pair LED will go solid.

Gamepad Controls
Right stick forward and back will move the right wheel forward and back.  Left stick will move the left stick forward and back.  To go straight forward push both sticks forward. To go in reverse, pull back on both sticks.  To turn right push the left stick forward more than the left stick.  To turn left push the right stick forward more than the left.  Note: you can spin the tank around its center by pushing one stick forward while pulling the other stick back.  
Pressing the accelerator/throttle (right side) will turn the turret to the right.  Pressing  brake(left side) will rotate the turret to the left.
To fire the cannon, press both the right bumper and left bumper at the same time.
Pressing the right bumper only will give you extra drive speed/power (temporarily).  This is useful when running on carpet.
The game is over when one tank is hit 4 times. 
Pressing the pair/reset pushbutton on the back of the tank 3 times quickly will reset the tank game and the game start music will play. 
Holding the pair/reset pushbutton will erase the gamepad pairings and put the tank controller into pair mode.
Note: I have noticed that sometimes the tank will lose the pair to the gamepad yet the power/pair light on the X-box controller will be solid.  If this happens, hold the power/pair button on the X-box controller to turn the controller off and then press it again to turn it on and wait for it to pair to the tank controller.