1 / 13

Program potentiometer in autonomous mode

Program potentiometer in autonomous mode. Program potentiometer in autonomous mode. Performance Objective: Given the components of a VEX robotics design system program potentiometer in autonomous mode to have a robot arm move up or down depending on the start position. Enabling Objectives:

elpida
Télécharger la présentation

Program potentiometer in autonomous mode

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Program potentiometer in autonomous mode

  2. Program potentiometer in autonomous mode Performance Objective: Given the components of a VEX robotics design system program potentiometer in autonomous mode to have a robot arm move up or down depending on the start position. Enabling Objectives: explain the purpose of a potentiometer explain how a potentiometer operates draw a flow chart for using a potentiometer program a potentiometer

  3. Potentiometer A potentiometer is an electrical component whose resistance is adjustable You can therefore adjust the degree to which the potentiometer opposes electric current through it, simply by turning a shaft that is attached to the center of the potentiometer As the resistance of the potentiometer changes, so does the voltage across the resistor This varying voltage is directly proportional to the angular position of the shaft connected to the center of the potentiometer This allows you to obtain an analog measurement of an angular position.

  4. Potentiometer Limits It is important to ensure that the shaft that is being measured by the potentiometer does not travel more than 260° (the potentiometer can only move approximately 265 ° ±5 ° and can only electrically measure 250 ° ±20 °) To measure the motion of an attached component that rotates more than 230 °, try gearing down the shaft’s motion such that the gear attached to this “primary” shaft turns a larger gear attached to a “secondary” shaft This secondary shaft will therefore rotate less distance than the primary shaft This way, you should be able to indirectly measure the rotation of the primary shaft by directly measuring the rotation of the secondary shaft

  5. Finding the limits of a potentiometer In order to see the limits of the potentiometer on a specific robot you should run the test code and move the robot arm by hand By moving the arm you can physically see the limits as well as see what values represent each limit

  6. Downloading the test code Before downloading the test code, plug in the potentiometer to an analog input port In easyC open the test code by clicking on open, in the projects folder click on the samples folder, from the samples folder open the potentiometer test folder, in this folder open the potentiometer test project Download this code Move the arm and notice the range in values of the potentiometer when you move the arm up and down

  7. Program the potentiometer Draw the flow chart for this program code Program the robot to change the position of the arm from up to down or visa versa depending on the start position of the arm using the potentiometer

  8. Program the potentiometer Open a new competition project Set the configuration for the microcontroller Define a new global variable for the potentiometer

  9. Program the potentiometer Insert the function block to get the input of the potentiometer Set the port number Set the variable to retrieve the value

  10. Program the potentiometer Insert an If statement to move the arm up if the arm starts in the down position

  11. Program the potentiometer Insert an Else-If statement to move the arm down if the arm starts in the up position

  12. Test the program Download you code and use the Competition Switch Simulator to test the code If you start the program and the arm moves to the opposite position, great! If you started the arm up in the first test, start it in the down position and retest the program to ensure it works for both directions

  13. Show it off If your code works, show it to your instructor! You are now finished programming the potentiometer For additional technical information visit: http://www.vexforum.com/wiki/index.php/Potentiometer

More Related