Final Project
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