For my first milestone, I built the chassis of my RC Tank, wired my motor driver to my battery, Arduino, and motors and used digitalWrite to give my motors 2 states high or low. Essentially, I made my motors turn when the Arduino gained power. For my final milestone, I added a PS2 reciever and controller to send signals to the Arduino, and then make the motors turn according to the code and which buttons I press.. Here’s a demonstration. First, I had to wire the PS2 receiver to the Arduino by looking at diagrams. For example some of the pins on the PS2 receiver are Data, Command, Ground, and Power. The majority of this milestone was to program the Arduino and assign buttons on the controller to make the motors move a certain way. This part was very hard for me but I eventually learned that key parts of my code were online and could be used by downloading the correct library. Using the code online, I first utilized if statements that said “ if I click the x button, then print the letter the x in Arduino’s serial monitor”. Once this worked for all the buttons, it confirmed that the signals between the controller, to the reciever to the Arduino all worked. Finally, I had to make sure the connection would work between the motors as well. I used digitalWrite again to give my motors speed values and modified the if-statements to say “ if I click the up button on my controller, make the motors rotate forward”, and “ if I click the down button on my controller, make the motors rotate backward” and so on for left and right. This project was a really good learning experience for me as I got introduced to mechanical and electrical engineering and programming. I am also very excited that I was able to complete this project.
For this milestone, I built my RC Tank and programmed and wired it to move in different directions by simply powering the Arduino. Here’s a demonstration. I started off by building the chassis of the tank by using the Tamiya Track and Wheel Set and the Gearbox. Then, I attached the motors to the gearbox and put it all together with a universal plate. This part of the milestone was the hardest as I had to solder and dremull to make it work. Especially, while soldering the wires to the motors, I kept tearing the copper, so I had to keep restarting this process. Finally, I learned about all the pieces on the motor driver and wired it to my motors and Arduino board where all the code was uploaded. As you can see, I connected the motors to the driver through the side ports. I also learned that I had to connect the battery and Arduino to the same ground port on the driver to keep a similar reference point. I also connected the battery to the power supply port on the driver. As each port on the driver is meant for different things, I had to learn through diagrams and YouTube videos to understand what each did. While coding, I learned basic functions of Arduino, such as defining variables and learned digitalWrite which essentially gave my motors 2 states, HIGH or LOW. If I wanted to make my tank turn I would make 1 motor run at at HIGH and the other at LOW. I’m very excited to move on my last milestone which is connecting the tank to a PS2 controller.
My starter project, the Digital Trumpet works by using a breadboard, Arduino Redboard, Jumper Wires, Push buttons, a Potentiometer, and a Piezzo Buzzer. Each of the push buttons is wired to the Arduino redboard and programmed to sound different pitches when clicked. A potentiometer is a type of resistor that divides the voltage and is added to the breadboard to control the volume of each pitch. This is also attached to a Piezzo Buzzer which actually plays the audio. The Piezzo Buzzers contain 2 crystals and 2 conductors. When there is an electric potential, the crystals pull the conductors and creates a noise.