None Project_1_Validation_Testing

Project 1 Testing: Workstation Setup

You can use your workstations to test your project 1 controller. With hardware you already have, you can simulate the entry gate on the elevator platform so you can have direct feedback that your zumo is achieving the right distance in the correct time.

To setup:

  • Configure your workstation as shown in the figure below by removing the load inertial module and installing the gate module. * Connect the gate ribbon cable to the 8-pin GATE 1 connector.
  • Find the remote emmitter detector that was supplied with your workstation and plug it into the 4 pin Emitter/Detector plug located on the top right corner of the rig.
  • Connect the motor to the MOTOR 2 connector.
  • Install your hub and gate. If you need replacements for either, contact your instructor.

You can change the position of the remote sensor to be about 20 inches from the gate so it can sense the start of your zumo and activate a timer to control the gate.

image-2.png

Gate FSM Operation

  • You can download the code from jupyter by opening the ME480L_Project1_Gate file
  • The program starts with the gate down in the WAIT state. If you hear the motor trying to run, ensure the gate is closing the lower limit switch. Typically this only happens when you first start the program. (If you find you need more torque to close the switch, you can increase the voltage to the motor applied when it tries to lower the gate by increasing the motorDownPWMCounts variable in the code).
  • The green ready LED should be lit. In this state you may set the program to run a "near" or "far" run (the details of each are set in the code). To run the "near" run press BTN 3. To set the "far" run press BNT 4. The mode will be shown in the lower line of the LCD display.
  • Position your Zumo so it is pointed at the gate and near the remote sensor so it reflects light into the detector.
  • When the detector ouput is above the pre-set threshold indicating the zumo is near, the blue run light come on. This will happen regardless of the STATE.
  • With the blue light on, roll the zumo backward just until the blue light goes off, indicating that the Zumo is no longer blocking the sensor AND sitting just before the "start" location.
  • Pressing BTN 1 will move the system into armed state. The green led will change to a red blinking led. At this point you are ready to run your Zumo program.
  • Once the Zumo's presences activates the detector, the blue light will momentarily light and the blinking red light will change to a steady red light. After a specified time interval the gate will open. It will remain open for a second specified time interval and then close.

During the demonstration we will provide the gate timing. While you practice with the gates, you can enter your own timing by adjusting the timer durations found at the top of the code and described in the comments:

//+++++++++++ Timer variables ++++++++++
unsigned long timer1DurationFar = 3000;  //time(ms) from start when gate will open (FAR)
unsigned long timer2DurationFar = 2000;  //time(ms) gate will remain open (FAR)
unsigned long timer1DurationNear = 2000; //time(ms) from start the gate will open (NEAR) 
unsigned long timer2DurationNear = 800;  //time(ms) gate will remain open (NEAR)
//++++++++++++++++++++++++++++++++++++++

TIP: Having trouble programming your zumo? Make sure you have a data usb cable. Not all USB cables transmit data. Some just deliver power for charging! If communication isn't working, try a friends cable that you know works!

Validation

Your challenge is to ensure the zumo arrives on the elevator platform before it moves (as indicated by the gates lowering) and not fall off! We'll evaluate how well the zumo's open-loop controller worked by using the zones shown below.

Success is ensured by the zumo being entirely in the safe zone (the size of the elevator). Arriving on the target (Centered) does recieve a bit of a bonus, but is not required. There are increasing penalties for being in the Dangling, or 50/50 zone. The lowest points are awarded for any part of the zumo being outside the 50/50 zone.

Your zumo will be scored according to which zone it is entirely within.

image-2.png