Lab 02: Arduino Programming Basics

The objective of this lab was to setup the software and programs on the Arduino and test basic function calls that control the AEV, specifically the propellers. Figure 1 below shows the Arduino, battery, and motor stand for the propellers.

 

Figure 1: Propeller Test Stand with Battery and Arduino

 


We have many different codes to program the propellers.

celerate(m,p1,p2,t): m is the motor number (1-3, 4 is all), p1 is the starting speed in percent (1-100), p2 is the ending motor speed in percent (1-100), and t is the time in seconds (1-10)

⌊This command accelerates the motor from a starting speed to a final speed in for a time period.

motorSpeed(m,p): m is the motor number (1-3, 4 is all) and p is the speed in percent (1-100)

⌊This command accelerates a motor a certain speed.

goFor(t): t is the time in seconds

⌊This command continues the previous command for a certain time.

brake(m): m is the motor number (1-3, 4 is all)

⌊This command cuts power to the motor.

reverse(m): m is the motor number (1-3, 4 is all)

⌊This command reverses the motor.


During the lab, however, when we attempted to initiate the code implemented into the Arduino, smoke rose from the Arduino. After we immediately cut the power to the Arduino, we checked for errors and malfunctions. The wires had all been connected properly; however, the problem occurred from the Toshiba Motor Chip. The chip had been overused, and burned out when the battery was turned on. Figures 2 and 3 display the burnt chip. We replaced the chip as soon as possible.

Lab 2 Error Chip 2

Figure 2

Lab 2 Error Chip

Figure 3

Despite having an error, the propellers ran exactly as the code was written. Knowing that our code was perfect helps us better understand how to operate the propellers.

Leave a Reply

Your email address will not be published. Required fields are marked *