Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Lab 04: AEV External Sensors Advanced Energy Vehicle (AEV)"— Presentation transcript:

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

2 AEV Project Objective (Problem Definition) INITIAL CONCEPTS (Brainstorming) EXPERIMENTAL RESEARCH ANALYZE DESIGN DECISION RESEARCH COMPARE FINAL DESIGN Present AEV Design PT 1 PT 2 PT 3 PT 4 (System Analysis)(Programming)

3 Learning Objectives  Become familiar with an external sensor which provides feedback to the Arduino about the vehicles position  Become familiar with troubleshooting techniques  Program the function calls in controlling the AEV using an external sensor

4 Feedback control  The sensor that will be focus of today’s lab is the Reflective Sensor which records wheel rotation information  The importance of this external sensor is to provide real-time information to the Arduino for autonomous vehicle operation  When a program uses real-time information from sensors, it is known as feedback control Image: from Arduino Website

5 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  This voltage change is called a “mark.” For one full wheel revolution, a sensor will have 4 voltage changes or 4 marks. Our system uses two wheel sensors so the combined sensors will record eight marks per wheel rotation. 1 Mark

6 Mounting the Sensor  The sensors must be mounted to have an unobstructed view through the holes in the support arm. Use hardware plus tie wraps to secure them in place. Verify that the holes on the wheel side of the supporting arm are counter sunk. See your Instructor if holes are not counter sunk.  The closer the sensor is to the wheel, the better voltage reading the sensor will usually have. Optimum Too Far Away

7 Verifying the Sensors  To make sure the sensors are on correctly  Run the “reflectanceSensorTest();” following the procedure in the lab manual.  Make sure to set to set the serial monitor to 115200 Baud  This should be done every lab because sensors have been known to fail.

8 Connecting the sensors to the Arduino  Take careful consideration where the reflective sensor is attached to on the Arduino.  Read the AEV Lab Manual for proper orientation and pin locations Important Note: Make sure the connections are installed with the white wire facing the Arduino mini-USB connection.

9 Programming with the Sensors  goToRelativePosition(M); One Argument; M = number of 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 power Continues the last command for 44 wheel marks from the current position

10 Programming with the Sensors  goToAbsolutePosition(M); 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 from AEV starting position Continues the last command until the AEV accumulates 500 total wheel marks from the starting position.

11  We want to go ANOTHER 40 inches (aka 82 marks) what code do we want? motorSpeed(4,20); goToAbsolutePosition(164); OR goToRelativePosition(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 sequence assumes that the AEV stops at exactly the 40 inch distance and does not coast. Repeating the Relative option may result in over-shooting the 80 inch position since second Relative command will be referenced to the coast point. Repeated use of only the Relative command may cause errors.

12 Programming to use the sensors  The Lab Guidelines document gives programming instructions for this week’s lab.  Program your AEV, using the appropriate program, test on your desktop track, and then run your AEV on the classroom track.  Follow AEV classroom track safety procedures!

13 Wheel count sensor testing Since your programming will depend on the sensors working correctly, it is vital that you confirm the sensors are working properly at the beginning of each lab. Use the reflectance test program used in this lab each week to confirm proper operation of the sensors. There is also a test jig at the front of the Lab which can be used to test the sensors. NOTE that three typical problems and their solutions are shown on the following slides.

14 Wheel count sensor problems

15

16


Download ppt "Lab 04: AEV External Sensors Advanced Energy Vehicle (AEV)"

Similar presentations


Ads by Google