# Lab 1

Lab 1 – Creative Design

The group started testing the two motors which will be installed on the Advanced Energy Vehicle, AEV this week. This step is crucial for the whole project since the AEV is heavily relied on motor control and timing to achieve a different motor speed and status. Serval motor control commands were used to perform the test, including accelerating, decelerating, fix power running, and reverse motor polarity. This lab is the prerequisite for week 2 which will calibrate motors with sensors.

The team gained insight into the importance of learning troubleshooting techniques when programming the Arduino. Also, the team learned different commands for the Arduino, and various ways to change motor speed, power, and how long the motor(s) will function.

Sample Code:

Scenario 1:

//Lab 1 Scenario 1

//Put under _01_myCode section

//01/17/2017

//1. Accelerate motor one from start to 15% power in 2.5 seconds

celerate(1,0,15,2.5);

//2. Run motor one at a constant speed (15% power) for 1 second.

goFor(1);

//3. Brake motor one

brake(1);

//4. Accelerate motor two from start to 27% power in 4 seconds.

celerate(2,0,27,4);

//5. Run motor two at a constant speed (27% power) for 2.7 seconds.

goFor(2.7);

//6. Decelerate motor two to 15% power in 1 second.

celerate(2,27,15,1);

//7. Brake motor two.

brake(2);

//8. Reverse the direction of only motor 2.

reverse(2);

//9. Accelerate all motors from start to 31% power in 2 seconds.

celerate(4,0,31,2);

//10. Run all motors at a constant speed of 35% power for 1 second.

motorSpeed(4,35);

goFor(1);

//11. Brake motor two but keep motor one running at a constant speed (35% power) for 3 seconds.

brake(2);

motorSpeed(1,35);

goFor(3);

//12. Brake all motors for 1 second.

brake(4);

goFor(1);

//13. Reverse the direction of motor one.

reverse(1);

//14. Accelerate motor one from start to 19% power over 2 seconds.

celerate(1,0,19,2);

//15. Run motor two at 35% power while simultaneously running motor one at 19% power for          2 seconds.

motorSpeed(2,35);

motorSpeed(1,19);

goFor(2);

//16. Run both motors at a constant speed (19% power) for 2 seconds.

motorSpeed(4,19);

goFor(2);

//17. Decelerate both motors to 0% power in 3 seconds.

celerate(4,19,0,3);

//18. Brake all motors.

brake(4);

//19. Save Program as (Save As: ) PrgmBasics

Team meeting notes:

Date: January 22nd, 2017
Time: 4:00pm
Members Present: All
Topics/Agenda: Progress Report 1, Lab 2
Action Items:

• Portfolio Update: Kaitlyn
*Due 1/31/2017
• Team Working Agreement: Rachel
*Due 1/24/2017
• Mock AEV Assembly: Josh & Yuyi
*Due 1/24/2017
• Lab 3 Progress Report: All
*Due 1/31/2017

Weekly Schedule

Table 1: Week 2 Schedule

 Task Teammate(s) Start Date Due Date Time Needed Brainstorm AEV designs All 1/22/2017 2/14/2017 2 hrs Portfolio Update Kaitlyn 1/22/2017 1/31/2017 1 hr Lab 3 Progress Report All 1/24/2017 1/31/2017 3 hrs