RC Robot Tank

The RC Robot Tank is a wirelessly remote controlled tank that can go forwards and backwards, as well as left and right. It uses the Arduino IDE to function and a motor driver to serve the motors.

Engineer

Sriya M.

Area of Interest

Electrical Engineering, Computer Science

School

Dougherty Valley High School

Grade

Incoming Junior

Starter Project

For my starter project I made the Mini POV4 light painter. I chose this project because I like LEDs and wanted to see how the resulting light painting would look like. I first added 14 resistors, which reduce electrical current flows and adjust signal levels. Next, I added diodes, which stabilize voltages and make sure that the current only flows one way in the USB interface. I also added capacitors, which stabilize the output voltage and make sure that the battery voltage is smooth. There’s also a crystal time-keeper component, which oscillates back and forth at an exact frequency so that the LEDs flash in a consistent matter. Everything, including the LEDs, was soldered on. One challenge I faced was that there were a lot of small components to be soldered on very close together, and it was difficult to solder them without having them touch each other. I sometimes had to de-solder and redo some of the parts because they touched and didn’t send the current through. This project was a good introduction to soldering since I had to solder around 30 legs. I also learned the uses of different common parts used, like resistors and capacitors.

First Milestone

PS2 Code and Serial Monitor

My main project is the RC robot tank. For my first milestone I connected the wireless PS2 controller to the Arduino. First, I connected jumper wires from the Arduino to the wireless handle of the controller. 4 of the wires connect to SPI communication pins, which sends data from the microcontroller to the sensors, and another 2 are connected to PWM pins, which converts digital outputs to analog outputs. Next, I downloaded a PS2X library for the Arduino app and uploaded it into the Arduino Uno. After doing some tweaking to the code, I got the remote control to send commands to the Arduino, which prints it into the reader. A challenge I faced through this process was trying to get the code to upload. The app kept saying there was an error uploading the code into the arduino. To fix this, I researched some more on how to use Arduino libraries and found out that the app was in the wrong system board. I also ran into some errors in the code itself, and had to rewrite some portions of it. I learned about how to make connections between components as well as a little coding through this process. 

Next, I connected the motor shield to the motors and got them to run. I connected a 6V battery pack to the power and ground inputs of my motor shield first, because the motor shield lets me control the speed and direction of the motors as well as stabilizes the current. Then, I connected the jumper wires from each motor into the enA and enB inputs. Next, I converted it into 5V, which got the motors running. A challenge I ran into in this process was that when I soldered on one of the jumper wires to a motors, the soldering broke off and took a piece of the motor with it. I had to re-solder using a different motor and test if it worked with my project as well. I also accidentally touched the ground wire of the battery to its power wire while connected, which let out a spark and burnt the tip of the wire, so I had to use a new one. Through this process, I learned about the uses of a motor shield and the different parts of it. Next I will be coding the remote control to send commands to the motors themselves.

Second Milestone

For my next milestone, I integrated the remote control code to the motor driver code so that it sends commands to the motors. I took my code for the motor driver and identified which commands specifically controlled the direction of the motors. Then, I added these commands in below the commands for each button on the PS2 controller in the PS2 code. Then I could decide which button sends the tank forward, backward, left, and right. I uploaded this new code into the arduino, and the controller was able to move the tank around. A challenge I came across in this process was sometimes when I uploaded the code the tank would only go front or back, and other times it would only move right and left. The motors could not consistently keep up with the controller. I figured out a couple of problems with my tank. First, the motor gears got loose and had trouble turning the motors. Then, I had to fix some errors in the code that were stopping some of the motions. I had trouble turning one motor without affecting the second one. I found out that in the code, I was using only if statements instead of else if, which messed up the motors. Finally, my battery didn’t have enough charge handle the motors, and I had to connect them to a charger. I had to troubleshoot a lot for the tank to work as it should.

Fritzing Diagram of All Connections

STEM Summer Camp

Final Reflection

BlueStamp was a really fun and enriching program which required me to think a lot. I learned so much about engineering that I otherwise probably would not have. The fact that the entire program was hands-on and the projects were made entirely on our own was especially cool, because I gained a lot of skills that I can carry with me going forward. I came into the program with almost no experience with coding, soldering, or building things in general, but I was able to build this robot tank in a short week thanks to BlueStamp. I would recommend any aspiring engineer to take part in it, no matter how much experience they have.

References:

http://www.billporter.info/2010/06/05/playstation-2-controller-arduino-library-v1-0/

A Simple Remote-Controlled Arduino Tank

https://www.arduinolibraries.info/libraries/l298-n

 

STEM Summer Camps Coding & Robotics Classes For Kids San Francisco Coding & Robotics Classes For Kids New York Coding & Robotics Classes For Kids Denver Coding & Robotics Classes For Kids Palo Alto STEM Summer Camps For Kids in New York STEM Summer Camps For Kids in Palo Alto STEM Summer Camps For Kids San Francisco STEM Classes For Kids in New York STEM Classes For Kids in Palo Alto STEM Classes For Kids in San Francisco Code Classes For Kids Code Classes For Kids in New York Code Classes For Kids in Palo Alto Code Classes For Kids in San Francisco STEM Summer Camps For Kids

Leave a Comment

Start typing and press Enter to search

Bluestamp Engineering