Top Banner
Lab 04: AEV External Sensors Advanced Energy Vehicle (AEV)
12

Lab 04: AEV External Sensors Advanced Energy Vehicle (AEV)

Dec 18, 2015

Download

Documents

Patricia Holt
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Lab 04: AEV External Sensors Advanced Energy Vehicle (AEV)

Lab 04: AEV External SensorsAdvanced Energy Vehicle (AEV)

Page 2: Lab 04: AEV External Sensors Advanced Energy Vehicle (AEV)

AEV Project Objective(Problem Definition)

INITIAL CONCEPTS(Brainstorming)

EXPERIMENTAL RESEARCH

ANALYZE

DESIGN DECISION

RESEARCH

COMPARE

FINAL DESIGN

Present AEV Design

PT 1PT 2PT 3PT 4

(System Analysis)(Programming)

Page 3: Lab 04: AEV External Sensors Advanced Energy Vehicle (AEV)

Learning Objectives Become familiar with the external sensor

hardware components• Become familiar with troubleshooting

techniques

Program the function calls in controlling the AEV using the external sensors

Page 4: Lab 04: AEV External Sensors Advanced Energy Vehicle (AEV)

External Sensors The importance of external sensors on

the AEV is to provide real-time information being provided to the Arduino for autonomous vehicle operation• This is known as a feedback control

The sensor that will be focus of today’s lab is the Reflective Sensor

Image: from Arduino Website

Page 5: Lab 04: AEV External Sensors Advanced Energy Vehicle (AEV)

Reflective Sensors The sensor will produce a low voltage due to the

reflectance of the aluminum tape and produce a high voltage due to the dark color of the wheel

1 Mark

1 Mark

1 Mark

1 Mark

This voltage change is called a “mark.” For one full wheel revolution, a sensor will have 4 voltage changes or 4 marks. Since we have two sensors, one full wheel revolution will have how many marks??

EIGHT Marks!!

Page 6: Lab 04: AEV External Sensors Advanced Energy Vehicle (AEV)

Mounting the Sensor The closer the sensor is to the wheel, the

better voltage reading the sensor will usually have

OptimumToo Far Away

Page 7: Lab 04: AEV External Sensors Advanced Energy Vehicle (AEV)

Troubleshooting the Sensors To make sure the sensors

are on correctly

Run the “reflectanceSensorTest();”

Make sure to set to set the serial monitor to 115200 Baud

Page 8: Lab 04: AEV External Sensors Advanced Energy Vehicle (AEV)

Making the Connections Take careful consideration

where the reflective sensor is attached to on the Arduino.

Read the AEV Lab Manual for proper orientation and pin locations

When in doubt ASK IF UNCERTAIN!

Important Note: Make sure the connections are installed with the white wire facing the Arduino mini-USB connection.

Page 9: Lab 04: AEV External Sensors Advanced Energy Vehicle (AEV)

Arduino Programming Sensor Function Calls goToRelativePosition(M);• One Argument; works specifically with the reflectance

sensor M: wheel marks

• Example: motorSpeed(4,27);goToRelativePosition(44);

Each wheel has 8 marks and the wheel has a circumference of 3.902 inches

Therefore: (44 marks)*(3.902/8) inches = 21.46 inches traveled

Sets all motors to 27% full powerContinues the last command for 44 wheel marks.

Page 10: Lab 04: AEV External Sensors Advanced Energy Vehicle (AEV)

Arduino Programming Sensor Function Calls goToAbsolutePosition(M);• One Argument; works specifically with the reflectance

sensor M: wheel marks

• Example: motorSpeed(2,30);goToAbsolutePosition(500);

Each wheel has 8 marks and the wheel has a circumference of 3.902 inches

Therefore: (500marks)/(3.902/8) inches = 243.76 inches traveled

Sets motor 2 to 30% full powerContinues the last command for until the AEV accumulates 500 total wheel marks.

Page 11: Lab 04: AEV External Sensors Advanced Energy Vehicle (AEV)

We want to go ANOTHER 40 inches (aka 82 marks) what code do we want?

motorSpeed(4,20);goToAbsolutePosition(164); OR goToRelative(82);

Difference Between goToAbsolutePosition and goToRelativePosition

40 Inches

80 Inches

We want to go 40 inches (aka 82 marks) what code do we want?

motorSpeed(4,20);goToAbsolutePosition(82); OR

goToRelativePosition(82);

0 Inches

Note: This is assuming the AEV stops at exactly said distance and does not coast!

Page 12: Lab 04: AEV External Sensors Advanced Energy Vehicle (AEV)

Questions?