Patrick P.

Hi, I’m Patrick and I am a rising sophomore at Regis High School. For my main project, I decided to build a Arduino RC Tank based on this website. I chose this project because I wanted to do a bit of everything, mechanical engineering, electronics, and programming. Also, I just wanted to have some fun driving a tank around my house.

Reflection

This project is one of my first using the Arduino motor controller. Before coming to BlueStamp, I still did not even know how to pronounce solder correctly (I was pronouncing the “l”) and I had no experience with Arduino. But by the time I had finished BlueStampEngineering, I learned new coding skills that I will use for future projects, gained a better understanding of how circuit works, and learned the proper way to pronounce “solder.” My favorite part of this project was getting the ultrasonic sensor to work. I thought it was extremely cool how my tank could just turnaround by itself after getting close to an object. Even though there were many problems with learning the code for the first time, I persevered through the hardship and came out on top with a tank that shoot small pieces of putty. It may not seem like much now but my experience here at BlueStamp has given me the confidence and foundational skills to utilize the Arduino in any future projects that I will do in my free time.

Engineer
Patrick P.
Area of Interest
Engineering
School
Regis High School
Grade
Incoming Sophomore

Final Project

Final Milestone

This is my third and final milestone for main project, the Arduino RC Tank. For this milestone I have created an autonomous mode using an ultrasonic sensor, created a turret mounted upon a servo with a laser to guide it, and an ON/OFF switch. Also, the tank periodically moves forward when not controlled to help remind you it is on so that the battery is not wasted. Just as a summary, the first step of building my entire project was creating the chassis which was pretty much straight forward. Next, I uploaded the code to control the DC motors. This is where I encountered my main challenge- connecting the PS2 remote (which I had explained in my previous video). Once I had the motors working, I moved onto the ultrasonic sensor. For the ultrasonic, I simply connected it to the Adafruit motor shield and and uploaded a sample code to the Arduino to the control the tank. The code first ordered a ping from the sensor and then when the ping traveled back to the sensor, the Arduino would calculate the distance by using a formula. My code specified that once the tank becomes to close to an object it turns around about 150 degrees and goes in the opposite direction. The only obstacle I found as I was building this was finding the right angle to mount the sensor so that it easily detect what is directly in front of it. In the end I mounted it upon the bottom of the front of the tank. The next step was 3D print a mount for two more DC motors that would act as the turret. Once the DC motors were installed in the printed part, I mounted the entire part onto a servo so that it could turn back and forth. I also added a laser which I could turn on and off as a side thought. The problem I encountered was a  jittery servo so I had to solder a capacitor to regualteteh power sent to the servo. Finally, the last problem I encountered was that I had accidentally melted one of the wheels in the tank treads while trying to solder a faulty wire. I had to wait a week without driving the tank until I found replacement wheel. From this project, I learned a lot about the Arduino which I had no prior experience with and different techniques for soldering for many electrical components. Even though I encountered problems during this project, I enjoyed the experience very much.

Materials:

Here’s the list of materials in an excel spreadsheet: patrick-p-bom

arduinotank_schematics_bb

Second Milestone

My Second Milestone

My second milestone was to connect the PS2 remote to the Arduino so that it could control the two motors. First I had to upload the PS2X library from Bill Porter’s website. I then had to connect the wireless dongle for the PS2 remote from Hydra Performance. My first remote from Hydra performance did not connect to the dongle which was connected to the motor shield. To make sure there wasn’t anything wrong with the first remote, I borrowed a second Hydra Performance and the result was the same. Just to make sure there something wasn’t wrong with the remotes or dongle, I then checked to see if the pins were  in the correct ports. I saw that they were the same from the instructions from the original website but in my code, they were assigned to different pin spots. Therefore, I changed them to match the ones in my code and the remote finally connected to the dongle. To control the tank, I first decided to try and use the buttons to control the tank. After trying for some time and looking at other people’s examples, I still was unable to control the two motors. In the end, I finally found a website that used the analog sticks. At first I was skeptical but I decided to borrow his code and it worked. When I compared our two codes, I found out that the problem was that I had to use the Adafruit motor shield library to control the DC motors and none of the examples used that motor shield.  Also, I noticed that in his code when he assigned the function of the joysticks, he also included a set speed which I originally had not done. Once I added a set speed to the functions of the buttons, it started to work. I learned a lot about connecting the pins to the motor shield and how to code in Arduino. Currently, my Arduino is mounted using Velcro but for my third and final milestone I hope to design a case and add a laser on a servo just for show.

First Milestone

My First Milestone

For my first milestone, I used a simple program to control one of the DC motors with the Arduino. To get up to this point, I assembled the chassis and gearbox. The assembly of the chassis and gearbox was straightforward and all I had to do was to solder wires to the DC motors. The only problems that I encountered was choosing the configuration of the gearbox and the length of the tank treads. Also, before I installed the motors I tested the DC motors by connecting them directly to the battery pack. The next step was to install the motor shield to control the DC motors in the gearbox. Because I had to use the Adafruit motor shield instead of the Arduino motor shield, I had to upload a separate library from the Adafruit website to control the motors. I decided to power the motor shield with a separate battery pack which consists of 4 AA batteries. Furthermore, the Adafruit motor shield had to be soldered onto headers to connect them to the Arduino. Once that was done, I used an example code from the Adafruit Motor Shield library to test the motors. From this milestone, I learned how to solder small pins without damaging the parts the I was using and I learned some simple code for the Arduino.

Starter Project

My Starter Project Video

For my starter project, I selected the Minty Boost portable charger which functions by a boost converter circuit increasing 3V from 2 double A batteries to 5V to charge a device connected through the USB port. A current from the batteries is sent to the power inductor which begins to store the energy creating a magnetic field. When the power inductor has stored about 5V, the boost converter chip senses that it has reached 5V which opens a switch allowing the current to be sent through multiple capacitors and resisters which help smooth and stabilize the voltage. Once the voltage is stabilized at 5V, the current is then sent to charge the device through the USB port. The diode is there to ensure that the current does not flow back into batteries. Once the boost converter chip senses that the current went to the device, the current from the battery continues to charge the power inductor restarting the cycle. From this project, I learned a lot the functions of the different components in this project.

Leave a Comment

Start typing and press Enter to search